So I'm having "fun" with those pesky thrust vectors again...
I want to implement accurate two-axis thrust vectoring for a two-engines configuration (like the Centaur). By accurate I mean that the solution should be mathematically exact, and the "normalise" function should not be necessary.
The way I see it a thrust vector is like a conical slice from a sphere which radius is equal to the vector lenght (in Orbiter, 1). The center of the sphere is the thrust vector origin. The angle of the cone is equal to the maximum gimbal range. If we take 10 DEG as an example, then the cone angle will be 10 DEG*2 = 20 DEG.
I'm struggling to model this with the API, because I'm not good at maths and equally not good at coding. It seems rather easy if we take only 1 axis, because then it's a 2D trigonometry problem. If the angle is 10 DEG to the left then we'll have :
X = sin(10 DEG) ~= 0.1736...
and the Z component will be :
Z = cos(10) ~= 0.9848...
So our vector would be :
_V(0.1736, 0, 0.9848)
and of course the more digits we put the more accurate it is. I can "link" that to an input level that ranges from -1 to 1 :
thrust_vector = _V(sin(input_x * 10 DEG), 0, cos(input_x * 10 DEG)
I don't see how to apply this to a 2-axis system. ?
I want to implement accurate two-axis thrust vectoring for a two-engines configuration (like the Centaur). By accurate I mean that the solution should be mathematically exact, and the "normalise" function should not be necessary.
The way I see it a thrust vector is like a conical slice from a sphere which radius is equal to the vector lenght (in Orbiter, 1). The center of the sphere is the thrust vector origin. The angle of the cone is equal to the maximum gimbal range. If we take 10 DEG as an example, then the cone angle will be 10 DEG*2 = 20 DEG.
I'm struggling to model this with the API, because I'm not good at maths and equally not good at coding. It seems rather easy if we take only 1 axis, because then it's a 2D trigonometry problem. If the angle is 10 DEG to the left then we'll have :
X = sin(10 DEG) ~= 0.1736...
and the Z component will be :
Z = cos(10) ~= 0.9848...
So our vector would be :
_V(0.1736, 0, 0.9848)
and of course the more digits we put the more accurate it is. I can "link" that to an input level that ranges from -1 to 1 :
thrust_vector = _V(sin(input_x * 10 DEG), 0, cos(input_x * 10 DEG)
I don't see how to apply this to a 2-axis system. ?
Last edited: