slaver0110
Member
- Joined
- Mar 21, 2011
- Messages
- 72
- Reaction score
- 2
- Points
- 6
I posted this in "Addons" and was referred to this board. I realize that this has been asked not just a few times over the last six years, so please forgive me for bringing it up again.
I'm just wondering if anyone has tackled the problem with the Dragonfly's non-functional CoG-offset. Without it working, it makes pushing modules around a nightmare.
I'm not proficient enough with C++ to fix it myself, but I did manage to track down the following code in Dragonfly.cpp (in the OrbiterSDK\Samples folder):
Quite honestly, this is way over my head. I have only basic C++ experience (I'm still learning the language about three months now), so this is all beyond me.
Seems to be that the CoG system works, but the changes are simply not implemented at runtime, for whatever reason.
I've toyed with the idea of simply making my own "tug", but the CoG-offset problem associated with moving metal around in orbit is something that has to be accomplished with a DLL, and I'm only proficient thus far with Spacecraft3/4.
As an afterthought, I'm suprised that no one has built a replacement-Tug over the last six years. A few projects seem to have started, and disappeared.
Once again, sorry to resurrect this old querry.
Cheers!!
I'm just wondering if anyone has tackled the problem with the Dragonfly's non-functional CoG-offset. Without it working, it makes pushing modules around a nightmare.
I'm not proficient enough with C++ to fix it myself, but I did manage to track down the following code in Dragonfly.cpp (in the OrbiterSDK\Samples folder):
Code:
//******************************* THIS TAKES CARE OF AUTOMATIC GC MANAGEMENT...
if (!cgmode) // auto
cgofs = (GetSuperstructureCG (cg) ? cg.z : 0.0);
if (Manual_RCS==0) { //auto mode we use normal Orbiter channels
if (cgofs) {
ratio = 2.0*cgofs/(cgofs+11.1); // counter-balance level
dlevel = GetThrusterGroupLevel (THGROUP_ATT_LEFT) - GetThrusterGroupLevel (THGROUP_ATT_RIGHT);
if (dlevel > 0) IncThrusterLevel_SingleStep (th_ap[0], dlevel*ratio);
else if (dlevel < 0) IncThrusterLevel_SingleStep (th_ap[1], -dlevel*ratio);
dlevel = GetThrusterGroupLevel (THGROUP_ATT_DOWN) - GetThrusterGroupLevel (THGROUP_ATT_UP);
if (dlevel > 0) IncThrusterLevel_SingleStep (th_ap[2], dlevel*ratio);
else if (dlevel < 0) IncThrusterLevel_SingleStep (th_ap[3], -dlevel*ratio);
}}
else { //we are in manual mode, using custom thruster groups
if (cgofs) {
ratio = 2.0*cgofs/(cgofs+11.1); // counter-balance level
dlevel = GetThrusterGroupLevel (th_lin_left) - GetThrusterGroupLevel (th_lin_right);
if (dlevel > 0) IncThrusterLevel_SingleStep (th_ap[0], dlevel*ratio);
else if (dlevel < 0) IncThrusterLevel_SingleStep (th_ap[1], -dlevel*ratio);
dlevel = GetThrusterGroupLevel (th_lin_down) - GetThrusterGroupLevel (th_lin_up);
if (dlevel > 0) IncThrusterLevel_SingleStep (th_ap[2], dlevel*ratio);
else if (dlevel < 0) IncThrusterLevel_SingleStep (th_ap[3], -dlevel*ratio);
}
}
};
Quite honestly, this is way over my head. I have only basic C++ experience (I'm still learning the language about three months now), so this is all beyond me.
Seems to be that the CoG system works, but the changes are simply not implemented at runtime, for whatever reason.
I've toyed with the idea of simply making my own "tug", but the CoG-offset problem associated with moving metal around in orbit is something that has to be accomplished with a DLL, and I'm only proficient thus far with Spacecraft3/4.
As an afterthought, I'm suprised that no one has built a replacement-Tug over the last six years. A few projects seem to have started, and disappeared.
Once again, sorry to resurrect this old querry.
Cheers!!