mirror of
https://gitlab.com/lander-team/lander-cpp.git
synced 2025-06-16 15:17:23 +00:00
Fixed
This commit is contained in:
parent
90d385f0b3
commit
2c194312d3
@ -143,6 +143,8 @@ void burnStartTimeCalc(Vehicle &State) {
|
|||||||
local_h += local_v * State.stepSize / 1000.0;
|
local_h += local_v * State.stepSize / 1000.0;
|
||||||
|
|
||||||
} while (local_thrustFiring != 3);
|
} while (local_thrustFiring != 3);
|
||||||
|
|
||||||
|
State.z = State.z - local_h;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vehicleDynamics(Vehicle &State, Vehicle &PrevState, int t) {
|
void vehicleDynamics(Vehicle &State, Vehicle &PrevState, int t) {
|
||||||
@ -239,7 +241,7 @@ void thrustSelection(Vehicle &State, int t) {
|
|||||||
// as well as current mass
|
// as well as current mass
|
||||||
State.burnElapsed = (t - State.burnStart) / 1000;
|
State.burnElapsed = (t - State.burnStart) / 1000;
|
||||||
State.mass = State.massInitial - (State.mdot * State.burnElapsed);
|
State.mass = State.massInitial - (State.mdot * State.burnElapsed);
|
||||||
} else if (std::abs(State.burnVelocity + State.vz) < 0.001) {
|
} else if (std::abs(State.burnVelocity + State.vz) < 0.90) {
|
||||||
// Start burn
|
// Start burn
|
||||||
State.burnStart = t;
|
State.burnStart = t;
|
||||||
State.burnElapsed = 0;
|
State.burnElapsed = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user