Skip to content

Commit

Permalink
SIH-FW: allow pitching up during takeoff
Browse files Browse the repository at this point in the history
Otherwise difficult to get lift
  • Loading branch information
bresch committed Nov 25, 2024
1 parent 43b8ef6 commit 849bdd3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/modules/simulation/simulator_sih/sih.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,11 +409,9 @@ void Sih::equations_of_motion(const float dt)
// integration: Euler forward
_p_I = _p_I + _p_I_dot * dt;
_v_I = _v_I + _v_I_dot * dt;
Eulerf RPY = Eulerf(_q);
RPY(0) = 0.0f; // no roll
RPY(1) = radians(0.0f); // pitch slightly up if needed to get some lift
_q = Quatf(RPY);
_w_B.setZero();
_q = _q * _dq;
_q.normalize();
_w_B = constrain(_w_B + _w_B_dot * dt, -6.0f * M_PI_F, 6.0f * M_PI_F);
_grounded = true;
}

Expand Down

0 comments on commit 849bdd3

Please sign in to comment.