kopia lustrzana https://github.com/OpenRTX/OpenRTX
Add GPS altitude parsing
rodzic
3ea428e8f8
commit
b570f3b690
|
@ -51,6 +51,7 @@ typedef struct
|
||||||
sat_t satellites[12]; // Details about satellites in view
|
sat_t satellites[12]; // Details about satellites in view
|
||||||
float latitude; // Latitude coordinates
|
float latitude; // Latitude coordinates
|
||||||
float longitude; // Longitude coordinates
|
float longitude; // Longitude coordinates
|
||||||
|
float altitude; // Antenna altitude above mean sea level (geoid) in m
|
||||||
float speed; // Ground speed in km/h
|
float speed; // Ground speed in km/h
|
||||||
float tmg_mag; // Course over ground, degrees, magnetic
|
float tmg_mag; // Course over ground, degrees, magnetic
|
||||||
float tmg_true; // Course over ground, degrees, true
|
float tmg_true; // Course over ground, degrees, true
|
||||||
|
|
|
@ -51,6 +51,7 @@ void gps_taskFunc(char *line, int len, gps_t *state)
|
||||||
if (minmea_parse_gga(&frame, line)) {
|
if (minmea_parse_gga(&frame, line)) {
|
||||||
state->fix_quality = frame.fix_quality;
|
state->fix_quality = frame.fix_quality;
|
||||||
state->satellites_tracked = frame.satellites_tracked;
|
state->satellites_tracked = frame.satellites_tracked;
|
||||||
|
state->altitude = minmea_tofloat(&frame.altitude);
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue