diff --git a/libraries/AP_ADSB/AP_ADSB.cpp b/libraries/AP_ADSB/AP_ADSB.cpp index dd8ecd702b..b2d6f466c8 100644 --- a/libraries/AP_ADSB/AP_ADSB.cpp +++ b/libraries/AP_ADSB/AP_ADSB.cpp @@ -175,7 +175,7 @@ void AP_ADSB::perform_threat_detection(void) Location AP_ADSB::get_location(const adsb_vehicle_t &vehicle) const { Location loc {}; - loc.alt = vehicle.info.altitude * 100; + loc.alt = vehicle.info.altitude * 10; // convert mm to cm. loc.lat = vehicle.info.lat; loc.lng = vehicle.info.lon; loc.flags.relative_alt = false; diff --git a/libraries/AP_ADSB/AP_ADSB.h b/libraries/AP_ADSB/AP_ADSB.h index e4cfc1d4e5..485f8f8813 100644 --- a/libraries/AP_ADSB/AP_ADSB.h +++ b/libraries/AP_ADSB/AP_ADSB.h @@ -46,7 +46,7 @@ public: }; struct adsb_vehicle_t { - mavlink_adsb_vehicle_t info; // the whole mavlink struct with all the juicy details. sizeof() == 42 + mavlink_adsb_vehicle_t info; // the whole mavlink struct with all the juicy details. sizeof() == 38 uint32_t last_update_ms; // last time this was refreshed, allows timeouts ADSB_THREAT_LEVEL threat_level; // basic threat level };