stock autopilots in r64

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,842
Reaction score
2,105
Points
203
Location
between the planets
Did the stock autopilots change in the latest revision (it's already a while ago, but I'm just now getting around to investigating some issues I'm having developing on it that weren't around in the release version).

It almost seems to me that the AP is trying to make some predictions on the maneuverability of the vessel now, which would be a cool thing, except... IMS2 vessels wrap their entire RCS handling to dynamically create a firing solution that prevents unwanted rotation or translation artifacts induced by shifting CoG (not to mention that I have no idea where people put their rcs thrusters in the first place... :shifty:). So basically all anybody querrying the RCS groups would see is that the vessel can't rotate, period.

I'm mostly posting this here for two reasons: a) I'm trying to get confirmation for a suspicion that has solidified during testing and bughunting, but is still possibly wrong.
And b) Might it be possible to release the source code of the stock autopilots (even just the old ones, if they have indeed changed)? I know we can now override stock autopilots with our own in our add-ons, but I have no idea how to code one, although I know that sooner or later I'll have to make one anyways (the stock autopilots didn't handle heavy slugish vessels very well). Having the code of the stock autopilots as a jumping-off point might be a good jumping-off point for many people wanting to customise autopilots for their vessels.
 
Last edited:

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,666
Reaction score
100
Points
78
the new vessel4 allows to overload the default autopilots:
Code:
virtual int VESSEL4::clbkNavProcess  ( int  mode )  
 virtual  


Processing of navigation autopilot programmes. 
Parameters
mode Bit-flags for active nav programmes (see Navigation mode bitflags)  
ReturnsModified nav programme bitflags (see notes) Default action:Does nothing and returns mode (i.e. leaves all navmode processing to the default Orbiter core routines. NoteThis method is called at each frame while at least one nav programme is active. It is only called once per frame even if multiple programmes are active. Check the mode parameter to see which. The module is free to process all, a subset, or none of the active programmes. The return value indicates to Orbiter which of the programmes have been processed: clear the flags for all processed programmes, and leave the flags for any skipped programmes. You cannot set any flags in the return value that were not set already in the input parameter. Activating/deactivating navmodes should be done via VESSEL::ActivateNavmode, VESSEL::DeactivateNavmode, VESSEL::ToggleNavmode
 

Hlynkacg

Aspiring rocket scientist
Addon Developer
Tutorial Publisher
Donator
Joined
Dec 27, 2010
Messages
1,870
Reaction score
3
Points
0
Location
San Diego
@ Jedida,

Yes. and see fred's comment above.
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,842
Reaction score
2,105
Points
203
Location
between the planets
the new vessel4 allows to overload the default autopilots:
Code:
virtual int VESSEL4::clbkNavProcess  ( int  mode )  
 virtual  


Processing of navigation autopilot programmes. 
Parameters
mode Bit-flags for active nav programmes (see Navigation mode bitflags)  
ReturnsModified nav programme bitflags (see notes) Default action:Does nothing and returns mode (i.e. leaves all navmode processing to the default Orbiter core routines. NoteThis method is called at each frame while at least one nav programme is active. It is only called once per frame even if multiple programmes are active. Check the mode parameter to see which. The module is free to process all, a subset, or none of the active programmes. The return value indicates to Orbiter which of the programmes have been processed: clear the flags for all processed programmes, and leave the flags for any skipped programmes. You cannot set any flags in the return value that were not set already in the input parameter. Activating/deactivating navmodes should be done via VESSEL::ActivateNavmode, VESSEL::DeactivateNavmode, VESSEL::ToggleNavmode

Thanks, I'm aware of that, as mentioned. What I don't have is a good baseline to jump off of. I don't have the first clue about structuring an autopilot...


Is that a "yes, the autopilots have changed in the last revision?"
 

Hlynkacg

Aspiring rocket scientist
Addon Developer
Tutorial Publisher
Donator
Joined
Dec 27, 2010
Messages
1,870
Reaction score
3
Points
0
Location
San Diego
Yes it is.

Im on my phone atm but i can help you with autopilot code if you like.
 

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,448
Reaction score
462
Points
83
Website
orbit.medphys.ucl.ac.uk
Did the stock autopilots change in the latest revision (it's already a while ago, but I'm just now getting around to investigating some issues I'm having developing on it that weren't around in the release version).

Can you please check if the problem is still present in SVN r.65? I did fix a thruster-related bug that could have a bearing on this.
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,842
Reaction score
2,105
Points
203
Location
between the planets
Can you please check if the problem is still present in SVN r.65? I did fix a thruster-related bug that could have a bearing on this.

EDIT: Apparently I'm so senile already that I forgett to update the revision before running tests. Yes, AP-behavior in r65 is consistent again with 2016 release.
 
Last edited:
Top