Fix: latitude, longitude format
This commit is contained in:
@ -11,10 +11,10 @@ import (
|
||||
)
|
||||
|
||||
type Data struct {
|
||||
Latitude float64 `json:"Latitude"`
|
||||
Longitude float64 `json:"Longitude"`
|
||||
LatitudeIndicator string `json:"Latitude_indicator"` // North/South
|
||||
LongitudeIndicator string `json:"Longitude_indicator"` // West/East
|
||||
Latitude float64 `json:"Latitude"` // ddmm.mmmmmm
|
||||
Longitude float64 `json:"Longitude"` // dddmm.mmmmmm
|
||||
LatitudeIndicator string `json:"Latitude_indicator"` // N/S - North/South
|
||||
LongitudeIndicator string `json:"Longitude_indicator"` // W/E - West/East
|
||||
Speed float64 `json:"Speed"`
|
||||
Course float64 `json:"-"`
|
||||
Altitude float64 `json:"-"`
|
||||
@ -59,8 +59,6 @@ func (gps *Data) decode(str string) error {
|
||||
if err != nil {
|
||||
logger.Println("ERROR parse longitude:", err.Error())
|
||||
}
|
||||
newGpsInfo.Latitude /= 100
|
||||
newGpsInfo.Longitude /= 100
|
||||
newGpsInfo.LatitudeIndicator = strs[1]
|
||||
newGpsInfo.LongitudeIndicator = strs[3]
|
||||
newGpsInfo.Date = strs[4]
|
||||
|
@ -34,6 +34,8 @@ const (
|
||||
)
|
||||
|
||||
func secondCountDownTimer(title string, logger *log.Logger, t time.Duration) {
|
||||
_ = title
|
||||
_ = logger
|
||||
counter := 0
|
||||
for {
|
||||
if counter > int(t.Seconds()) {
|
||||
|
@ -25,7 +25,7 @@ func CheckSignal(port at.Port, logger *log.Logger) (bool, error) {
|
||||
}
|
||||
|
||||
func checkRssi(rssi int) error {
|
||||
// rssi - Received signal strenght indicator
|
||||
// rssi - Received signal strength indicator
|
||||
// 0 -113 dBm or less
|
||||
// 1 -111 dBm
|
||||
// 2...30 -109... - 53 dBm
|
||||
|
Reference in New Issue
Block a user