Locus Map - forum

Support => Wishlist => Topic started by: franc on August 08, 2012, 22:46:51

Title: Minimize GPS-errors on Tracking
Post by: franc on August 08, 2012, 22:46:51
Hello

it happend some times to me, that I tried to track some hikes with Locus and my GPS module ran mad. I had some jumps to the ivory coast in africa which made the track worthless because of total km and speed etc.
I wonder why this cannot be handled by Locus with some calculations. E.g. the gps location can found with mobile station as well, so when suddenly I might go some 10.000 km in some seconds (going on a special rocket probably ;) Locus tracking could double check with the position of mobile data provider, which is not exact but much better than those big gps-errors of the module.

Couldn't it be developed, that I have a setting, e.g.: "Don't allow unrealistic GPS-positions"?
Maybe with even some parameters like max. realistic speed, max realistic distance, etc.

I think this would help to make the tracking of Locus much better and more special.
At the moment I don't use Locus tracking because it uses nearly double the power than MyTracks, but if the tracking were much better, I would accept it.

Thank you.

frank
Title: Re: Minimize GPS-errors on Tracking
Post by: Menion on August 08, 2012, 23:28:12
hmm weird, there already checking for such nonsenses. I'll check it once more tomorrow. is this happening to you often? I'm sure you know, that you can simply delete such wrong points after recording anyway I of course agree that this should not happen in any cases
Title: Re: Minimize GPS-errors on Tracking
Post by: franc on August 08, 2012, 23:43:26
Sometimes this happens, I have to reboot my phone then, after it won't happen for a while. I think this is a combination of OS and GPS-module of my sgs2, but I don't know.

I never tried to edit tracks in Locus, as I normally use MyTracks to track. I measured both in battery consumption and detected that Locus tracking is nearly the double. Is this wellknown or maybe an error in my measurement?
But when my gps-module starts to run mad it is not much sense to edit anything, because I won't get reasonable values after it once start to fly to africa ;)
Title: Re: Minimize GPS-errors on Tracking
Post by: Menion on August 09, 2012, 20:41:29
I'm checking code in Locus and I already have there protection against these faults. There is check that test speed needed to move from last to current location (so just distance-diff / time-diff). Testing value is 3000 m/s, anyway errors you talk about are much bigger right?

Would you be so kind and record for me NMEA message with such error from one of your rides? In NMEA message (enable this in GPS settings, file will be stored in data/NMEA) will be all raw data from GPS so I can simulate exactly whole your ride. Thanks!!
Title: Re: Minimize GPS-errors on Tracking
Post by: tommi on August 09, 2012, 20:49:55
Quote from: "menion"There is check that test speed needed to move from last to current location (so just distance-diff / time-diff). Testing value is 3000 m/s,
Hi Menion, 3000m/s = 10800km/h. Did I miss an invention? Or is Locus elected to be part of the instruments for the next mars mission  :lol: ?
Btw. I tried GPS in a flying airplane, though some satellites were found, there was no sync. Do you know the speed limits? Is it a restriction of the chip or are there limitations in the algorithms in the used application software?
Title: Re: Minimize GPS-errors on Tracking
Post by: Menion on August 09, 2012, 21:08:37
hmm I was just thinking that no-one will move faster then 10800km/h with locus and track recording, or am I wrong? :D Anyway when GPS send data every sec, so then I expect (and also as I saw on some screen), these errors are really huge and not just below 3km/s ...

btw. I've had never fly, so don't know :) I hoped that I'll test it soon also, but you say it not work in airplane? damn ...
Title: Re: Minimize GPS-errors on Tracking
Post by: franc on August 09, 2012, 22:22:10
Did you get my nmea file? I sent it per mail ("track to africa"). I thought I posted it here, but don't find the post now.

I flew once with activated GPS module and tracking (the great App "GPSLogger" on a BlackBerry 8900) beside the fact that the module had an maximum altitude which was much fewer than the real one, the tracking was sucessful. Speed and location was correct.
I was near the window and had the phone hidden in my pillow, which I pressed to the window, as it is strictly forbidden to use smartphones, any phones in the plane nowadays. Only laptops with sim-card and HSPA, BT, WiFi etc ;)
Title: Re: Minimize GPS-errors on Tracking
Post by: Menion on August 10, 2012, 08:44:53
thanks, NMEA received ...

your GPS has definitely some problems. Correct NMEA message line with coordinates should looks like

$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47
since begin, you have in this NMEA such values, but in the middle, log is full of nonsenses, where instead of 4807.038, you have 4807,038 so data are useless because "," is used for separating values

I'll anyway try to check usable data that are included. Next report will come soon ...
Title: Re: Minimize GPS-errors on Tracking
Post by: franc on August 10, 2012, 08:58:47
Thank you!
Quote from: "menion"...your GPS has definitely some problems. ...
Time for a new phone  ;)
Title: Re: Minimize GPS-errors on Tracking
Post by: Menion on August 10, 2012, 09:47:41
this will be probably problem of software, not directly GPS device. If you use some custom ROM, suggest to change it :)

---

after some testing: damn, there is so many weird jumps. Just check from line 32486. Suddenly there is 0 latitude, after a while 12, after a while 13 ... wtf? ... somewhere in the middle I see again 25

PS: and just my personal note: I still don't had in hands better phone then SGS2 ;)
Title: Re: Minimize GPS-errors on Tracking
Post by: PeterPablo on August 10, 2012, 12:36:34
I experienced the very same issues serveral times, when using Locus Pro but never came around to report the bug. I have a SII with original ROM 4.0.3. I can not send you such a bad track, since I deleted all of them. Post-processing was no option for me.

The fastest airplane for public transportation used to be the Concorde (http://en.wikipedia.org/wiki/Concorde (http://en.wikipedia.org/wiki/Concorde)). According to wikipedia the top-speed was around 2200 km/h. So you should be safe by setting the threshold to 2500 km/h.

Hopefully you suceed in adapting your NMEA-parser to also cope with different seperators and filter out some nonesense values like extreme jumps in lat / long (in addition to your distance-check).

Thank you!
Title: Re: Minimize GPS-errors on Tracking
Post by: PeterPablo on August 13, 2012, 11:25:34
Yesterday I observed again of the above described glitch. One point jumped a couple of hundred km south-south-west of my position. This happened while I had bad GPS reception. In case you are interested in the recorded track-file I will gladly send it to you via email.

Peter
Title: Re: Minimize GPS-errors on Tracking
Post by: Menion on August 13, 2012, 11:47:48
problem for me, is that I wanted NMEA record from franc, but seems that his device also store incorrect NMEA messages so it's not possible to use it for testing. You can send me you file, or you may check for me what values are at this weird point compare to previous and next recorded points. Like speed, altitude, etc. Or I can check it by myself if you may export it to GPX file for me, thanks!
Title: Re: Minimize GPS-errors on Tracking
Post by: PeterPablo on August 13, 2012, 13:50:01
I sent you the exported track via email. I had NMEA messages disabled but switched them on now.
Title: Re: Minimize GPS-errors on Tracking
Post by: Menion on August 13, 2012, 13:52:34
Peter, thanks for track!

hmm seems that these values are much long-time ... I think, that it's not one location with wrong location and next second good location again (as I expected), but ...

here is example from your track

1. location 17:27:54
2. location after 52seconds! in 17:28:46, distance to previous 125km (so it's 2400m/s, or 8650kmph)
3. location after another 40s! in distance 119km (2975m/s)

this third location is anyway in distance 6km to first location (time diff is 92s, it's 230kmph) so it's almost real

I'll then try to create better checking - "double check" :) firstly compare current location to last valid (treshold will be reduced to some more real value - like you said 2500km/h) and then also check new location to previous invalid location. We'll see if this helps anyway I'm little worried that still some weird location will pass through
Title: Re: Minimize GPS-errors on Tracking
Post by: franc on August 13, 2012, 13:57:58
Quote from: "menion"...treshold will be reduced to some more real value - like you said 2500km/h...h
Oh, why not a more realistic and lower value, or, much better, a setting for max. allowed jump?
Or just a setting for this whole checking?
Then the few rockenauts can track their ride to mars ;)
Title: Re: Minimize GPS-errors on Tracking
Post by: Menion on August 13, 2012, 14:44:33
I'm not big fan of new un-needed settings. I think this should be solved by any clever algorithm, that will remove such nonsences. I've added some more checking so we'll see. In case, that in some track will be again such problem (probably smaller but will be), send me it on email
Title: Re: Minimize GPS-errors on Tracking
Post by: PeterPablo on August 13, 2012, 15:53:03
Menion, I think your argumentation is reasonable. And what you implented now, seems is what I suggested in this thread: "filter out some nonesense values like extreme jumps in lat / lon" ..between two succeeding points.

Your current approach was useless because due to bad gps-reception it took a rather long time until the next valid point came in. This then reduced the "virtual speed", as you already noticed.

We will see, wether your new approach is sufficient :-)
Title: Re: Minimize GPS-errors on Tracking
Post by: PeterPablo on August 14, 2012, 08:18:06
Yesterday I created a log with "OSMTracker" and experienced the same issue. Sot it is not only you, who has problems with "jumping" of gps-positions.
Title: Re: Minimize GPS-errors on Tracking
Post by: franc on August 14, 2012, 08:25:11
It happend twice to me, that I logged at the same time with MyTracks and Locus (I wanted to compare the battery consumption) and this jump happened.
Maybe if more than one App uses the GPS module the risk for these errorous jumps are higher, but I didn't dare to suspect it this way.
Title: Re: Minimize GPS-errors on Tracking
Post by: Menion on August 14, 2012, 10:52:14
hmm test version if you want to check https://dl.dropbox.com/u/8015949/Locus% ... .5.6.4.apk (https://dl.dropbox.com/u/8015949/Locus%20%28dev%29/test_versions/2.5.6.4.apk)
Title: Re: Minimize GPS-errors on Tracking
Post by: PeterPablo on August 14, 2012, 13:17:39
Since I am abroad the next couple of weeks with uncertain internet access I will refrain from installing this test-version. Or is it save to install it side-by-side?
Title: Re: Minimize GPS-errors on Tracking
Post by: Menion on August 14, 2012, 13:22:06
you have also Pro version? Then there will be no problem, just don't try to use them both at once! If you normally use Free version, then rather wait till you'll be home because this test version install over Free version (and also is valid only till end of August)
Title: Re: Minimize GPS-errors on Tracking
Post by: PeterPablo on August 15, 2012, 00:10:05
Yes I am a pro user since five minutes after first app-start ;-)
Ok, then I will give it a shot :-)
Title: Re: Minimize GPS-errors on Tracking
Post by: franc on August 18, 2012, 16:29:52
I installed this beta, tracked oncely but naturally there was no jumping. To test this, I think I would need to track many times. Much more than only several times, because the jumping happens not often.
And endly, how would I know that the gps module jumped while tracking if locus fixes it? Would I even recognize it anyways?
I don't want to track too often with locus, because it uses more battery anyway.
Title: Re: Minimize GPS-errors on Tracking
Post by: Menion on August 18, 2012, 21:18:35
hmm no jumps, fine :)

If it will works fine, then you'll not recognized any jumps. That's the point isn't it? Anyway there still should be some small jumps, not so visible on first sight. I anyway think that it's some software problem, not hardware. Didn't you think about update to Android 4?
Title: Re: Minimize GPS-errors on Tracking
Post by: franc on August 19, 2012, 11:21:20
Quote from: "menion"...If it will works fine, then you'll not recognized any jumps. That's the point isn't it?...
I won't know if there are no jumps because of missing faults of the gps module (or OS software as you thought), or because of the new algorythm in locus. Only if you put some debug message for this case, but I guess you didn't?
And then I guess I had to run the tracking at least for some days again and again to trigger a faulty jump. Like I said, it is not often.

Quote from: "menion"... Didn't you think about update to Android 4?
No, update to Android 4 is not yet an option at all. My OS 2.3.5 works fine, I have nearly no problems with it, very rare only it crashes. Will this be with 4.x the same?
What is the big advantage?
At the moment often I can read in Apps Updates something like "fixed an error for Android 4, made compatible with Android 4, ..." etc. That means, that I could make an OS update in a year or so and then I could hope that all apps are running flawless and stable on 4.x. At the moment I am pretty sure, that this day (or likely more than a day) of work to do this OS update (and all the installing afterwords) is it not worth.
It is nice to have a new GUI but it is much nicer to have a stable system where everything is just working :)
Title: Re: Minimize GPS-errors on Tracking
Post by: Menion on August 20, 2012, 15:05:38
no, there is no error message. Incorrect locations are just ignored ...

about "fixed an error for Android 4, made compatible with Android 4" ... i think it's not that bad. It's just another reason for app publishers, how to update their app on market without any change. They just write this :). I think that 99% of apps will not cause any problems. Many people here on forum use SGS2 updated to 4.X android, and I'm sure that most of them may confirm that all apps works correctly
Title: Re: Minimize GPS-errors on Tracking
Post by: franc on August 20, 2012, 15:42:28
Quote from: "menion"no, there is no error message. Incorrect locations are just ignored ...
I thought it.

Quote from: "menion"...It's just another reason for app publishers, how to update their app on market without any change. They just write this :) ...
Are you sure about this? Why should they do it? People get angry if they have an update every second day because it is time and traffic consuming.

But anyway, can you tell me why I should update my nearly perfect 2.3.5?
Only because it can be, that the rare gps module faults are a software issue? Nobody will guarantee that it will be flawless on 4.x

I had the discussion some weeks ago with a friend, he has an sgs2 as well and we agreed that we won't change the since yet winning 2.3.5-team :)
Read comments about people who updated and you will find more disappointed posts.
E.g. Titanium Backup apparently doesn't restore all apps, what means that I would have to manually setup many apps I might need, which is a timey thing.

EDIT: I will update to 4.x when the first app needs 4.x as minimum OS.
Title: Re: Minimize GPS-errors on Tracking
Post by: franc on August 22, 2012, 19:15:01
Yesterday I tracked with this Beta and stopped tracking. Some hours later I resumed the same track and my gps found the first two tracking locations 132 km away from where I was, this was tracked by locus beta.
Five seconds later the right point was found and tracked, which made my speed to 26400 m/s. I guess this should not be possible with the new algorythm (even not with the old one).
But looking into my nmea dir I don't find any nmea file from 21.8.2012.
Maybe it has to do with a crashing of locus beta yesterday.

This is a part around the weird tracking from the gpx:

...
<trkpt lat="51.321929" lon="9.433191">
<ele>260.97</ele>
<time>2012-08-21T13:04:42Z</time>
<pdop>15.00</pdop>
<course>170.000</course>
<speed>1.65</speed>
</trkpt>
<trkpt lat="51.321699" lon="9.433097">
<ele>262.16</ele>
<time>2012-08-21T13:05:00Z</time>
<pdop>10.00</pdop>
<course>187.000</course>
<speed>1.13</speed>
</trkpt>
</trkseg>
<trkseg>
<trkpt lat="52.064054" lon="7.967058">
<ele>261.60</ele>
<time>2012-08-21T17:24:33Z</time>
<pdop>50.00</pdop>
<course>229.000</course>
<speed>24.52</speed>
</trkpt>
<trkpt lat="52.063354" lon="7.965397">
<ele>261.60</ele>
<time>2012-08-21T17:24:39Z</time>
<pdop>50.00</pdop>
<course>230.000</course>
<speed>24.33</speed>
</trkpt>
<trkpt lat="51.319144" lon="9.440504">
<ele>65.40</ele>
<time>2012-08-21T17:34:44Z</time>
<pdop>50.00</pdop>
<course>172.000</course>
<speed>0.00</speed>
</trkpt>
<trkpt lat="51.318121" lon="9.440638">
<ele>230.46</ele>
<time>2012-08-21T17:34:50Z</time>
<pdop>25.00</pdop>
<course>258.000</course>
<speed>0.00</speed>
</trkpt>
...
Title: Re: Minimize GPS-errors on Tracking
Post by: franc on August 28, 2012, 17:53:36
Is this information relevant or should I better forget about it?
Now as a new version of Locus is out.
I think the beta stops working end of august anyway so I can uninstall it, do I?
Title: Re: Minimize GPS-errors on Tracking
Post by: PeterPablo on September 05, 2012, 10:24:25
The new final version of the app worked fine for me. Thank you!

I had another idea concerning this problem: You could additionally check the acceleration (second time-derivative) in order to further improve robustness, if some people still encounter problems.
Title: Re: Minimize GPS-errors on Tracking
Post by: franc on September 26, 2012, 12:00:16
Quote from: "franc"... I will update to 4.x when the first app needs 4.x as minimum OS.
Now I have CM10 and I struggle with not anymore working USB-Support.
Title: Re: Minimize GPS-errors on Tracking
Post by: tommi on September 27, 2012, 22:43:17
Quote from: "franc"
Quote from: "franc"... I will update to 4.x when the first app needs 4.x as minimum OS.
Now I have CM10 and I struggle with not anymore working USB-Support.
You're funny, franc.
First long ongoing discussion why you won't update to stock 4.0 and stay with 2.3 and then update to non-stock early beta 4.1!?

What actually do you mean with USB-Support? You don't get it connected as USB device to a PC?
My son is using CM10 on the SGSII as well (he is very curious and currently playing a lot with different ROMs, kernels, etc. I could check with him if he has a similar problem.
Title: Re: Minimize GPS-errors on Tracking
Post by: franc on September 27, 2012, 23:06:54
Hello
It was maybe a mistake to install this new OS.
It made me a lot of work.
And indeed there are some apps not working with JellyBean.
But CyanogenMod or stock Rom is not that difference.
I didn't want to install an OS which is soon again out of date.

My problem with the USB is surely related to my PC (Windows XP SP3, not the newest one) because the phone is working with Mac OSX, both memory cards are working there.
EDIT: and even with Windows Vista 64 it is working!

Thank you for the offer to help anyway !

At least locus is working without problems ;)

Frank
Title: Re: Minimize GPS-errors on Tracking
Post by: tommi on September 27, 2012, 23:19:44
Quote from: "franc"Hello
It was maybe a mistake to install this new OS.
It made me a lot of work.
And indeed there are some apps not working with JellyBean.
But CyanogenMod or stock Rom is not that difference.
Just talked to my son: he definitely cannot confirm that there is "not that difference" according to his experience with Samsung Android 4.0.4 compared to CM9 and so I think there is a lot of difference between JB delivered by Google and (not yet available) JB by Samsung. But anyway there are rumours that Samsung will deliver JB as well.
But I think we should stop the discussion now as it is going really out of scope (at least from my side  :D )
Have fun with Locus on any Android version!
Title: Re: Minimize GPS-errors on Tracking
Post by: franc on October 08, 2012, 08:46:50
Quote from: "tommi62"...he definitely cannot confirm that there is "not that difference" according to his experience with Samsung Android 4.0.4 compared to CM9 and so I think there is a lot of difference between JB delivered by Google and (not yet available) JB by Samsung. ...
So maybe it is indeedly an incompatibility between CM10 and the driver for Windows XP OS as I cannot connect to two different XP-machines but to Mac and Vista.

But you are right, this becomes off-topic, I stop it. Thank you anyway for the hints.

edit:
To bring this to a point, I have to tell that I switched back to 2.3.5 after about a week.
CyanogenMod 10 (4.1.1) is yet not very stable and it was a big error of mine not to read enough about it and just installing it. I had to read later much more ;-)

What I said before, that there is no reason to change a perfect running system (OS 2.3.5) with a new and not totally compatible system was exactly right. I was too curious and this was a mistake.
Your son was very right as well, saying that CyanogenMod 10 (4.1.1) is not the same as the stock ROM.
Not at all!
I know it now and I had to pay this knowledge with many hours of struggle with the buggy OS.
Blame on Samsung not giving their sources.

Maybe I will update when the JellyBean stock ROM for SGS2 is available (with root).

At least locus did work flawlessly on CM 10 :-)
Title: Re: Minimize GPS-errors on Tracking
Post by: franc on January 17, 2013, 17:19:49
Still on 2.3.5, because JB for Samsung Galaxy S2 (stock) is only coming maybe March or April 2013 along the rumors ;)

My problem with the USB was indeedly a personal XP problem. There was a inf-file that was missing on that PC, I discovered it after a lot of search.

But back to the initial problem with the GPS errors: I never had any of those africa-jumps in the last months.
I tracked the last two weeks (in CSR) on a hike every day and never had a problem.
But I tracked with MyTracks, this needs less battery as Locus tracking (about the half, I guess), but these errors are not related to Locus anyway.

frank