mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 02:32:23 +00:00
GPS Update
This commit is contained in:
@@ -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 = ;
|
||||
|
||||
*/
|
||||
}
|
||||
Reference in New Issue
Block a user