|
|
@ -132,7 +132,7 @@ static NOINLINE void send_extended_status1(mavlink_channel_t chan, uint16_t pack |
|
|
|
control_sensors_present |= (1<<2); // compass present |
|
|
|
control_sensors_present |= (1<<2); // compass present |
|
|
|
} |
|
|
|
} |
|
|
|
control_sensors_present |= (1<<3); // absolute pressure sensor present |
|
|
|
control_sensors_present |= (1<<3); // absolute pressure sensor present |
|
|
|
if (g_gps != NULL && g_gps->status() == GPS::GPS_OK) { |
|
|
|
if (g_gps != NULL && g_gps->status() >= GPS::NO_FIX) { |
|
|
|
control_sensors_present |= (1<<5); // GPS present |
|
|
|
control_sensors_present |= (1<<5); // GPS present |
|
|
|
} |
|
|
|
} |
|
|
|
control_sensors_present |= (1<<10); // 3D angular rate control |
|
|
|
control_sensors_present |= (1<<10); // 3D angular rate control |
|
|
@ -225,7 +225,7 @@ static void NOINLINE send_location(mavlink_channel_t chan) |
|
|
|
// positions. |
|
|
|
// positions. |
|
|
|
// If we don't have a GPS fix then we are dead reckoning, and will |
|
|
|
// If we don't have a GPS fix then we are dead reckoning, and will |
|
|
|
// use the current boot time as the fix time. |
|
|
|
// use the current boot time as the fix time. |
|
|
|
if (g_gps->status() == GPS::GPS_OK) { |
|
|
|
if (g_gps->status() >= GPS::GPS_OK_FIX_2D) { |
|
|
|
fix_time = g_gps->last_fix_time; |
|
|
|
fix_time = g_gps->last_fix_time; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
fix_time = millis(); |
|
|
|
fix_time = millis(); |
|
|
@ -289,15 +289,10 @@ static void NOINLINE send_hwstatus(mavlink_channel_t chan) |
|
|
|
|
|
|
|
|
|
|
|
static void NOINLINE send_gps_raw(mavlink_channel_t chan) |
|
|
|
static void NOINLINE send_gps_raw(mavlink_channel_t chan) |
|
|
|
{ |
|
|
|
{ |
|
|
|
uint8_t fix = g_gps->status(); |
|
|
|
|
|
|
|
if (fix == GPS::GPS_OK) { |
|
|
|
|
|
|
|
fix = 3; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mavlink_msg_gps_raw_int_send( |
|
|
|
mavlink_msg_gps_raw_int_send( |
|
|
|
chan, |
|
|
|
chan, |
|
|
|
g_gps->last_fix_time*(uint64_t)1000, |
|
|
|
g_gps->last_fix_time*(uint64_t)1000, |
|
|
|
fix, |
|
|
|
g_gps->status(), |
|
|
|
g_gps->latitude, // in 1E7 degrees |
|
|
|
g_gps->latitude, // in 1E7 degrees |
|
|
|
g_gps->longitude, // in 1E7 degrees |
|
|
|
g_gps->longitude, // in 1E7 degrees |
|
|
|
g_gps->altitude * 10, // in mm |
|
|
|
g_gps->altitude * 10, // in mm |
|
|
|