Page 1 of 1

Mixed GPS acc unit/number

PostPosted: 01 Oct 2017, 09:58
by Holton181
Hi
Just noticed that, on my unit, the GPS acc has the unit in feet (ft) but the number is in meters.
I saw that I got a acc of 3ft in FiF while the best I ever got before with other apps is 3m.
So I compared with 'GPS Status' and 'Oruxmaps' and indeed got an acc of 3m, changed units and got 10ft.
I could even see the acc of 'GPS Status' in the Android status bar while I had FiF running, same numbers (3) but different units.

BR
/H

Re: Mixed GPS acc unit/number

PostPosted: 30 Dec 2017, 18:54
by kitercuda
FIF displays what it gets from Android.

Here is code

public static final float FEET_TO_M = 0.3048f;

if (location.hasAccuracy()) {
mACC_m = location.getAccuracy();
mACC_ft = mACC_m / FEET_TO_M;
}
else {
mACC_m = NONE_FVALUE;
mACC_ft = NONE_FVALUE;
}

Re: Mixed GPS acc unit/number

PostPosted: 30 Dec 2017, 21:41
by Holton181
Thank you for your answer.
Yes, according to the code you are showing fif really grabs the accuracy both as meters and (calculated) feets.
But how are the variables used later?
You can see in my first attached picture, with fif and GPS Status side by side, that both has an acc/error of 9 (I'm indoors). But fif gives 9ft while GPS Status gives 9m.
Screenshot_20171230-220359.png
Screenshot_20171230-220359.png (305.05 KiB) Viewed 8369 times


But if you have a look at my second image where I have changed the distance unit in fif to km (acc in m), you can see they still have same numbers, but also same unit
Screenshot_20171230-222050.png
Screenshot_20171230-222050.png (309.15 KiB) Viewed 8369 times


For comparison, fif in NM (acc ft) and GPS Status in ft
Screenshot_20171230-223444.png
Screenshot_20171230-223444.png (281.23 KiB) Viewed 8369 times


All pics are screen shots with split screen and the apps running simultaneously.
Same happens with Oruxmaps as the comparison app.
Something doesn't seem to work as intended


EDIT
I noticed you need to right click and "view image" to actually see the entire image, at least that's how I need to do it in Firefox.

Re: Mixed GPS acc unit/number

PostPosted: 16 Jan 2018, 14:52
by kitercuda
Thanks a lot. I have found the bug. Next upgrade will solve it.

Display unit:
switch (NavigationEngine.getDistDetailUnit()) {
case NavigationEngine.FEET: acc = NavigationEngine.mACC_ft; break;
case NavigationEngine.M: acc = NavigationEngine.mACC_m; break;
}
There was missing breaks, so it was always in meters.

Re: Mixed GPS acc unit/number

PostPosted: 16 Jan 2018, 15:19
by Holton181
Good to hear you found it.
Thanks!

Re: Mixed GPS acc unit/number

PostPosted: 16 Jan 2018, 21:42
by Holton181
I got a new update today, 20.24.
Was this bugfix suposed to be in this update?
It still only shows the meter accuracy even if unit is feet.

Re: Mixed GPS acc unit/number

PostPosted: 17 Jan 2018, 15:31
by kitercuda
The next one :-)

Re: Mixed GPS acc unit/number

PostPosted: 17 Jan 2018, 16:13
by Holton181
Excellent!

Re: Mixed GPS acc unit/number

PostPosted: 27 Jan 2018, 19:12
by kitercuda
20.25 should be OK...

Re: Mixed GPS acc unit/number

PostPosted: 27 Jan 2018, 19:40
by Holton181
It is :-)
Thanks!