General Question Atmospheric thrust topics

Mythos

Addon Developer
Addon Developer
Donator
Joined
Apr 28, 2012
Messages
103
Reaction score
7
Points
33
Location
Kiel
I made an autopilot for maintaining vertical speed or constant altitude by hover engines (Hover MFD [ame="http://www.orbithangar.com/searchid.php?ID=5712"]HoverMFD 1.0.1[/ame])

My intention was to have it run in no-atmospheric flight, because I don't know about the additional atmospheric things to calculate.

As a feature request from one of my users I'm now testing it within atmosphere and it some kind of works. If I want VS 5, I'll reach e.g. VS 3. If I want to stay at 30m altitude, I get and hold about 20. So it seems there has to be an additional factor to multiply and it would be fine.

I don't actually know what is happening. Is the thrust reduced by atmosphere? Is there something else than gravity pulling me down? I thought atmospheric forces (that aircrafts keep up) would come along with much more speed than just hovering a little.

Can someone get me to the point or formula?
 

icedown

New member
Joined
Sep 5, 2011
Messages
115
Reaction score
0
Points
0
Engine efficiency is reduced in the atmosphere because the amount of thrust produced is a function of the difference between combustion chamber pressure and outside pressure. The outside pressure is higher in the atmosphere, causing reduced thrust.
 

Mythos

Addon Developer
Addon Developer
Donator
Joined
Apr 28, 2012
Messages
103
Reaction score
7
Points
33
Location
Kiel
Thanks for the physics :thumbup:

Now to the API.. So this reduction is not calculated by asking for vessel->GetMaxThrust() only? Is there a way to get the fully functional acceleration force via API? Or do I have to calculate an efficiency factor for my own? How would that be done?
 

insane_alien

New member
Joined
Apr 6, 2009
Messages
144
Reaction score
0
Points
0
can you not just implement a controller algorithm such as PID control? [ame="http://en.wikipedia.org/wiki/PID_controller"]PID controller - Wikipedia, the free encyclopedia[/ame]

that way you could adjust based on the altered acceleration without having to pay any attention to the exact mathematics of how it's altered. It also means you don't need to check the current mass of the craft constantly either as the controller only looks at the vs and the set point.

it'd also be simple enough to extend the controller function to accept an altitude setpoint rather than a vs setpoint.

finding a good set of generic tuning values might be a bit difficult for each craft but not impossible. there are some good estimations you can make.
 

Keatah

Active member
Joined
Apr 14, 2008
Messages
2,218
Reaction score
2
Points
38
Or perhaps the ship's pilot could zero them out, by trial and error. Or have something like a baro-adjust. I could imagine this would take just a moment. And then we could save them in a custom config file?
 
Last edited:

icedown

New member
Joined
Sep 5, 2011
Messages
115
Reaction score
0
Points
0
I'm going to take a stab at this. This has been on my plate to learn for a while so please correct me if I'm wrong.

I think GetMaxThrust is depreciated. But can get the Isp of a thruster with:
Code:
GetThrusterIsp (THRUSTER_HANDLE th, double p_ref)

p_ref being atmospheric pressure which is returned from GetAtmPressure();

This is where I really am guessing. You GetPropellantFlowrate and multiply it with the Isp?

I know the equation is F= qVe + (Pe-Pa)Ae where
F= force
q = rate of ejected mass flow (I think this is propellant flow?)
Ve = Effective exhaust velocity (aka Isp here)
Pe = exhaust gas pressure
Pa = Ambient atmosphere pressure
Ae = section ratio of rocket

The think the last 4 items are already computed into Ve when using the GetThrusterIsp call with 2 arguments. But I may totaly be wrong. :idk:
 

Mythos

Addon Developer
Addon Developer
Donator
Joined
Apr 28, 2012
Messages
103
Reaction score
7
Points
33
Location
Kiel
Ok, back to the physics...

What's about that ISP? How do I get the force or acceleration by that?


And to the API...

You're right, GetMaxThrust() is listed as deprecated in VesselAPI.h. What's the better method to get thrust force then?


When I read VesselAPI.h there are some versions of GetThrusterIsp():
PHP:
GetThrusterIsp0(THRUSTER_HANDLE th)
/* Returns the vacuum fuel-specific impulse (Isp) rating for a thruster. */

GetThrusterIsp (THRUSTER_HANDLE th)
/* Returns the current fuel-specific impulse (Isp) rating of a thruster.
If the vessel is moving within a planetary atmosphere, and if a 
pressure-dependent Isp rating has been defined for this thruster, 
the returned Isp value will vary with ambient atmospheric pressure. */

GetThrusterIsp (THRUSTER_HANDLE th, double p_ref)
/* Returns the fuel-specific impulse (Isp) rating of a thruster at a specific 
ambient atmospheric pressure. */
So it wouldn't be necessary to get the current pressure with GetAtmPressure() when using the second one.


My first idea now would be to use that deprecated GetMaxThrust() and calculate the efficiency by comparing current GetThrusterIsp() with GetThrusterIsp0() in vacuum.
PHP:
HoverMaxThrust = GetMaxThrust(ENGINE_HOVER) *
  GetThrusterIsp(ENGINE_HOVER) / GetThrusterIsp0(ENGINE_HOVER)
Would that be correct? Can that be done avoiding deprecated methods?

---------- Post added at 22:49 ---------- Previous post was at 22:11 ----------

I tested that now. But that is no help :(

First I had to get a THUSTER_HANDLE by the THGROUP_TYPE instead of using the ENGINETYPE, but that was easily done.

But then I read out the values for all versions of GetThrusterIsp() and they are all the same although I am on earth :p

p = GetAtmPressure() = ~100k
GetThrusterIsp(th) = GetThrusterIsp(th, p) = GetThrusterIsp(th, 0) = GetThrusterIsp0(th) = ~7800

For a standard XR2Ravenstar hover engine on earth.

That's not what I expected.
 

Loru

Retired Staff Member
Retired Staff
Addon Developer
Donator
Joined
Sep 30, 2008
Messages
3,731
Reaction score
6
Points
36
Location
Warsaw
I may be wrong but on page 5 and 6 in API guide there is explanation how orbiter thrust efficency depending on pressure.
 

Mythos

Addon Developer
Addon Developer
Donator
Joined
Apr 28, 2012
Messages
103
Reaction score
7
Points
33
Location
Kiel
Hmm well, here is one note from VesselAPI.h:
If no pressure-dependent Isp rating has been defined for this thruster, it will always return the vacuum rating, independent of the specified pressure

So the vessel developer didn't put in some data about Isp rating? (Doesn't work in XR2, DG, DGIV, ShuttleA, ShuttlePB)

When I get no usable data by asking the vessel, is there a way to get the value orbiter would calculate for that thruster? Regardless of what my vessel is saying, orbiter obviously reduces thrust within atmosphere.
 
Top