Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support generic xxRMC and xxGGA terms #9

Merged
merged 1 commit into from
Apr 20, 2024

Conversation

titan098
Copy link

@titan098 titan098 commented Apr 13, 2024

Multi-GNSS modules will likely emit GNGGA and GNRMC messages when systems are enabled alongside other systems, however if a single system is the only one enabled it may only emit xxGGA and xxRMC terms (where xx is the Talker ID) which currently may not be parsed.

  • Add support for generic parsing of xxRMC/xxGGA messages (where xx is the NMEA Talker ID)
Talker ID System
GP GPS
BD/GB Beideu
GL GLONASS
GA Galileo
GN GNSS

Testing

With a module configured with only BDS enabled and is only emitting BDGGA and BDRMC terms:

...
$BDGGA,163448.000,xxx,S,yyy,E,1,09,1.0,54.7,M,0.0,M,,*54
$BDRMC,163448.000,A,xxx,S,yyy,E,0.00,93.93,130424,,,A*58
$BDGGA,163449.000,xxx,S,yyy,E,1,09,1.0,54.7,M,0.0,M,,*54
$BDRMC,163449.000,A,xxx,S,yyy,E,0.00,93.93,130424,,,A*58
$BDGGA,163450.000,xxx,S,yyy,E,1,09,1.0,54.6,M,0.0,M,,*59
$BDRMC,163450.000,A,xxx,S,yyy,E,0.00,93.93,130424,,,A*54
...

Before Change

TinyGPS++ is unable to process the messages and extact any location/time information

DEBUG | ??:??:?? 0 Enter state: BOOT
DEBUG | ??:??:?? 0 [GPS] Probing for GPS at 9600 
INFO  | ??:??:?? 0 [GPS] ATGM336H GNSS init succeeded, using ATGM336H Module
DEBUG | ??:??:?? 0 [GPS] publishing pos@0:2, hasVal=0, Sats=0, GPSlock=0
DEBUG | ??:??:?? 0 [GPS] No GPS lock
DEBUG | ??:??:?? 0 [GPS] onGPSChanged() pos@0, time=0, lat=0, lon=0, alt=0
INFO  | ??:??:?? 0 [GPS] updatePosition LOCAL pos@0, time=0, latI=0, lonI=0, alt=0
DEBUG | ??:??:?? 0 [GPS] Setting local position: latitude=0, longitude=0, time=0
DEBUG | ??:??:?? 0 [GPS] Node status update: 0 online, 2 total
...

After Change

TinyGPS++ process the terms and extracts the location/time information

DEBUG | ??:??:?? 0 Enter state: BOOT
DEBUG | ??:??:?? 0 [GPS] Probing for GPS at 9600 
INFO  | ??:??:?? 0 [GPS] ATGM336H GNSS init succeeded, using ATGM336H Module
WARN  | ??:??:?? 1 [GPS] SOME data is TOO OLD: LOC 0, TIME 0, DATE 4294967295
DEBUG | ??:??:?? 1 [GPS] publishing pos@0:2, hasVal=0, Sats=0, GPSlock=1
DEBUG | ??:??:?? 1 [GPS] No GPS lock
DEBUG | ??:??:?? 1 [GPS] onGPSChanged() pos@0, time=0, lat=0, lon=0, alt=0
INFO  | ??:??:?? 1 [GPS] updatePosition LOCAL pos@0, time=0, latI=0, lonI=0, alt=0
DEBUG | ??:??:?? 1 [GPS] Setting local position: latitude=0, longitude=0, time=0
DEBUG | ??:??:?? 1 [GPS] NMEA GPS time 2024-04-13 16:41:44
DEBUG | ??:??:?? 1 [GPS] Upgrading time to quality 4
DEBUG | 16:41:44 1 [GPS] Read RTC time as 1713026504
DEBUG | 16:41:44 1 [GPS] hasValidLocation RISING EDGE
DEBUG | 16:41:44 1 [GPS] WANT GPS=0
DEBUG | 16:41:44 1 [GPS] GPS Lock took 1, average 0
INFO  | 16:41:44 1 [GPS] Setting GPS power=0
DEBUG | 16:41:44 1 [GPS] publishing pos@661ab5c8:2, hasVal=1, Sats=9, GPSlock=1
DEBUG | 16:41:44 1 [GPS] New GPS pos@661ab5c8:3 lat=xxxx, lon=yyyy, alt=154, pdop=1.41, track=333.62, speed=0.00, sats=9
DEBUG | 16:41:44 1 [GPS] onGPSChanged() pos@661ab5c8, time=1713026504, lat=xxxx, lon=yyyy, alt=154
INFO  | 16:41:44 1 [GPS] updatePosition LOCAL pos@661ab5c8, time=1713026504, latI=xxxx, lonI=yyyy, alt=154
DEBUG | 16:41:44 1 [GPS] Setting local position: latitude=xxxx, longitude=yyyy, time=1713026504

@CLAassistant
Copy link

CLAassistant commented Apr 13, 2024

CLA assistant check
All committers have signed the CLA.

@titan098 titan098 force-pushed the support_bds_only_receivers branch from 92c5551 to d61b9af Compare April 20, 2024 12:05
@titan098
Copy link
Author

Updated to support more generic xxRMC/xxGGA terms

@titan098 titan098 changed the title Support BDRMC and BDGGA terms Support generic xxRMC and xxGGA terms Apr 20, 2024
@caveman99 caveman99 merged commit 71a82db into meshtastic:master Apr 20, 2024
1 check passed
@titan098 titan098 deleted the support_bds_only_receivers branch April 21, 2024 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants