C++ Question KILLROT not working

Castor

New member
Joined
Mar 1, 2014
Messages
321
Reaction score
0
Points
0
I have been coding a vessel recently, that uses main engine gimballing for attitude control. But every time I use KILLROT, the vessel gets propelled to Nan space. Other nav modes work fine.

The vessel code has global variables. Could this be causing the problem?
 

Hielor

Defender of Truth
Donator
Beta Tester
Joined
May 30, 2008
Messages
5,580
Reaction score
2
Points
0
I have been coding a vessel recently, that uses main engine gimballing for attitude control. But every time I use KILLROT, the vessel gets propelled to Nan space. Other nav modes work fine.
I thought killrot needed RCS in order to function properly?


The vessel code has global variables. Could this be causing the problem?
Possibly, possibly not...but it would be a good idea to fix this anyway, since global variables are bad for storing state in the case where you can have more than one of something, like with vessels...
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,290
Reaction score
3,258
Points
203
Location
Toulouse

Well, you can always "trick" it by creating dummy RCS thrusters (1e-9 thrust, 1e9 Isp for example) that would indirectly command the gimballing system...
 

thepenguin

Flying Penguin
Addon Developer
Joined
Jul 27, 2013
Messages
220
Reaction score
1
Points
16
Location
Earth-Moon Lagrange Point (L4)
Well, you can always "trick" it by creating dummy RCS thrusters (1e-9 thrust, 1e9 Isp for example) that would indirectly command the gimballing system...

yes, but I doubt that the OP has done that. The real question is why this causes infinite thrust or zero mass to propel him into NaN-space
 

Castor

New member
Joined
Mar 1, 2014
Messages
321
Reaction score
0
Points
0
I have defined dummy RCS thrusters for pitching and banking.

Something else that I have observed is that engaging and then disengaging another NAV mode makes the KILLROT work. I have no clue as to why this happens.
 

Castor

New member
Joined
Mar 1, 2014
Messages
321
Reaction score
0
Points
0
The spacecraft can gimbal only on these two axes.
Just to make sure, I added dummy RCS for yaw, but that doesn't solve the problem.
 
Top