Browse Source

AP_GPS_GSOF: update for new GPS_FIX's

master
Michael Oborne 8 years ago committed by Francisco Ferreira
parent
commit
8e9f382240
  1. 20
      libraries/AP_GPS/AP_GPS_GSOF.cpp

20
libraries/AP_GPS/AP_GPS_GSOF.cpp

@ -275,20 +275,19 @@ AP_GPS_GSOF::process_message(void) @@ -275,20 +275,19 @@ AP_GPS_GSOF::process_message(void)
//Debug("POSTIME: " + posf1 + " " + posf2);
if ((posf1 & 1) == 1)
{
if ((posf1 & 1)) { // New position
state.status = AP_GPS::GPS_OK_FIX_3D;
if ((posf2 & 1) == 1)
{
if ((posf2 & 1)) { // Differential position
state.status = AP_GPS::GPS_OK_FIX_3D_DGPS;
if ((posf2 & 4) == 4)
{
state.status = AP_GPS::GPS_OK_FIX_3D_RTK_FLOAT;
if (posf2 & 2) { // Differential position method
if (posf2 & 4) {// Differential position method
state.status = AP_GPS::GPS_OK_FIX_3D_RTK_FIXED;
} else {
state.status = AP_GPS::GPS_OK_FIX_3D_RTK_FLOAT;
}
}
}
}
else
{
} else {
state.status = AP_GPS::NO_FIX;
}
valid++;
@ -346,7 +345,6 @@ AP_GPS_GSOF::process_message(void) @@ -346,7 +345,6 @@ AP_GPS_GSOF::process_message(void)
void
AP_GPS_GSOF::inject_data(const uint8_t *data, uint16_t len)
{
if (port->txspace() > len) {
last_injected_data_ms = AP_HAL::millis();
port->write(data, len);

Loading…
Cancel
Save