API Question Indirect thruster control

Moach

Crazy dude with a rocket
Addon Developer
Joined
Aug 6, 2008
Messages
1,582
Reaction score
63
Points
63
Location
Vancouver, BC
hmm... ok, here's the deal...

i'm now programming for the engine staging operations on my G42 Starliner....

as for simulating engine dynamics, i've got that covered, as far as flight envelope reaction goes:hmm:


but i've struck a new complication....

i have two different sets of engines, and four different configurations
the two pair of nozzles are located on distinct points of the airframe... enough to cause a simulation-worthy flight dynamics change.....

and another, the first set of engines should be a rocketturbine concept, which implies a bit of a delay between the controls and engine response...

for calculating the delay, i'll just us my simple smoothing formula, that uses a delta-percent-per-step addition... it's quite simple and proven....


but simple as it is, it needs one thing... INPUT:facepalm:

and i'm having heaps of trouble separating the main engine input from response


i need some ideas on how to approach this...



my first idea, which i don't know why failed, was to use a "virtual thruster group"... i created a group, passed NULL for the thruster array, and it to THGROUP_MAIN.....

then i used my simple filter formula to bridge this virtual thgroup to the actual thrusters, now grouped under THGROUP_USER

booyah, nothing....:facepalm:


i thought i had something mistaken on my end, as most often is the case, but after a brief series of tests i found i was getting no input whatsoever from the virtual thrusters - GetThrusterGroupevel() was returning a solid zero


what need i do?
 
For SSU, we create dummy thrusters which don't produce any thrust and call CreateThrusterGroup. I think you need to pass an actual thruster here, rather than NULL.
 
i did try that... but i couldn't get it to work.... apparently, thrusters only work if you connect them to a fuel source:huh:

i though i could create a dummy fuel tank as well, but then would i need to keep refilling it all the time?

is there a way to set "infinite fuel"?
 
You can set the thrust of the virtual engine to zero. This way it won't use any fuel. Don't connect it to the main fuel tank, because this way once the main tank empties, your control system stops working. Make a special fuel tank for the virtual thrusters. It only has to have something like 1 milligram of fuel, or even less. Just something above zero.
 
yes, i managed to figure that one out... zero thrust and a dummy fuel tank - it got it working now :thumbup:

thanks for the help, i think i'm good to go from here :salute:
 
Back
Top