Browse Source

AP_HAL_SITL: change NMEA output to use new macro

mission-4.1.18
Francisco Ferreira 6 years ago committed by Andrew Tridgell
parent
commit
0e33907cf7
  1. 2
      libraries/AP_HAL_SITL/sitl_gps.cpp

2
libraries/AP_HAL_SITL/sitl_gps.cpp

@ -674,7 +674,7 @@ void SITL_State::_update_gps_nmea(const struct gps_data *d, uint8_t instance) @@ -674,7 +674,7 @@ void SITL_State::_update_gps_nmea(const struct gps_data *d, uint8_t instance)
d->have_lock?_sitl->gps_numsats:3,
2.0,
d->altitude);
float speed_knots = norm(d->speedN, d->speedE)*1.94384449f;
float speed_knots = norm(d->speedN, d->speedE) * M_PER_SEC_TO_KNOTS;
float heading = ToDeg(atan2f(d->speedE, d->speedN));
if (heading < 0) {
heading += 360.0f;

Loading…
Cancel
Save