Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Addons > Addon Support & Bugs
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Addon Support & Bugs Support & bug reports for Orbiter addons.

Reply
 
Thread Tools
Old 08-25-2017, 06:58 PM   #1
slaver0110
Orbinaut
 
slaver0110's Avatar
Default Dragonfly CoG offset

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):

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!!
slaver0110 is offline   Reply With Quote
Thanked by:
Reply

  Orbiter-Forum > Orbiter Addons > Addon Support & Bugs


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 04:37 AM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.