Ok, so ignoring the vectors (because I'm only interested in boosting in one direction):
e^(-thrust*thrustToVelocity/maxSpeed)
drag =
drag = V * (1-(e^(((-thrust)*(thrustToVelocity)/maxSpeed))))/(dT/getMass)
also drag += (power*abThrust) *myBackward which is confusing because I can't figure out what this power thing is. I'm going to try and ignore this.
V = (thrustToVelocity * (m_engineVector - drag)) + V
where m_engineVector = localThrust * orientation, but we ignore orientation so m_engineVector = localThrust.
localThrust = ((desiredVelocity - pVelocity) / thrustToVelocity) + Drag therefore
V(t) = (thrustToVelocity * (((desiredVelocity - pVelocity) / thrustToVelocity) + drag - drag) + V
V(t) = (thrustToVelocity * ((desiredVelocity - pVelocity)/thrustToVelocity)) + V
V(t) = (desiredVelocity - pVelocity) + V
desiredVelocity = myBackward * negDesiredSpeed
myBackward = (maxThrust)(backThrustMultiplier)
negDesiredSpeed = maxSpeed * (-1.0f - thrustRatio)
desiredVelocity = (Ts)(-1) * (maxSpeed * (-1- Tb/Ts))
= -1*(Ts)*(Sm)*(1+Tb/Ts)
= -1*((Ts*Sm)+(Tb*Sm)
= -1*Sm*(Ts+Tb)
u=(1.0 - e^(-thrust*thrustToVelocity/maxSpeed)
Why did drag go away?
EDIT: I FIGURED IT OUT. Ok thank god. localThrust goes away.
V = (thrustToVelocity * -drag) + V
= (dT/Mass) * (pVelocity *(u)M/dT)
= pVelocity * ((1.0 - e^(-thrust*thrustToVelocity/maxSpeed)) + V
= V * ((1-e^((-1)(dT/M)/(Sm)))) + V
the KEY to this is that T is in milliseconds, that is to say, T = 1000 = 1 second. At that point it all matches with my experimental values for Boost1 fighters.
In addition the distance traveled by a fighter on one fuel load (without factoring in cruising afterwords) is simply
Code: Select all
(t*e^(t/(SM))*(v+1)+(SM))*e^(-t/(SM))*v
let SM = shipTopSpeed * shipMass = u (to clean it up)
Code: Select all
((v+1)*t*e^(t/u) + (u))*(e^(-t/u))*(v)
multiply the interior by e^(-t/u)
where v = the ship's top speed, t = time in milliseconds