Closed adityaalviori closed 6 years ago
Can you post an example of the desired output?
Hi @icholy, I want the output like this: -6.21462, 106.84513 Thanks
Hi @adityaalviori,
By default, the library parses the lat/long coordinates to float, so you can just use the Latitude
and Longitude
fields of the parsed sentence. See the example below:
sentence := "$GPRMC,220516,A,5133.82,N,00042.24,W,173.8,231.8,130694,004.2,W*70"
s, _ := nmea.Parse(sentence)
m := s.(nmea.GPRMC)
fmt.Printf("Latitude decimal: %f\n", m.Latitude)
fmt.Printf("Longitude decimal: %f\n", m.Longitude)
Output:
Latitude decimal: 51.563667
Longitude decimal: -0.704000
Let us know if this is what you are looking for. Thanks.
Hi @adrianmo
Yeah, i want the output like this format. Thank you very much for your help
Regards
adityaalviori
Hi @adrianmo , May I get the GPS output on decimal format?
Thanks for your help
Regards