Ok, I'm back with more autopilot questions.
Now I'm trying to set up a routine that will allow me to control my linear velocity using the hover engines in conjunction with pitch and roll.
The theory is pretty simple in itself. With the vessel established in a steady hover pitching down will cause the vessel to move forward, pitching up will move the vessel backwards ect...
The problem is figuring out the appropriate amount of acceleration to apply and the corresponding vessel attitude while also maintaining altitude.
I considered posting this in the math forum but what I really need is help developing code (or psuedo-code).
The story so far...
I have my thrust vector "vThrust" who's magnitude = Throttle-level*Maxthrust.
The vertical (y component) of vThrust must be equal to the force exerted by gravity "vGravity"
As a constraint this means that acos( dotp(vThrust, vGravity) ) can not be allowed to excede acos(Magnitude of vGravity / Maxthrust)
I also have my current airspeed "aSpeed", my desired airspeed "dSpeed", and the difference between them "delta".
Given these vectors and constraints I need to calculate desired pitch roll and yaw.
As it stands all vectors are being calculated in orbiter's horizon frame.
any ideas or assistance would be greatly appreciated.
Now I'm trying to set up a routine that will allow me to control my linear velocity using the hover engines in conjunction with pitch and roll.
The theory is pretty simple in itself. With the vessel established in a steady hover pitching down will cause the vessel to move forward, pitching up will move the vessel backwards ect...
The problem is figuring out the appropriate amount of acceleration to apply and the corresponding vessel attitude while also maintaining altitude.
I considered posting this in the math forum but what I really need is help developing code (or psuedo-code).
The story so far...
I have my thrust vector "vThrust" who's magnitude = Throttle-level*Maxthrust.
The vertical (y component) of vThrust must be equal to the force exerted by gravity "vGravity"
As a constraint this means that acos( dotp(vThrust, vGravity) ) can not be allowed to excede acos(Magnitude of vGravity / Maxthrust)
I also have my current airspeed "aSpeed", my desired airspeed "dSpeed", and the difference between them "delta".
Given these vectors and constraints I need to calculate desired pitch roll and yaw.
As it stands all vectors are being calculated in orbiter's horizon frame.
any ideas or assistance would be greatly appreciated.
Last edited: