From 7643c5d3f34a61ef04c07deaab18d4ab1b6b811c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 26 Jan 2022 17:33:38 +1100 Subject: [PATCH] SITL: log airspeed in SIM2 --- libraries/SITL/SIM_Aircraft.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libraries/SITL/SIM_Aircraft.cpp b/libraries/SITL/SIM_Aircraft.cpp index 04d0c2456c..2f8464448a 100644 --- a/libraries/SITL/SIM_Aircraft.cpp +++ b/libraries/SITL/SIM_Aircraft.cpp @@ -475,13 +475,15 @@ void Aircraft::fill_fdm(struct sitl_fdm &fdm) // @Field: VN: Velocity north // @Field: VE: Velocity east // @Field: VD: Velocity down +// @Field: As: Airspeed Vector3d pos = get_position_relhome(); Vector3f vel = get_velocity_ef(); - AP::logger().WriteStreaming("SIM2", "TimeUS,PN,PE,PD,VN,VE,VD", - "Qdddfff", + AP::logger().WriteStreaming("SIM2", "TimeUS,PN,PE,PD,VN,VE,VD,As", + "Qdddffff", AP_HAL::micros64(), pos.x, pos.y, pos.z, - vel.x, vel.y, vel.z); + vel.x, vel.y, vel.z, + airspeed_pitot); } }