I'm sorry if this voilates some rule but I figured I'd post this question here as well seeing as this forum gets more traffic.
I'm working on my space tug and need help writing a function. I know how to do the math on paper (Tourqe = R * F sin a) but lack the knowledge of C++ to make it work in Orbiter.
Yes, I know I'm reinventing the dragonfly, but the comments in the sample code don't exactly explain what's going on and there are levels of system simulation that further obscure the matter.
The intent is that when the Translation thrusters fire, the Pitch/yaw thrusters will automaticaly counter any shift in CG caused by a payload or docked vessel. I've been able to do this manually using the "SetThruster Dir/Ref" functions but want this process to be completely transperant to the end user.
I'm working on my space tug and need help writing a function. I know how to do the math on paper (Tourqe = R * F sin a) but lack the knowledge of C++ to make it work in Orbiter.
Code:
GetsuperstructureCG;
Using the above calculate the angular moment for "RCS_Trans_group" and return the value "torque1";
Do the same for "RCS_Att_group" and return the value "torque2";
Calculate thrust-level/vector for "RCS_Att_group" where (torque2) will be the inverse of (torque1);
Set "RCS_Att_group" to the above thrust level/vector
Yes, I know I'm reinventing the dragonfly, but the comments in the sample code don't exactly explain what's going on and there are levels of system simulation that further obscure the matter.
The intent is that when the Translation thrusters fire, the Pitch/yaw thrusters will automaticaly counter any shift in CG caused by a payload or docked vessel. I've been able to do this manually using the "SetThruster Dir/Ref" functions but want this process to be completely transperant to the end user.
