Someone can help me to solve a problem with decimal accuracy loss.
Well, Im using a V0 pin to store a double value with 6 decimals, then when my device is off-line and reconnect I restore de value V0 from server but the value loss precision up to 2 decimals rounded value.
Im using Blynk.virtualWrite(V0, setLat, setLon) to store GPS location in a server, then when hardaware loss connection (off-line) and reconnect, i use to sync
these are before value Latitud:40.520695Longitud: -3.898539 and these are after value Latitud:40.521000Longitud: -3.899000, restored fron V0
BLYNK_CONNECTED() {.
//get data stored in virtual pin V0 from server
Blynk.syncVirtual(V0);
}
// restoring locatopm Gps from server V0
BLYNK_WRITE(V0)
{
//restoring double latAlert and lonAlert values
Serial.print(“Recupero posicion!!!”);
latAlert = param[0].asDouble();
lonAlert = param[1].asDouble();
}
When I restore latAler and lonAlert, they have lost precision
In this way I can test another little “bug”, when send location values to Map Widget through Blynk.location() method
the lat and lon values are rounded to 3 decimals showing always incorrect position. GPS cordinates need 6 decimals to work fine.