Browse Source

SITL: Sailboat: write rpm and airspeed for windvane backends

master
Peter Hall 6 years ago committed by Randy Mackay
parent
commit
5839c1ebf6
  1. 4
      libraries/SITL/SIM_Sailboat.cpp

4
libraries/SITL/SIM_Sailboat.cpp

@ -116,6 +116,10 @@ void Sailboat::update(const struct sitl_input &input) @@ -116,6 +116,10 @@ void Sailboat::update(const struct sitl_input &input)
const float wind_apparent_dir_bf = wrap_180(wind_apparent_dir_ef - degrees(AP::ahrs().yaw));
// set RPM and airspeed from wind speed, allows to test RPM and Airspeed wind vane back end in SITL
rpm1 = wind_apparent_speed;
airspeed_pitot = wind_apparent_speed;
// calculate angle-of-attack from wind to mainsail
float aoa_deg = MAX(fabsf(wind_apparent_dir_bf) - mainsail_angle_bf, 0);

Loading…
Cancel
Save