mirror of
https://gitlab.com/lander-team/lander-cpp.git
synced 2025-07-23 14:41:25 +00:00
changed up vehicle dynamics in accordance with simulink changes
This commit is contained in:
@@ -313,12 +313,18 @@ void vehicleDynamics(Vehicle &State, Vehicle &PrevState, int t) {
|
||||
State.rolldot = integral(State.rollddot, PrevState.rolldot, State.stepSize);
|
||||
|
||||
// ax ay az
|
||||
State.ax = (State.Fx / State.mass) +
|
||||
(State.pitchdot * State.vz - State.rolldot * State.vy);
|
||||
State.ay = (State.Fy / State.mass) +
|
||||
(State.rolldot * State.vx - State.vz * State.yawdot);
|
||||
State.az = (State.Fz / State.mass) +
|
||||
(State.vy * State.yawdot - State.pitchdot * State.vx);
|
||||
State.ax =
|
||||
(State.Fx /
|
||||
State.mass); // +
|
||||
//(State.pitchdot * State.vz - State.rolldot * State.vy);
|
||||
State.ay =
|
||||
(State.Fy /
|
||||
State.mass); // +
|
||||
//(State.rolldot * State.vx - State.vz * State.yawdot);
|
||||
State.az =
|
||||
(State.Fz /
|
||||
State.mass); // +
|
||||
//(State.vy * State.yawdot - State.pitchdot * State.vx);
|
||||
|
||||
// vx vy vz in Body frame
|
||||
State.vx = integral(State.ax, PrevState.vx, State.stepSize);
|
||||
|
Reference in New Issue
Block a user