View previous topic :: View next topic |
Author |
Message |
nicofer
Joined: 01 May 2013 Posts: 90 Location: GRJ
|
Posted: Wed Dec 24, 2014 2:56 pm Post subject: GPS data filtering |
|
|
Hi
I am busy with a gps runner watch ( mega128 with a GTOP 16x16 mm gps ) - no fun in buying a working one
I can get all the parts working , oled display , sd card for track log , and all the other bits.
I do have a problem with the gps data .
When standing still the lat and long values tend to drift a bit ,as expected , and I have a filter to detect if the delta distance between 2 readings exceed the limit.
This seems to help to prevent false distance readings due to small changes when not moving.
The bigger problem is that at times the distance reading jump quite high when the signal is low or for what ever reason and then the total distance jumps up quite fast .
I notice Kalman filters are used for GPS but I cant seem to find a good working sample .
I also notice the MCS gps distance sample make use of DOUBLE precision , and code from another user make use of SINGLE precision . Which is better , good enough , for this application?
Any help to prevent this false readings would be highly appreciated.
Best wishes.
Nico |
|
Back to top |
|
|
bzijlstra
Joined: 30 Dec 2004 Posts: 1179 Location: Tilburg - Netherlands
|
Posted: Wed Dec 24, 2014 3:11 pm Post subject: Kalman filter |
|
|
Think you got the wrong section of the forum - AVR-DOS. But no problem...
There is a section AR7212 which handles things like Kalman filters.
Perhaps you can find the answer, or ask your question there.
Have fun
Ben Zijlstra |
|
Back to top |
|
|
nicofer
Joined: 01 May 2013 Posts: 90 Location: GRJ
|
Posted: Wed Dec 24, 2014 5:35 pm Post subject: |
|
|
Hi
Yes , I never even noticed I was in the AVR DOS section.
Thanks anyway - will check there
Cheers |
|
Back to top |
|
|
AdrianJ
Joined: 16 Jan 2006 Posts: 2483 Location: Queensland
|
Posted: Fri Dec 26, 2014 11:18 pm Post subject: |
|
|
You will often get big jumps in the GPS position, due to a whole range of effects, satellite low signal, handover from satelllite to satellite, reflections off nearby objects, etc.
Very often, the jump is confined to a single or few consecutive message groups. So you can set a threshold time as well as a distance, and only change the recorded position if the new position is changed for more than the threshold time ( or for more than some number of message groups ).
Another approach is to read also the GPS speed, which is measured by a totally different system than the position. Only change the position when both the position threshold is exceeded, and the current speed is above some threshold.
That tends to iron out almost all of the jumps. _________________ Adrian Jansen
Computer language is a framework for creativity |
|
Back to top |
|
|
JC
Joined: 15 Dec 2007 Posts: 584 Location: Cleveland, OH
|
Posted: Sat Dec 27, 2014 3:40 am Post subject: |
|
|
Also, make sure your GPS hasn't lost 3D GPS lock. When the signals are "weak" your GPS might switch to 2D mode, or totally lose lock.
You might chose to ignore any positions that are reported with les than 3D lock, or you might increase your threshold for believing there was a real change in position.
JC |
|
Back to top |
|
|
snipsnip
Joined: 10 Feb 2014 Posts: 74 Location: Melbourne
|
Posted: Sun Dec 28, 2014 10:32 am Post subject: Re: GPS data filtering |
|
|
nicofer wrote: |
I also notice the MCS gps distance sample make use of DOUBLE precision , and code from another user make use of SINGLE precision . Which is better , good enough , for this application?
Any help to prevent this false readings would be highly appreciated.
Best wishes.
Nico |
Found this from Adrian J link - http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=5897&highlight=gps+bearing
Quote: | Yes, that is the point. Because this formula uses always differences between the successive lats and lons, it computes the correct distance down to the limit of the resolution ( about 7 decimal dgits ) if using singles. That will give you around 10 m resolution. That is at least as good or better than an unaided GPS, so you dont introduce any further errors. Of course you can still use differential GPS, and doubles for the calcs, without any changes, to get even better accuracy. Its certainly true that at the short distances, you could switch over to use 'flat earth' calculations. But then you have to decide where to switch, and ensure you dont introduce glitches at those points. The quoted formula avoids all those problems.
_________________
| [/url][/code] |
|
Back to top |
|
|
nicofer
Joined: 01 May 2013 Posts: 90 Location: GRJ
|
Posted: Sun Feb 22, 2015 8:23 am Post subject: |
|
|
Hi
Regarding the pcb that was mentioned early January - well at last a few photos to show what is happening .
Sorry - wrong topic - tried to delete post
Cheers |
|
Back to top |
|
|
|