Running the FIT file through the simulator, gives me some weird data.
I am not sure if it is an actual GPS issues (I am in the water while recording the activity) or if it is a simulator issue.
Two things are unclear.
- info.elapsedDistance jumps thousands of meters
- lat and lon go to 180.000000 and speed to 0.000000
Here a sample. This is sequential, reading every second trough compute():
Speed = 0.000000 and Dist = 39.939667
17.841495 and -101.769442
Speed = 5.643202 and Dist = 40.323082
17.841487 and -101.769498
Speed = 7.020412 and Dist = 42.246140
17.841488 and -101.769535
Speed = 7.557860 and Dist = 43.721672
180.000000 and 180.000000
Speed = 0.000000 and Dist = 45.430229
180.000000 and 180.000000
Speed = 0.000000 and Dist = 2819874.750000
180.000000 and 180.000000
Speed = 0.000000 and Dist = 2819874.750000
180.000000 and 180.000000
Speed = 0.000000 and Dist = 2819874.750000
Is this normal?
Assuming it is, I am trying to eliminate the condition of lat (and lon) and 180.000000
My coding skills are lacking here. Can't seem to create an if situation where it works.
I tried all these, none seems to work:
if(info.currentLocation != null){
var temp = info.currentLocation.toDegrees()[0];
if (temp < 180){
Sys.println("Testing if");
lat = info.currentLocation.toDegrees()[0];
lon = info.currentLocation.toDegrees()[1];
}
}
I also tried:
if (temp != 180.000000)
if (temp != "180.000000")
if (temp < 180.000000)
And then I tried :
if(info.currentLocation != null){
lat = info.currentLocation.toDegrees()[0];
lon = info.currentLocation.toDegrees()[1];
}
if (lat != 180.000000)
if (lat != "180.000000")
if (lat < 180.000000)
if (lat < 180)
None seems to work.