AP_ADSB: update units for new mavlink msg

This commit is contained in:
Tom Pittenger 2015-12-08 13:36:20 -08:00 committed by Andrew Tridgell
parent 40a84f0589
commit 87fccce9e2
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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
};