API Question How do I steal a nav mode?

kwan3217

Addon Developer
Addon Developer
Donator
Joined
Apr 29, 2008
Messages
115
Reaction score
0
Points
16
Location
Geosynchronous Orbit
My vessel is fly-by-wire, meaning that the joystick controls a set of virtual thrusters which are read by GetAttitudeRotLevel( ) and then the vessel interprets this as a command and steers the main engines appropriately.

The built in nav modes (killrot, prograde, etc) work, but not very well. I think that the internal autopilot is trying to calculate control and damping coefficients based on the virtual thrusters, and can't. This means that it oscillates and overshoots a lot, and when it finally does settle down, it keeps twitching the engines from hard to one side to hard to the other side once per frame.

I have a control loop which will work just fine already, but I want when you push number pad 5, for the killrot light on the HUD to come on, but for my autopilot instead of the stock one to be activated.

So far my idea is to intercept the 5 key and just use that to toggle my own autopilot on and off, but that won't light the light on the dashboard.

How does a more complicated ship like DG-IV do this?
 
well, if you create your own dashboard you can light up whatever lights you want....

the connection between clicking the panel and what lights are on, and the actual effects of doing so are created manually in the SDK, so you can simply choose not to activate the stock killrot when you click the respective button.... similarly, as you intercept the 5 key, you can throw on the proper light as you wish...

it's your ship... as long as you're programming it, the internal wirings of the panel are yours to choose:thumbup:
 
Back
Top