- Joined
- Jan 13, 2008
- Messages
- 2,302
- Reaction score
- 6
- Points
- 38
- Location
- Atlanta, GA, USA, North America
I've noticed some odd behavior with the above method. It appears when I have two calls to this method, but for two different axes, the latter call doesn't seem to work. So my scenario looks like this:
When the second call is commented out, the first call does exactly as it's supposed to. When they're both "active" however, the first call is ineffective. As you can see, I output a debug string which shows the commanded value and the correct rollva is being passed in both scenarios.
Is there a good workaround for this? Only alternative I know is to have an if statement and set the value of THGROUP_ATT_BANKLEFT and THGROUP_ATT_BANKRIGHT depending on the sign of rollval. But that feels messy to me.
Thanks!
[EDIT] Nevermind, doing my suggested workaround doesn't work either, so does the SetAttitudeRotLevel interfere with any call to any thruster group setting?
[EDIT2] There's just something weird about Orbiter I think. I converted both my pitch and roll controllers to set the thruster groups directly, and it's STILL showing the same behavior.
Roll is setup the same way with the values changed appropriately. I still get the same result. If I comment out one or the other, the individual controller does exactly what it's supposed to. But when they're both working together, neither really work well. What is going on here?
Code:
//In clbkPreStep
sprintf(oapiDebugString(), "Roll %lf %lf %lf", rollval, dCurrRoll, tgt-dCurrRoll);
SetAttitudeRotLevel(2, rollval);
//...
SetAttitudeRotLevel(0, pitchval);
Is there a good workaround for this? Only alternative I know is to have an if statement and set the value of THGROUP_ATT_BANKLEFT and THGROUP_ATT_BANKRIGHT depending on the sign of rollval. But that feels messy to me.
Thanks!
[EDIT] Nevermind, doing my suggested workaround doesn't work either, so does the SetAttitudeRotLevel interfere with any call to any thruster group setting?
[EDIT2] There's just something weird about Orbiter I think. I converted both my pitch and roll controllers to set the thruster groups directly, and it's STILL showing the same behavior.
Code:
if (pitchval > 0)
this->SetThrusterGroupLevel(THGROUP_ATT_PITCHUP, pitchval);
else
this->SetThrusterGroupLevel(THGROUP_ATT_PITCHDOWN, pitchval);
Last edited: