Hi,
I'm trying to implement automatic rocket burns in an MFD, and I'd like them to be precise for a given deltaV. I have the thrust direction problem more or less solved, but am not sure about the burn power and duration.
Currently, I'm having the MFD calculate the deltaV that will be caused in each sim step (I'm using preStep callbacks).
I checked Orbiter documentation (section 2 of dynamics.pdfin technotes), and it mentions that forces other than gravitational ones are assumed constant during a sim step. The documentation denotes these forces as "a0", and are added to "gravitational acceleration ag", so I assume that "a0" is an acceleration.
Anyway, I can think of three ways of calculating this step dV:
* shipMass = vessel->GetMass()
** shipAvgMass = .5 * (shipMass + shipMass - fuelMassToBeConsumedInStep)
I've tried all three and there's no big difference (#3 might be marginally better for me), but I wondered what's the propper way of calculating this .
I'm trying to implement automatic rocket burns in an MFD, and I'd like them to be precise for a given deltaV. I have the thrust direction problem more or less solved, but am not sure about the burn power and duration.
Currently, I'm having the MFD calculate the deltaV that will be caused in each sim step (I'm using preStep callbacks).
I checked Orbiter documentation (section 2 of dynamics.pdfin technotes), and it mentions that forces other than gravitational ones are assumed constant during a sim step. The documentation denotes these forces as "a0", and are added to "gravitational acceleration ag", so I assume that "a0" is an acceleration.
Anyway, I can think of three ways of calculating this step dV:
- assume that acceleration is NOT constant during the time step, since the fuel mass does vary. This means that dv is a logaritmic function of thrust, shipMass* and stepDuration.
- constanc acc, assuming that fuel mass does not vary: dv = stepDuration * thrust / shipMass
- constant acc, calculated using average ship mass: dv = stepDuration * thrust / shipAvgMass**
* shipMass = vessel->GetMass()
** shipAvgMass = .5 * (shipMass + shipMass - fuelMassToBeConsumedInStep)
I've tried all three and there's no big difference (#3 might be marginally better for me), but I wondered what's the propper way of calculating this .