So I'll just answer my question then. :lol:
Apart from a little bug in the animation of ME-3 (there's some aft translation in the nozzle when it gimbals), it seems to work well.
After checking that, I went and did a makeshift ATVC (and it's SOP), to command the gimbals, until Urwumpe finishes the ATVC/gimbal stuff he is working on. And it got this to do the pre-launch gimbals and mps dump/entry stow and then lowering the nozzles for the drag chute, blah blah... all with some guesses about the angles, because I can't find any real position data.
And because I'm not sure the current implementation of the SSME thrust vector control is correct (it works well, but looks like it might move beyond the actual limits), I rewrote some of the code that controls the vector directions during ascent.
And then I found out that I don't know as much algebra as I thought I did. :facepalm:
Not sure if I'm doing it wrong or if what I want to do is "impossible":
1) calculate the SSME thrust vector that gives 0 moment and calculate the angles to the axis, and use them in AscentGuidance to do the guidance math;
2) take the output from AscentGuidance and apply a "correction" for the SSME install position, i.e. the angles between the SSMEs 0º gimbal and the axis (the 16º/0º and 10º/+-3.5º angles from the "literature"), and then another "correction" corresponding to the angles of the 0 moment for each engine;
3) take the resulting angles above and rotate the SSME install position vectors, thus getting the new thrust direction, then and do the gimbal animation.
Essentially I want to have the ATVC/actuators rotate the SSME install vector by whatever angle it is requested, in the corresponding actuator plane.
So basically the problem is that with only the center engine running it looks like it does everything well, but when I use one of the side engines, it can't control the vehicle (something is not correct)... and if you're wondering about controlling roll with just one engine, I did implement SERC , so the engines just do pitch and yaw in those cases.
In 1, I'm using pretty much the existing CalcSSMEThrustAngles() function, for 2 it's pretty much just sums and I use a modified version of CalcSSMEThrustAngles() to get the angles for each engine, and for 3 it's the same SetSSMEGimbalAngles() function, and of course I created 3 new vectors corresponding to the SSME install positions. In CalcSSMEThrustAngles() I tried changing the angle calculation from asin() to atan() and atan2() which makes more sense in my head and still no joy.
I think the problem might be the 2 sets of 2 rotations: one X and one Y to obtain the SSME install vectors (done outside orbiter) and then the 2 rotations for the gimbal. Not sure if this sequence is supposed to work...
:sos:
I understand that this is not *exactly* mps branch material, although somewhat related. If anybody feels I shouldn't be doing this, I'll stop it and move the proper mps stuff.
Apart from a little bug in the animation of ME-3 (there's some aft translation in the nozzle when it gimbals), it seems to work well.
After checking that, I went and did a makeshift ATVC (and it's SOP), to command the gimbals, until Urwumpe finishes the ATVC/gimbal stuff he is working on. And it got this to do the pre-launch gimbals and mps dump/entry stow and then lowering the nozzles for the drag chute, blah blah... all with some guesses about the angles, because I can't find any real position data.
And because I'm not sure the current implementation of the SSME thrust vector control is correct (it works well, but looks like it might move beyond the actual limits), I rewrote some of the code that controls the vector directions during ascent.
And then I found out that I don't know as much algebra as I thought I did. :facepalm:
Not sure if I'm doing it wrong or if what I want to do is "impossible":
1) calculate the SSME thrust vector that gives 0 moment and calculate the angles to the axis, and use them in AscentGuidance to do the guidance math;
2) take the output from AscentGuidance and apply a "correction" for the SSME install position, i.e. the angles between the SSMEs 0º gimbal and the axis (the 16º/0º and 10º/+-3.5º angles from the "literature"), and then another "correction" corresponding to the angles of the 0 moment for each engine;
3) take the resulting angles above and rotate the SSME install position vectors, thus getting the new thrust direction, then and do the gimbal animation.
Essentially I want to have the ATVC/actuators rotate the SSME install vector by whatever angle it is requested, in the corresponding actuator plane.
So basically the problem is that with only the center engine running it looks like it does everything well, but when I use one of the side engines, it can't control the vehicle (something is not correct)... and if you're wondering about controlling roll with just one engine, I did implement SERC , so the engines just do pitch and yaw in those cases.
In 1, I'm using pretty much the existing CalcSSMEThrustAngles() function, for 2 it's pretty much just sums and I use a modified version of CalcSSMEThrustAngles() to get the angles for each engine, and for 3 it's the same SetSSMEGimbalAngles() function, and of course I created 3 new vectors corresponding to the SSME install positions. In CalcSSMEThrustAngles() I tried changing the angle calculation from asin() to atan() and atan2() which makes more sense in my head and still no joy.
I think the problem might be the 2 sets of 2 rotations: one X and one Y to obtain the SSME install vectors (done outside orbiter) and then the 2 rotations for the gimbal. Not sure if this sequence is supposed to work...
:sos:
I understand that this is not *exactly* mps branch material, although somewhat related. If anybody feels I shouldn't be doing this, I'll stop it and move the proper mps stuff.