Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

GPS data filtering

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
nicofer

Bascom Member



Joined: 01 May 2013
Posts: 90
Location: GRJ

southafrica.gif
PostPosted: Wed Dec 24, 2014 2:56 pm    Post subject: GPS data filtering Reply with quote

Hi
I am busy with a gps runner watch ( mega128 with a GTOP 16x16 mm gps ) - no fun in buying a working one Wink

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
View user's profile
bzijlstra

Bascom Ambassador



Joined: 30 Dec 2004
Posts: 1179
Location: Tilburg - Netherlands

netherlands.gif
PostPosted: Wed Dec 24, 2014 3:11 pm    Post subject: Kalman filter Reply with quote

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
View user's profile Visit poster's website
nicofer

Bascom Member



Joined: 01 May 2013
Posts: 90
Location: GRJ

southafrica.gif
PostPosted: Wed Dec 24, 2014 5:35 pm    Post subject: Reply with quote

Hi
Yes , I never even noticed I was in the AVR DOS section.

Thanks anyway - will check there

Cheers
Back to top
View user's profile
AdrianJ

Bascom Expert



Joined: 16 Jan 2006
Posts: 2483
Location: Queensland

australia.gif
PostPosted: Fri Dec 26, 2014 11:18 pm    Post subject: Reply with quote

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
View user's profile Visit poster's website
JC

Bascom Member



Joined: 15 Dec 2007
Posts: 586
Location: Cleveland, OH

usa.gif
PostPosted: Sat Dec 27, 2014 3:40 am    Post subject: Reply with quote

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
View user's profile Visit poster's website
snipsnip

Bascom Member



Joined: 10 Feb 2014
Posts: 74
Location: Melbourne

australia.gif
PostPosted: Sun Dec 28, 2014 10:32 am    Post subject: Re: GPS data filtering Reply with quote

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
View user's profile
nicofer

Bascom Member



Joined: 01 May 2013
Posts: 90
Location: GRJ

southafrica.gif
PostPosted: Sun Feb 22, 2015 8:23 am    Post subject: Reply with quote

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
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum