Ultimate GPS random course headings?

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
abishur
 
Posts: 15
Joined: Tue Jun 16, 2015 7:30 pm

Ultimate GPS random course headings?

Post by abishur »

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?

User avatar
blnkjns
 
Posts: 963
Joined: Fri Oct 02, 2020 3:33 am

Re: Ultimate GPS random course headings?

Post by blnkjns »

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.

User avatar
danhalbert
 
Posts: 4649
Joined: Tue Aug 08, 2017 12:37 pm

Re: Ultimate GPS random course headings?

Post by danhalbert »

I concur that this kind of jitter is typical, and I have seen it as well.

User avatar
abishur
 
Posts: 15
Joined: Tue Jun 16, 2015 7:30 pm

Re: Ultimate GPS random course headings?

Post by abishur »

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.

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Ultimate GPS random course headings?

Post by adafruit_support_carter »

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.

User avatar
adafruit2
 
Posts: 22145
Joined: Fri Mar 11, 2005 7:36 pm

Re: Ultimate GPS random course headings?

Post by adafruit2 »

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.

User avatar
abishur
 
Posts: 15
Joined: Tue Jun 16, 2015 7:30 pm

Re: Ultimate GPS random course headings?

Post by abishur »

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.

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Ultimate GPS random course headings?

Post by adafruit_support_carter »

I do a gps.fix_quality and a gps.fix_quality_3d. 3d returns nothing.
The 3D fix info is in the GSA sentence:
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
gsa.jpg
gsa.jpg (99.85 KiB) Viewed 78 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”