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

Rak12500 Heading value is millions of degrees #3720

Open
paoloponzano opened this issue Apr 25, 2024 · 28 comments
Open

Rak12500 Heading value is millions of degrees #3720

paoloponzano opened this issue Apr 25, 2024 · 28 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@paoloponzano
Copy link

Category

Other

Hardware

Rak4631

Firmware Version

2.3.6

Description

Im using a node based on Rak Meshtastic starter kit + Rak12500 ZOE-M8Q GPS.
When looking at the reported Heading of the node on the map, the values are always millions of degrees. It can for example show 15.043.000° at one gps fix and 8.588.000° at the next one. Has always been wrong since I started using it with 2.2.15 and behavior is the same now on 2.3.6. I’m using the iOS app, latest version.
If i disable the gps module and have my phone share the location instead, then heading is correctly reported with values between 0° and 360°.
The speed indication is also way too high, showing speeds over 300km/h when I’m actually traveling at about 40-50km/h, but that seems wrong even when using the phone for location.
I activated both speed and heading position flags when screenshot were taken.
Another thing i think is worth noting:
-if speed position flag is active and heading is disabled, only HEADING is indicated (still wrong) and speed is always 0
-if heading position flag is active and speed is disabled, only SPEED is indicated (seemingly slightly more accurate) and heading shows always 0.
-if both position flags are disabled then they will both show 0.
This behavior seems unaffected by the other flags.
If any other information may be useful, please let me know and I’ll gladly help.

IMG_4894
IMG_4895

Relevant log output

No response

@paoloponzano paoloponzano added the bug Something isn't working label Apr 25, 2024
@thebentern thebentern added the help wanted Extra attention is needed label May 5, 2024
@thebentern
Copy link
Contributor

@GPSFan think this is another TinyGPS bug?

@GPSFan
Copy link
Contributor

GPSFan commented May 5, 2024

Not sure about a TinyGPS+ bug, certainly could be, I'll have to see if I can replicate it, but the way it is displayed up above 7.540.000 reads as 7.5 degrees to me, and 26.535.000 reads as 26.5 degrees to me. %^%@! comma vs decimal point issues...
I have a 12500 on the way and will dig into it as soon as it arrives.
I should put together a NMEA message simulator so we can inject known NMEA data into the serial ports when stuff like this happens.

@GPSFan
Copy link
Contributor

GPSFan commented May 7, 2024

A log, taken when the issue is present would also be helpful.

@paoloponzano
Copy link
Author

@GPSFan yes it was taken from an iPhone
Is there any particular way or method for me to take the log or do I just copy the serial output from VS?

@GPSFan
Copy link
Contributor

GPSFan commented May 7, 2024

Copying the output should be ok, let's see what it looks like for a minute or 2, make sure that there are at least 2 position updates in the log.
Thanks.
My12500 should be here this weekend so I'll be able to dig more then.

@paoloponzano
Copy link
Author

Rak12500_LOG.txt

@GPSFan
Copy link
Contributor

GPSFan commented May 7, 2024

That log is ok, but there are no position updates, let it go for 10-15 min or so.

@paoloponzano
Copy link
Author

That log is ok, but there are no position updates, let it go for 10-15 min or so.

Seems like ctrl-c ctrl-v betrayed me and I forgot to check it copied the whole output...
I'm taking a new log, brb

@paoloponzano
Copy link
Author

Rak12500_LOG.txt

@GPSFan
Copy link
Contributor

GPSFan commented May 7, 2024

During that log, what was your app saying about the speed and heading?

@paoloponzano
Copy link
Author

image

@GPSFan
Copy link
Contributor

GPSFan commented May 7, 2024

These are the GPS position reports that got logged:

Rak12500_LOG_1.txt:DEBUG | 22:58:11 301 [GPS] New GPS pos@663a95e4:3 lat=44.984718, lon=7.731272, alt=242, pdop=7.88, track=93.21, speed=0.06, sats=8
Rak12500_LOG_1.txt:DEBUG | 22:58:42 332 [GPS] New GPS pos@663a9603:3 lat=44.984806, lon=7.730480, alt=242, pdop=3.80, track=96.99, speed=0.14, sats=9
Rak12500_LOG_1.txt:DEBUG | 22:59:12 362 [GPS] New GPS pos@663a9621:3 lat=44.984931, lon=7.730615, alt=265, pdop=7.37, track=96.99, speed=0.04, sats=12
Rak12500_LOG_1.txt:DEBUG | 22:59:46 396 [GPS] New GPS pos@663a9643:3 lat=44.984902, lon=7.730365, alt=257, pdop=8.46, track=96.99, speed=0.01, sats=9
Rak12500_LOG_1.txt:DEBUG | 23:00:17 428 [GPS] New GPS pos@663a9662:3 lat=44.985109, lon=7.730379, alt=292, pdop=4.34, track=96.99, speed=0.00, sats=9

As you can see, none of the speeds are very large and all the headings (track=) are about 93-96, and all the altitudes are 240-290.

@GPSFan
Copy link
Contributor

GPSFan commented May 7, 2024

Next thing to try is an android device connected to the node and see what it says. This will tell us whether it is the firmware of the app.
To me the heading issue is a conversion/display problem. the track is clearly reported as 96.99, the display in the app is 9.699.000

@paoloponzano
Copy link
Author

Next thing to try is an android device connected to the node and see what it says. This will tell us whether it is the firmware of the app.

To me the heading issue is a conversion/display problem. the track is clearly reported as 96.99, the display in the app is 9.699.000

I might be able to check with an android device later today, I'll report back

@paoloponzano
Copy link
Author

Any ideas about the flag's mismatch thing? Could that be an app issue too?

@GPSFan
Copy link
Contributor

GPSFan commented May 8, 2024

It could be either the firmware or the app, it is most likely not TinyGPS++ since the position report in the log is correct.
Sorry I have no clue about flag mismatch.

@paoloponzano
Copy link
Author

I don't think the android app shows the heading, or at least I can't find it 😅
Maybe @garthvh could help us understand if this issues could be app related?

@GPSFan
Copy link
Contributor

GPSFan commented May 8, 2024

I don't do IOS, I looked at my android app and don't see a spot for heading, so help needed from someone with a clue about IOS.
I might be able to grab the Android sources, build the app and run it under debug to see what it gets from the mesh as a heading value, but I don't have time to do that in the near future.

@garthvh
Copy link
Member

garthvh commented May 11, 2024

I don't think it gets displayed on android anywhere.

@garthvh
Copy link
Member

garthvh commented May 11, 2024

image

@GPSFan
Copy link
Contributor

GPSFan commented May 11, 2024

@garthvh so your display is correct where you are the US, whereas @paoloponzano has an incorrect display in Italy. Also Imperial vs metric units, but degrees are the same in both unit systems where the issue is.
Very strange...

@paoloponzano
Copy link
Author

@GPSFan good point, I'll try setting my phone to imperial unit to see if the heading value is affected

@paoloponzano
Copy link
Author

@garthvh @GPSFan it is not related to imperial/metric units
Another thing i just noticed: seems not related to just rak but other boards too (i know these people and they use lilygo)🤔🤔🤔🤔
And btw it happens on iPad too

image
image
image
image

@GPSFan
Copy link
Contributor

GPSFan commented May 11, 2024

If your friends are using LiliGo boards, and it's not an Imperial vs. Metric issue, and the heading is only displayed on iPhone/iPad, then I have to believe that it is an IOS app problem.

@paoloponzano
Copy link
Author

Also with legacy mapimage

@garthvh
Copy link
Member

garthvh commented May 12, 2024

The firmware does no quality checks for gps data, likely these are low accuracy headings.

@GPSFan
Copy link
Contributor

GPSFan commented May 12, 2024

The firmware does some rudimentary sanity checks, TinyGPS++ sets course to 0 if the RMC sentence has a bad checksum, and GPS.cpp will log a warning if the course >360.
The NMEA data for the cog field of the RMC sentence is in degrees, it is either 0-359, or empty.

@GPSFan
Copy link
Contributor

GPSFan commented May 13, 2024

I have setup a NMEA simulator and connected it to my Chatter 2. I set the position to roughly @paoloponzano 's location and the Heading to 90 degrees. Works ok with my Android app, but alas no heading display, now all I need is an iPhone (I wonder if I can borrow my wife's) ;>))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants