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.
 

IronRain

The One and Only (AFAIK)
Administrator
Moderator
News Reporter
Donator
Joined
Oct 11, 2009
Messages
3,484
Reaction score
403
Points
123
Location
Utrecht
Website
www.spaceflightnewsapi.net
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
 

garyw

O-F Administrator
Administrator
Moderator
Addon Developer
Tutorial Publisher
Joined
May 14, 2008
Messages
10,485
Reaction score
209
Points
138
Location
Kent
Website
blog.gdwnet.com

KosmoKen

Lost in Translation
Donator
Joined
Feb 4, 2009
Messages
84
Reaction score
0
Points
0
Location
Tucson
If you're using Orbiter beta you can make a Lua script. It has a nice demo for an Atlantis launch profile.
 

dumbo2007

Crazy about real time sims
Joined
Nov 29, 2009
Messages
675
Reaction score
0
Points
0
Location
India
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.
 
Top