adafruit / Adafruit_GPS

An interrupt-based GPS Arduino library for no-parsing-required use
Other
475 stars 318 forks source link

Сalculating velocity vectors by NMEA protocol #152

Closed brightproject closed 11 months ago

brightproject commented 11 months ago

You could say that I am new to using GNSS and the NMEA protocol. gps-nmea-0183_img01

There was a need to determine speeds in the cardinal directions and down or up. The UBX protocol makes it possible to obtain such data

velN
velE
velD

NED_velocity But in the NMEA data format I found the only mention of direction and speed, this is the $VTG parameter. VTG_NMEA

But despite my little knowledge of the NMEA protocol, it seems to me that $VTG is simply a duplication of information from the $RMC. That is, the $VTG sequence is redundant information of the $RMC sequence. I could be wrong and actually I need to find a solution - how to get the speed and direction of vectors from the GNSS module. As far as I understand, protocols - be it NMEA or UBX - are just a “mechanism” for transmitting data from the GNSS satellite to the information user. Consequently, the GNSS receiver receives all the necessary information for calculations. I am sure that the ability of the UBX protocol to produce data on speed and vectors is due to a proprietary function. But theoretically and mathematically, how can vectors and velocities be calculated from GPS data?

caternuson commented 11 months ago

Use speed for the magnitude and angle for the direction. https://github.com/adafruit/Adafruit_GPS/blob/master/examples/GPS_HardwareSerial_Parsing/GPS_HardwareSerial_Parsing.ino