General Question Calculating deltaV caused by a rocket burn in Orbiter

evilfer

New member
Joined
Dec 9, 2010
Messages
53
Reaction score
0
Points
0
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:

  1. 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.
  2. constanc acc, assuming that fuel mass does not vary: dv = stepDuration * thrust / shipMass
  3. 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 :).
 

agentgonzo

Grounded since '09
Addon Developer
Joined
Feb 8, 2008
Messages
1,649
Reaction score
4
Points
38
Location
Hampshire, UK
Website
orbiter.quorg.org
Take a look at the source code for burntimecalc and transx. They both have functions to do this. It requires some complicated calculus
 

C3PO

Addon Developer
Addon Developer
Donator
Joined
Feb 11, 2008
Messages
2,605
Reaction score
17
Points
53
[MATH]\Delta t = {m_0 \cdot I_{SP}\over F}\cdot\left(1-e^{(-{\Delta V\over I_{SP}})}\right) [/MATH]
[MATH]m_0[/MATH] is the total mass before the burn.
[MATH]I_{SP}[/MATH] is in m/s.

Or are you trying to include losses too?
 
Last edited:

evilfer

New member
Joined
Dec 9, 2010
Messages
53
Reaction score
0
Points
0
Take a look at the source code for burntimecalc and transx. They both have functions to do this. It requires some complicated calculus


If I'm not mistaken, transx compares at each step the current vessel velocity with the calculated final velocity (the velocity at the end of the burn). I don't want to use this, because the burn controller doesn't know in advance the gravitational acceleration that affects the vessel during the whole burn.

BurnTimeCalc does not compute the dv caused by the burn in each step, but rather the burn duration. Of course, I can use the burn duration for a precise maneuver :).

However, this control system has one problem:

In the last sim step, in which the burn will be completed, it's most likely that the simDT will be larger than the remaining burn time. Therefore, I need to adjust the thrust level, so that af the end of this last too big sim step, the total dV does not exceed the required dV (this is why I do the calculations in the preStep callbacks, to know in advance the step duration).

To achieve this, I stell need to find out an expression for the dV that the burn will cause in the final sim step. Then from this expression I can find the needed thrust level.

---------- Post added at 12:43 PM ---------- Previous post was at 12:39 PM ----------

[MATH]\Delta t = {m_0 \cdot I_{SP}\over F}\cdot\left(1-e^{(-{\Delta V\over I_{SP}})}\right) [/MATH]
[MATH]m_0[/MATH] is the total mass before the burn.
[MATH]I_{SP}[/MATH] is in m/s.

Or are you trying to include losses too?

In addition to the problem with the burn's final simStep (see above), yes, I think my point is that I'm trying to include losses not related with the main burn :). This may be irrelevant, but during the burn the attitude controller keeps working. By the time the burn starts, the angle error is low (< 1e-10 degrees), so the RCS fuel consupmtion is also very low, but still...

Also, someone could get tired of the mission and go EVA :).

---------- Post added at 01:35 PM ---------- Previous post was at 12:43 PM ----------

I've tried all 4 methods (the three in the first post and the one based on burn duration with thrust level correction for the last burn step).

To test this, I start Orbiter in an scenario with a DG-IV in a MEO (radius = 10.000Km to avoid the atmosphere) aligned with the Moon. A single burn puts the vessel in a free return trajectory to the Moon. I then note the time at which Moon periapsis is reached, and its height. The predicted Pe (using a simulator external to Orbiter) is ~7700km.

The first results (a couple of experiments in Orbiter with each mode :S) show that methods 1 and 3 are very similar (Moon Pe is 7400 km, diff between 1 and 2 is ~0.25%). Method 2 has a larger difference with 1 and 3 (Pe diff ~2.5%), but it's the closest to the prediction: Pe is 7600km. Method 4 almost misses the Moon (Pe is 25000 km), might be a bug :).
 
Last edited:

Topper

Addon Developer
Addon Developer
Donator
Joined
Mar 28, 2008
Messages
666
Reaction score
20
Points
33
I think you can have a look to the Burn Time Calculator 2.32 addon

[ame="http://orbithangar.com/searchid.php?ID=4530"]Burn Time Calculator 2.32[/ame]

It sources are included.

p.s.
Sorry i havn't read the complete thread before posting ^^
 
Last edited:
Top