Questions and discussion about the geolocalization features of the TD RF modules.
disk91
 
Posts: 58
Joined: Thu May 07, 2015 4:30 pm

GPS Sleep mode and sync loss

by disk91 Wed Jun 03, 2015 8:48 pm

On a first fix I need about 90s to get acceptable hdop. Then I'm able to fix in about 10s but when I'm sleeping long time, the precision decrease and after a whil I need to go back on a 90s resync. I assume the sync is lost after a certain timing when the GPS sleep is sleeping. As I have long sleep periods (30 minutes).

My question is : what is the best recommandation in term of sync loss and resync ? I'm looking for a compromize between hlimiting energy loss and ensure I'll be fix every time...

My initial strategy : 90s then 15s until 8 consecutive loss, then 90s ...
My current strategy : 90s then 10s until 1st loss of hdop > 400 then 20s then back to 10s

Does anyone have a strategy to share ?
Paul / disk91
User avatar
lcheminade
 
Posts: 146
Joined: Mon May 11, 2015 7:47 am

Re: GPS Sleep mode and sync loss

by lcheminade Thu Jun 04, 2015 11:04 am

Hi,

Quick reminder of how the GPS works in order to find the best strategy for your application.


Ephemeris

To compute its position a gps receiver needs to know the position of the satellites in the sky. To allow a receiver to compute its position, each satellite keeps broadcasting ephemeris data. These ephemeris data are divided into 5 subframes of 6s each. To properly download this data, the signal level during the download must be higher than -148dB. If at any point the signal goes over -148dB, the current subframe is lost. To compute the satellite position, the receiver actually needs the first 3 of the broadcasted subframes, the last 2 now being useless.


Position

To compute its position, the receiver needs 4 satellites ephemeris and signal. If only 3 satellites are in view then the equation is solved assuming altitude = 0 thus including some potentially large errors.


Precision

Position accuracy (HDOP) will mainly depend on the satellites position in the sky.

http://en.wikipedia.org/wiki/Dilution_of_precision_(GPS)

HDOP will only tell you how likely to be precise your position is. Still the position can be great with a bad hdop and bad with a good HDOP. This is just less likely.


Accuracy

HDOP gives you precision, not accuracy! Accuracy is unknown and depends on the signal path. Reflection (agains building for example) is the main factor of innacuracy. Ionospheric parameters also play a small part into it. Basically if your signal does not go straight from the GPS to your receiver then you will get some innacuracy. The only way to improve accuracy is to improve the sky view. Accuracy does not depend on the signal strength, only the fix time does.



Fix examples

Best case ever (gps repeater)
Lots of satellites in view with great signal. 4+ of them start to broadcast their first subframe right after your switched the GPS on. You will download the first 3 subframes for four satellites right away. Fix time = 3*6s = 18s


Good case (clear sky view)

5+ satellites in view with good signal. Most of the sallites are broadcasting one of the first 3 subframes when you switched the GPS on. You need to wait until this subframe is broadcasted again. Fix time = 5*6s = 30s.


Bad case (bad sky view or moving)

4 satellites in view with signal around -148dB. Let's assume the receiver downloaded 3 subframes of 3 satellites but only 2 from the last satellite. While downloading the third subframe the signal goes below -148dB (because you're moving and there was a building or because the signal level is moving aroud -148dB). The subframe is lost and you will need to wait 30s to download it again. Still if the signal goes low again when downloading this subframe you will need to wait another 30s, etc etc. Fix time: depends on how lucky you are and on your signal level.



SDK & strategy

After downloading ephemeris from a satellite, they will be saved if the receiver is set into hardware backup mode. Ephemeris validity is 4h. After such a time the satellite position can not be computed accurately anymore.

Moreover this is not because you downloaded the ephemeris of a satellite and went to sleep during 1h that this satellite will be in view at that time. Let's imagine you've downloaded ephemeris for 4 satellites and went to sleep for 1h. If when waking up you only see 3 of this satellites in the sky, then you will need to download again ephemeris for a 4th satellites which can take up to 30s.

One last thing before going to hardware backup is to make sure that the fix->hard.rtc_calibrated field is set to true. This should take no more than 1 or 2s after the fix is made and will allow the GPS to calibrate its RTC. This can take hot fix from 10s down to 1s.



Hope that will help!

Loïc
disk91
 
Posts: 58
Joined: Thu May 07, 2015 4:30 pm

Re: GPS Sleep mode and sync loss

by disk91 Thu Jun 04, 2015 9:04 pm

Sure it helps, thanks a lot Loic !
disk91
 
Posts: 58
Joined: Thu May 07, 2015 4:30 pm

Re: GPS Sleep mode and sync loss

by disk91 Thu Jun 04, 2015 9:52 pm

I can add an important point : fix->stats.usabled is an interesting way to test in the first loops if you have a GPS coverage or not.
Return to Geolocalization

Who is online

Users browsing this forum: No registered users and 12 guests