SITL: update ADSB for new format

This commit is contained in:
Andrew Tridgell 2015-11-26 10:25:18 +11:00
parent 76209de08e
commit 2804434596

View File

@ -170,8 +170,8 @@ void ADSB::send_report(void)
last_report_us = now_us;
adsb_vehicle.ICAO_address = vehicle.ICAO_address;
adsb_vehicle.lat = loc.lat*1.0e-7f;
adsb_vehicle.lon = loc.lng*1.0e-7f;
adsb_vehicle.lat = loc.lat;
adsb_vehicle.lon = loc.lng;
adsb_vehicle.altitude_type = ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
adsb_vehicle.altitude = -vehicle.position.z;
adsb_vehicle.heading = wrap_360_cd(100*degrees(atan2f(vehicle.velocity_ef.y, vehicle.velocity_ef.x))) / 100;