func (c coordinate) decimal() float64 {
	sign := 1.0
	switch c.h {
	case 'S', 'W', 's', 'w':
		sign = -1
	}
	return sign * (c.d + c.m/60 + c.s/3600)
}
decimal converts a d/m/s coordinate to decimal degrees.
package main
import "fmt"
type coordinate struct {
	d, m, s float64
	h       rune
}