Fenix3-V5.00 bug: info.currentLocation.toGeoString

Former Member
Former Member
I have been able to reproduce a very strange bug related to info.currentLocation.toGeoString on Fenix3-V5.00 using the minimal SimpleDataField below:
using Toybox.WatchUi as Ui;

class testView extends Ui.SimpleDataField {

function initialize() {label = "test";}

function compute(info) {
if( info.currentLocation != null ) {
var pos = info.currentLocation.toGeoString(3);
var sig = info.currentLocationAccuracy.toString();
var res = "".format("S$1$: $2$", [sig,pos]);
return res;
} else {
return "No Signal";
}
}
}

If you run this code in the Eclipse simulator for Fenix3 (SDK 1.2.1) and apply (simulation -> Fit Data -> Simulate Data) you will get a correct output string like "S4: 15S UD 4730506232" as demonstrated in the following screen shot.

The initial tag "S4" Indicates good GPS signals.

If I do the following on my Fenix3-V5.00 the result is VERY strange:
1) On F3: Settings -> System -> Restore Defaults (very painful!!!)
2) Install the pkg of above code on F3 and add the test field to a GPS enabled activity like "Hike".
3) Start the activity in an area of good GPS signals.
The test field now may looks like "S4: 32V NF 0000000000" as displayed in the following photo of my F3.

Note that all the digits are 0 despite the good GPS signal indicated by S4.

Now the fun part starts:
4) Without stopping the activity enter the following setting of F3: Settings -> System -> Pos. Format -> UTM UPS
5) Go back to the activity screen. Now the test field is correct like: "S4: 32V NM 9779043825". The zeros have been replaced by the correct values as displayed in the photo below.
6) Without stopping the activity switch back the setting to the default value: Settings -> System -> Pos. Format -> hddd.mm.mmm and the output is still correct!

Hence step 1) is essential to produce the bug in the toGeoString method. This bug has the implication that my UTM100 app only display zeros if the end user has never altered the Pos. Format setting.

According to the API docs there are no information that the result of info.currentLocation.toGeoString(3) should depend on default pos.format settings at all. IMHO the result should not depend on default settings.

For the end users of UTM100 it would be nice if this Fenix3-V5.00 bug can be fixed soon.

Thanks for your time!
  • Thanks for the report! I've seen something similar to this, and I feel like it may be related. Previously, something similar would occur when doing something like this:

    string = posnInfo.position.toGeoString(Position.GEO_MGRS);

    I'll create a new bug report, but link the older one for reference, and hopefully we can get this resolved soon.