Ultimate GPS random course headings?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- abishur
- Posts: 15
- Joined: Tue Jun 16, 2015 7:30 pm
Ultimate GPS random course headings?
I just got an ultimate gps pi hat and am reading the GPS data from it with a valid fix with an external gps antenna plugged in. It's sitting on the desk next to me, but I'm noticing that the direction is constantly changing. It will jump 100 degrees in an instant, then be +/- 10 degrees then make another massive jump. Is this to be expected when the unit is not in motion or is there something wrong with my board?
- blnkjns
- Posts: 963
- Joined: Fri Oct 02, 2020 3:33 am
Re: Ultimate GPS random course headings?
I think it is totally normal behaviour. GPS has a position accuracy of 2-3m, so if readings jump a couple of meters around you the heading gets nuts. Thats why GPS modules for say drones are always having a magnetometer on board as well, so you can calculate the heading from the compass.
- danhalbert
- Posts: 4649
- Joined: Tue Aug 08, 2017 12:37 pm
Re: Ultimate GPS random course headings?
I concur that this kind of jitter is typical, and I have seen it as well.
- abishur
- Posts: 15
- Joined: Tue Jun 16, 2015 7:30 pm
Re: Ultimate GPS random course headings?
Hmmm... so what can I do to minimize this behavior? I wanted to use this to display speed and calculate distance traveled, but currently even when I'm completely in the open I'm still getting a lot more bouncing than the 1.8M accuracy the module claims and I'm not getting a 3D fix reported back even after standing around outside for quite a while. I am getting a 2D fix, however.
- adafruit_support_carter
- Posts: 29150
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Ultimate GPS random course headings?
Keep trying to get a 3D fix. That will help in general. If you have a clear view of the sky, are using a good power supply, and nothing else is interfering electrically, you should be able to eventually get a 3D fix. What is your method for determining 2D vs. 3D fix?
Any "direction" information, like a heading or a bearing is computed. The GPS unit itself can not discern orientation. It is just a point in 3D space. You need to be in motion. Otherwise it is just doing the math on the general noise in your current position.
Any "direction" information, like a heading or a bearing is computed. The GPS unit itself can not discern orientation. It is just a point in 3D space. You need to be in motion. Otherwise it is just doing the math on the general noise in your current position.
- adafruit2
- Posts: 22145
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Ultimate GPS random course headings?
direction is not accurate, it is based on *movement*
location should be accurate - if you have a good antenna and there are no tall buildings around.
location should be accurate - if you have a good antenna and there are no tall buildings around.
- abishur
- Posts: 15
- Joined: Tue Jun 16, 2015 7:30 pm
Re: Ultimate GPS random course headings?
I'm using the official adafruit_circuitpython_gps library and after calling gps.update() I do a gps.fix_quality and a gps.fix_quality_3d. 3d returns nothing. That said, I just removed my external antenna, and I the red fix light is blinking every second indicating there is no fix, but gps.fix_quality is still returning a true so I have my doubts I'm getting accurate information.
I'm using python 3 on a raspberry pi with the ultimate GPS pihat.
I'm using python 3 on a raspberry pi with the ultimate GPS pihat.
- adafruit_support_carter
- Posts: 29150
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Ultimate GPS random course headings?
The 3D fix info is in the GSA sentence:I do a gps.fix_quality and a gps.fix_quality_3d. 3d returns nothing.
http://aprs.gids.nl/nmea/#gsa
Are you turning that output on? You use the send_command:
https://circuitpython.readthedocs.io/pr ... nd_command
with PMTK314 command as shown here:
https://github.com/adafruit/Adafruit_Ci ... est.py#L37
Check out this for complete reference on the command:
https://cdn-shop.adafruit.com/datasheets/PMTK_A11.pdf
Please be positive and constructive with your questions and comments.