Hi there,
i am trying to find the problem why this code is not working:
if (currentFix.valid.location)
{
currentLat = currentFix.latitude(), 8;
currentLon = currentFix.longitude(), 8;
if ((currentLat != prevLat) && (currentLon != prevLon))
{
if (hadFix) //prevent 0 prevFix with current location the first time it has a fix
{
distA = distA + currentFix.location.DistanceKm(prevFix.location);
}
prevLat = currentLat;
prevLon = currentLon;
hadFix = true;
}
}
else
{
Debug.println(", no Location currentFix!");
Serial.println(", no Location currentFix!");
}
i am getting a number for distA wich is growing, but the weird thing is, that this number is crazy high - it starts at around 500.000 and raises each second for around 10.000. waht is this - a wrong unit? or am a doing sth else strange? prevLat, prevLon, currentLat, currentLon are float values.
If you have any idea what is going on there i would be really happy to hear it ;)
Hi there, i am trying to find the problem why this code is not working:
i am getting a number for distA wich is growing, but the weird thing is, that this number is crazy high - it starts at around 500.000 and raises each second for around 10.000. waht is this - a wrong unit? or am a doing sth else strange? prevLat, prevLon, currentLat, currentLon are float values.
If you have any idea what is going on there i would be really happy to hear it ;)
Thank you so much,
pcace