Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIH: fix sign error from previous PR #24205

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ROMFS/px4fmu_common/init.d/airframes/1101_rc_plane_sih.hil
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ param set-default CA_SV_CS1_TYPE 3
param set-default CA_SV_CS2_TRQ_Y 1
param set-default CA_SV_CS2_TYPE 4

param set HIL_ACT_REV 1
param set HIL_ACT_FUNC1 201
param set HIL_ACT_FUNC2 202
param set HIL_ACT_FUNC3 203
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ param set-default CA_SV_CS1_TRQ_P 1
param set-default CA_SV_CS1_TYPE 3
param set-default CA_SV_CS2_TRQ_Y 1

param set HIL_ACT_REV 32
param set HIL_ACT_REV 16

param set-default FW_AIRSPD_MAX 12
param set-default FW_AIRSPD_MIN 7
Expand Down
6 changes: 3 additions & 3 deletions src/modules/simulation/simulator_sih/sih.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,10 @@ void Sih::generate_fw_aerodynamics(const float roll_cmd, const float pitch_cmd,
const Vector3f v_B = _q_E.rotateVectorInverse(_v_E);
const float &alt = _lla.altitude();

_wing_l.update_aero(v_B, _w_B, alt, roll_cmd * FLAP_MAX);
_wing_r.update_aero(v_B, _w_B, alt, -roll_cmd * FLAP_MAX);
_wing_l.update_aero(v_B, _w_B, alt, -roll_cmd * FLAP_MAX);
_wing_r.update_aero(v_B, _w_B, alt, roll_cmd * FLAP_MAX);

_tailplane.update_aero(v_B, _w_B, alt, pitch_cmd * FLAP_MAX, _T_MAX * throttle_cmd);
_tailplane.update_aero(v_B, _w_B, alt, -pitch_cmd * FLAP_MAX, _T_MAX * throttle_cmd);
_fin.update_aero(v_B, _w_B, alt, yaw_cmd * FLAP_MAX, _T_MAX * throttle_cmd);
_fuselage.update_aero(v_B, _w_B, alt);

Expand Down
Loading