GPS Update

This commit is contained in:
Thomas Göttgens
2022-11-10 22:21:07 +01:00
parent 87f7a60f71
commit 5c59c8d701
2 changed files with 4 additions and 12 deletions

View File

@@ -19,7 +19,7 @@
uint32_t printWPL(char *buf, const Position &pos, const char *name)
{
GeoCoord geoCoord(pos.latitude_i,pos.longitude_i,pos.altitude);
uint32_t len = sprintf(buf, "$GNWPL,%02d%10.7f,%c,%03d%10.7f,%c,%s",
uint32_t len = sprintf(buf, "$GNWPL,%02d%07.4f,%c,%03d%07.4f,%c,%s",
geoCoord.getDMSLatDeg(),
(abs(geoCoord.getLatitude()) - geoCoord.getDMSLatDeg() * 1e+7) * 6e-6,
geoCoord.getDMSLatCP(),
@@ -62,7 +62,7 @@ uint32_t printWPL(char *buf, const Position &pos, const char *name)
uint32_t printGGA(char *buf, const Position &pos)
{
GeoCoord geoCoord(pos.latitude_i,pos.longitude_i,pos.altitude);
uint32_t len = sprintf(buf, "$GNGGA,%06u.%03u,%02d%10.7f,%c,%03d%10.7f,%c,%u,%02u,%04u,%04d,%c,%04d,%c,%d,%04d",
uint32_t len = sprintf(buf, "$GNGGA,%06u.%03u,%02d%07.4f,%c,%03d%07.4f,%c,%u,%02u,%04u,%04d,%c,%04d,%c,%d,%04d",
pos.time / 1000,
pos.time % 1000,
geoCoord.getDMSLatDeg(),
@@ -87,12 +87,4 @@ uint32_t printGGA(char *buf, const Position &pos)
}
len += sprintf(buf + len, "*%02X\r\n", chk);
return len;
}
/*
(location.lat() - location.rawLat().deg) * 60,
double latMin = ;
*/
}