This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

position.toGeoString(Position.GEO_DMS) gives invalid result

Former Member
Former Member
When using one of my FIT files as a playback file to test my own app, the first events app.onPosition(info) provide an invalid info which does not translate into a valid position.

even after testing info and info.position for null, the function info.position.toGeoString(Position.GEO_DMS) returns

_ ____'__.__"______'__.__"




function onPosition(info)
{

if(( info != null )&&(info.position != null)&&(info.accuracy >= Position.QUALITY_POOR))
{
MyPos = info.position.toGeoString(Position.GEO_DMS);
}
}


I can understand, that the beginning of the FIT file contains some invalid info until the GPS quality reached a certain level. I just need to find a way to distinguish such invalid measurements from valid data points.
any hints ???

thanks so much
uwe
  • Really a question for the Connect IQ Developer forum but here's what do to: :)

    When playing back a .fit with 1 sec recordording, there could be readings attempted during a loss of GPS.

    When playing back, the lat and lon then are both 180 degrees in this case (IIRC). That's something you can check for and toss the bad readings. On a real watch, you want to pay attentions to the "quality" of the signal, but that doesn't change in the sim for this.