API Question MaxThrust vs. ThrusterIsp

Mythos

Addon Developer
Addon Developer
Donator
Joined
Apr 28, 2012
Messages
103
Reaction score
7
Points
33
Location
Kiel
I want to support various engine setups in my AP, tail sitters, thruster pads and so on. My idea was to loop through all thruster groups and then check the vectors which one would fit to my needs. So maybe I can use the main engine in fact but treat it like a hover engine for all calculations.

My first problem: I use THGROUP_X to read or set thruster levels, but ENGINE_X to get the max thrust of that engine (and the real thrust of course by multiplicating max thrust with thruster level). I can't see any relations other than by name wich THGROUP belongs to wich ENGINE. Of course THGROUP_MAIN is for ENGINE_MAIN but when I loop through them dynamically by index or so, which one is wich?

The more general question is: I know GetMaxThrust(ENGINE_X) is deprecated. So what is the correct way to get the max or current thrust by thruster group and not by engine handle? I know there is GetThrusterIsp(THGROUP_X) what looks nearly like what I want. But that does not return the THRUST but the impulse ISP. How can I calculate the max thrust by impulse?
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,882
Reaction score
2,133
Points
203
Location
between the planets
How can I calculate the max thrust by impulse?

You can't, the two are completely independent properties of an engine (well, they are somewhat linked by engineering limitations in the real world, but there is no mathematical correlation between the two).

just itterate through the thrusters in a group and add their individual maximum thrust values together to get the total thrust of a group.
 

Hlynkacg

Aspiring rocket scientist
Addon Developer
Tutorial Publisher
Donator
Joined
Dec 27, 2010
Messages
1,870
Reaction score
3
Points
0
Location
San Diego
^ What he said

In real life (where you actually have to build the damn thing) the two values are determined by the power output of the engine. Assuming the energy available remains constant exhaust velocity (ISP) will decrease as thrust increases. The only way to get a higher ISP coupled with a higher thrust is to increase the amount of energy available.

This is where the real world engineers earn thier pay, as it becomes an issue of "How much energy can we dump into the thrust chamber before it melts down or explodes?" and "Where are we goint to get it?"

In orbiter such trivialities do not concern us. As such thrust and ISP are treated as completely independant variables.

For a rough approximation the equation in question is...

P = (F * eV ) / 2

where P = Power in watts, F = Force exerted in Newtons (Thrust), and eV = exhaust velocity (ISP).

For a less rough approximation we'd need to start adding additional variables.
 
Last edited:

Mythos

Addon Developer
Addon Developer
Donator
Joined
Apr 28, 2012
Messages
103
Reaction score
7
Points
33
Location
Kiel
Yes I see, thank you. For each single thruster I can get the thrust by thruster handle and so leave the ENGINE_X world behind me.

---------- Post added at 18:33 ---------- Previous post was at 18:08 ----------

Hmm :hmm: now trying to code I can't see any link between each individual thruster and thruster groups.

For my job it would be best to loop through all thruster groups by index (I could use standard groups and then user groups by index) and then loop through each individual thruster in that group. But there is no GetThrusterHandleByGroup() or sth.

The alternative would be to loop through all individual thrusters by index (GetThrusterCount() and GetThrusterHandleByIndex() do that job) and then lookup to wich group it belongs, but I can't find any method for this.

---------- Post added at 18:48 ---------- Previous post was at 18:33 ----------

My fault.. I just found GetGroupThruster() and GetGroupThrusterCount() :facepalm: I think this will do it.

---------- Post added at 22:33 ---------- Previous post was at 18:48 ----------

And now it's done. Next version of my Hover MFD will be able to use ShuttleA's pod thrusters as retro (ShuttleA has no real retro) or even as a second hover or main engine, depending on pod thruster direction. So it's also possible to use main as hover engine if a ship is able to turn it straight downward (I've read about that).
 
Top