mirror of https://github.com/ArduPilot/ardupilot
AP_ADSB: update units for new mavlink msg
This commit is contained in:
parent
40a84f0589
commit
87fccce9e2
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue