Discussion Simple autopilot

Wally

Member
Joined
Apr 18, 2010
Messages
190
Reaction score
0
Points
16
Location
Cluj-Napoca
I have some minimal programming skills and I would like to write a simple autopilot addon. I've done a quick survey of the existing autopilots on OH and I didn't found one that would match my wanted characteristics.

I've looked over Gemini Project's documentation, page 5, Section 4. Launch, at the Manual FLlght Plan and I would like to automatize it and more. Goes like this:

MET+000 Launch
MET+010 Pitch to 85 degrees
MET+020 Pitch to 80 degrees

and so on. I would like to have triggers, like MET, altitude, speed, to combine them with logical operators, and to triggers some actions (pitch, roll, yaw, RCS forward, backward, etc). Something like:

IF (MET=100 OR ALTITUDE>200) THEN PITCH 80

This condition would be hardcoded for some scenarios/addons or could be loaded from a .ini file (script?). In this way, autopilots for ascending, descending, orbiting and docking can be scripted or hardcoded, and will be useful for any ship.

Does something like this exists? Will it be hard for a newbie like me? Where should I start, maybe you can indicate some autopilot source code for guiding?

Thank you.
 
well, you have Universal Autopilot.. You can launch to orbit with it, align planes, sync orbit, approach to a target, dock, transfer to the moon and stuff.

but (as far as I know) you can't make a rule like IF MET= 100 PITCH> 80
 
If you're using Orbiter beta you can make a Lua script. It has a nice demo for an Atlantis launch profile.
 
Is it possible to do things like detect vessels in the vicinity of the current vessel with LUA. Is there any loss of speed or performance if an autopilot is coded in LUA than hardcoded in the DLL. I see that the DG comes with a LUA demo that is an autopilot. But Universal Autopilot is mostly C++ code in a DLL.
 
Back
Top