Project Universal Autopilots alpha 100324

Status
Not open for further replies.

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
uap-100304-5.jpg


Continuing from discussion there: http://www.orbiter-forum.com/showthread.php?t=14650

Current version thread is here:
http://www.orbiter-forum.com/showthread.php?t=22753

Orbiter Universal Autopilots (UAP) is a framework for writing and running universal and sequence-able autopilots in Orbiter. If you heard about Redshift by Bernd R. Fix., UAP is something similar, but much better (once done).

Alpha 100304:
orbides.1gb.ru/orbf/uap-alpha-100304.zip
VC6 build, if you got no MFD with module active: orbides.1gb.ru/orbf/uap-alpha-100304-vc6.zip
Latest Alpha is 100324, info in post 140, latest version is on OH, info above

What can it be used for?
From the player point of view, it's an MFD that one can use to define a series of actions to be performed on the current vessel, like lift off, climb to orbit, wait for apoapsis, circularize.
- So far, the set of autopilots available is somewhat limited, but it's fixable with time.
- The sequence of autopilots run fully automatic, starting next one as the previous completes.
- It is designed to be saved to scenario at any point, and be resumed correctly on reload.
- The framework allows autopilots to be orientation – independent, thus, ascent autopilot can be run with any engine, for example.

From a developer point of view, it could have been a nice framework for writing autopilots, but unless there is a noticeable interest in it, no SDK release is planned.

How to use it?
Simple. Enable uap module in the launchpad, use the UAP MFD.

Using UAP MFD
UAP MFD is opened by Shift+B.
- It shows the status of the UAP system for current vessel.
- The system is MFD-independent, the autopilots will run regardless of which MFD's are open and on which vessels.

uap-100304-1.jpg

Keys:
The key scheme resembles TransX – there are steps in a sequence, and there are variables for each step.
- STP, S - Terminate current sequence
- PG , P - Switch page. Each page have separate functions on it.
- < , < - Previous variable, previous AP in insert list
- > , > - Next variable, next AP in insert list
- ENT, E - Enter new value for current variable, select highlighted action
- GO , G - Start the sequence
- PRV, R - Previous step in the sequence
- NXT, F - Next step in the sequence
- INS , I - Insert step into sequence
- DEL , D - Remove step from sequence
- ^ , [ - Move selected step up
- v , ] - Move selected step down

uap-100304-3.jpg

Sequence page
On this page you can edit or define the sequence of autopilots for current vessel.
Keys used: INS, DEL, ^, v, PRV, NXT.
INS adds new step after selected, or creates the sequence if none are defined.

uap-100304-4.jpg

After pressing INS the AP selection menu will open.
Select with < and >, end confirm with ENT.

uap-100304-2.jpg

Input variables page
Here one can change or view the variables of the current AP in the sequence.
- The APs are cycled by PRV and NXT, variables are selected by < and >.
- Pressing ENT will open the input prompt for the highlighted variable.
- Changing input variables is not possible for completed or running APs
- Yellow variables are info variables, that shows information about the things current AP is doing. These cannot be edited.

uap-100304-5.jpg

Status page
Status page shows the state of the current sequence and the variables of the step being executed.
As in input page, green are user inputted variables and yellow are info variables.

Scenario files
The sequences are stored in the scenario files in uap section in strings like one below:
>GL-NT:lift_off(mode=0,engine=hover,heading=70),tools(type=0,key=g).
The format is simple:
- First symbol defines if the sequence is running (>) or not ($).
- The vessel name, followed by :
- A list of autopilots with variables in (), separated by comas.
- A . at the end.
- Variables are name=value string, separated by comas
- Lines can be broken at any point to enhance readability

Autopilot descriptions
-Trans-orbit autopilot. Gets you from one orbit to another with the same plane, or from suborbital trajectory to orbit.
-Lift-off autopilot. Gets the vessel off the pad, either in vertical climb or in hover to altitude. Can perform roll and pitch open-loop guidance
-Tools "autopilot". Performs various functions, like key presses or waiting.
-Attitude autopilots. Performs attitude maneuvers. So far can only point prograde.

Variable descriptions are in the manual.

So?
So, i've mostly completed the framework and started populating it with autopilots. And, at this point i welcome any feedback. If anyone is interested in this, what can be made out of this?

From the testing point of view, the trans-orbital autopilot should be fairly solid and work with any non-unusual vessel. Also, the system as whole should be usable. Bug reports and design ideas are welcome.


.
 
Last edited:

Loru

Retired Staff Member
Retired Staff
Addon Developer
Donator
Joined
Sep 30, 2008
Messages
3,731
Reaction score
6
Points
36
Location
Warsaw
Not working for me.

I've installed it and it apears in launchpad but there is no MFD in simulation.
uap.jpg


There isn't any module in orbiter log also:

Logfrom launchpad:
Code:
**** Orbiter.log
Build Sep 29 2006 [v.060929]
Devices enumerated: 3
Devices accepted: 3
==> RGB Emulation
==> Direct3D HAL
==> Direct3D T&L HAL
Found 0 joystick(s)
Module AtlantisConfig.dll [API v.060425]
Module DGConfig.dll [API v.060425]
Module AeroBrakeMFD.dll [API v.060425]
Module InterMFD53.dll [API v.060425]
Module OrbiterSound.dll [API v.060425]
Module ScnEditor.dll [API v.060425]

Log from simulation:
Code:
**** Orbiter.log
Build Sep 29 2006 [v.060929]
Devices enumerated: 3
Devices accepted: 3
==> RGB Emulation
==> Direct3D HAL
==> Direct3D T&L HAL
Found 0 joystick(s)
Module AtlantisConfig.dll [API v.060425]
Module DGConfig.dll [API v.060425]
Module AeroBrakeMFD.dll [API v.060425]
Module InterMFD53.dll [API v.060425]
Module OrbiterSound.dll [API v.060425]
Module ScnEditor.dll [API v.060425]

**** Creating simulation session
DirectDraw interface OK
Direct3D interface OK
Zbuffer: 32 bit
Stencil buffer: 8 bit
Render device: Fullscreen 1152 x 864
Device has hardware T&L capability
Module Sun.dll [API v.050206]
VSOP87(E) Sun: Precision 1e-006, Terms 554/6634
Module Mercury.dll [API v.050206]
VSOP87(B) Mercury: Precision 1e-005, Terms 167/7123
Module Venus.dll [API v.050206]
VSOP87(B) Venus: Precision 1e-005, Terms 79/1710
Module Earth.dll [API v.050206]
VSOP87(B) Earth: Precision 1e-008, Terms 2564/2564
Module Moon.dll [API v.041022]
ELP82: Precision 1e-005, Terms 116/829
Module Mars.dll [API v.060425]
VSOP87(B) Mars: Precision 1e-005, Terms 405/6400
Module Phobos.dll [API v.060425]
Module Deimos.dll [API v.060425]
Module Galsat.dll [API v.041022]
Module Jupiter.dll [API v.050206]
VSOP87(B) Jupiter: Precision 1e-006, Terms 1624/3625
Module Io.dll [API v.041022]
Module Europa.dll [API v.041022]
Module Ganymede.dll [API v.041022]
Module Callisto.dll [API v.041022]
Module Satsat.dll [API v.050206]
Module Saturn.dll [API v.060425]
VSOP87(B) Saturn: Precision 1e-006, Terms 2904/6365
Module Mimas.dll [API v.050206]
SATSAT Mimas: Terms 113
Module Enceladus.dll [API v.050206]
SATSAT Enceladus: Terms 33
Module Tethys.dll [API v.050206]
SATSAT Tethys: Terms 101
Module Dione.dll [API v.050206]
SATSAT Dione: Terms 59
Module Rhea.dll [API v.050206]
SATSAT Rhea: Terms 68
Module Titan.dll [API v.050206]
SATSAT Titan: Terms 100
Module Hyperion.dll [API v.050206]
SATSAT Hyperion: Terms 595
Module Iapetus.dll [API v.050206]
SATSAT Iapetus: Terms 605
Module Uranus.dll [API v.050206]
VSOP87(B) Uranus: Precision 1e-006, Terms 1827/5269
Module Miranda.dll [API v.060425]
Module Ariel.dll [API v.060425]
Module Umbriel.dll [API v.060425]
Module Titania.dll [API v.060425]
Module Oberon.dll [API v.060425]
Module Neptune.dll [API v.050206]
VSOP87(B) Neptune: Precision 1e-006, Terms 391/2024
Module Triton.dll [API v.060425]
Finished initialising world
Module ShuttlePB.dll [API v.041022]
Module DeltaGlider.dll [API v.060425]
Module ShuttleA.dll [API v.060425]
Finished initialising status
Finished initialising camera
Finished initialising panels
Finished setting up render state

Installed addons:
spacecraft3
DG-IV
UGCO
R-7
Asteroid Pack v1
Orbiter Sound
AerobrakeMFD
IMFD 5.3
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
I've installed it and it apears in launchpad but there is no MFD in simulation.
There isn't any module in orbiter log also:
That is quite weird.
Does disabling other modules help?
Does it work on clean install?
Are you sure you didn't look into the wrong log or something?
 

Loru

Retired Staff Member
Retired Staff
Addon Developer
Donator
Joined
Sep 30, 2008
Messages
3,731
Reaction score
6
Points
36
Location
Warsaw
I've tried with only UAP on and it doesn't work.
Yes I'm sure about logs because copyied this logs about 30 minutes ago.

Now I'm downloading orbiter package to try it on clean install.

-----------------Edit------------------------------

doesn't work on clean install - maybe some libraries are needed (Microsoft Visual C++ 2008 Redistributable Package) or something like that?
 
Last edited:

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her

Loru

Retired Staff Member
Retired Staff
Addon Developer
Donator
Joined
Sep 30, 2008
Messages
3,731
Reaction score
6
Points
36
Location
Warsaw
Yep - now it works :D
Thanks.
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Can multiple instances of the module run, one per vessel in the simulation? Also, I was going to ask (as someone who just finished a set of controls theory courses), why only open loop guidance on the lift-off program?
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
Can multiple instances of the module run, one per vessel in the simulation?
As is said in the manual and shown in UAP-demo scenario, the autopilots are vessel and MFD independent. Any one can run along with any other in any amount of instances.

why only open loop guidance on the lift-off program?
More or less for simplicity - i don't know how to account for atmospheric effects yet, so a simple pitch there to here for that long put the rocket out of the dense layers for the trans-orbital guidance to take it on. On the Moon - it's few seconds long "get off the pad", not much to guide here.
 

Zachstar

Addon Developer
Addon Developer
Donator
Joined
May 1, 2008
Messages
654
Reaction score
0
Points
0
Location
Shreveport, Louisiana
Website
www.ibiblio.org
Where did you find or make the latter orbit autopilot code?

Is it peg based?

Oh did you happen to read my idea about time acceleration with multiple craft?
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
VC6 build vs. VC2005 build

Hi,

I've tried your UAP and find it very nice! But since it is still ALPHA I think any report might help...

  1. What are the units of e.g. Apoapsis? In the "Atlantis Demo", both Apoapsis and Periapsis are set to 200000. It can't be surface-distance, or orbit-radius...Or have I missed something in the documentation?
  2. When I used the VC6 Build, the "Docking" Demo crashes after synchronizing the rotation rate with the Station...A lenghty "dumpreg.exe" slows my system down, but that's another issue ;)
    No problem with all other scenarios when I use the VC2005 Build!
  3. The "Docking" Demo rotation sync seems to be off by ca. 45 degrees.
    Is this an error on my side? Or is it intended?

Nevertheless, keep the good work
Peter
 
Last edited:

n72.75

Move slow and try not to break too much.
Orbiter Contributor
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,694
Reaction score
1,352
Points
128
Location
Saco, ME
Website
mwhume.space
Preferred Pronouns
he/him
200000m=200km
 

KosmoKen

Lost in Translation
Donator
Joined
Feb 4, 2009
Messages
84
Reaction score
0
Points
0
Location
Tucson
Any plans for interplanetary travel? I figure you wont work on syncing with existing TransX or IMFD since that would defeat the purpose, but this would be a great opportunity for a more user friendly launch-to-land AP.

Anyway, great work. I always look forward to what you'll come up with next.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
200000m=200km
Sure! This morning I don't know what problems I had yesterday night with that number :embarrassed: I should avoid posting late at night after a long working day!:zzz:
So of course its unit is "Meters above surface"
Cheers,
Peter
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
Alpha 100305 (updated post+2h: air hold autopilot):
orbides.1gb.ru/orbf/uap-alpha-100305.zip
No VC6 build, VC2005 run-times are needed if not working.

Changes:
-Fixed small bugs here and there
-Fixed wait to apoapsis
-Fixed docking autopilot misalignment
-STP,S - Terminate current sequence key added

Added autopilots:
Runway take-off autopilot
Gets the vessel off the runway on control surfaces, and turns to desired heading
- engine specifies the engine to use
- altitude defines the altitude to stop above
- v1 defines take-off speed
- heading is desired launch heading
- gear_key is the key to close landing gears with

Docking autopilot
Docks the vessel to the target near-by
- target specifies what to dock with
- port is the port to dock to
- with_port is the port on our vessel to use

Attitude autopilots:
-retrograde
-kill rotation

Aerial state hold autopilot
Keeps the vessel in the atmosphere at given altitude, speed and heading, with given rates of them.
- engine specifies the engine to use
- altitude defines the altitude to hold
- velocity defines speed to hold
- heading is heading to hold
- alt_rate defines the altitude change rate
- vel_rate defines speed change rate
- hdg_rate is heading change rate
- onoff defines what to hold - 1 is altitude, 2 is heading, 4 is speed (bit field, 1+2=3 - hold heading and altitude, for example)

Scenarios:
-DG from runway to orbit
-XR2 from runway to orbit
-Confirmed lunar manoeuvres
-DG in holding pattern

Nearby plans:
-Align planes autopilot
-Sync orbits autopilot
-Land airless autopilot
-Land runway autopilot

Thoughts?
Ideas?
Problems?
Don't forget, your feedback defines the quality of the add-on you will get.

Where did you find or make the latter orbit autopilot code? Is it peg based?
Yes, it's roughly PEG based, with adjustments for throttling.

Oh did you happen to read my idea about time acceleration with multiple craft?
Yes, so far i'm not planning on making a traffic system, only a set of autopilots to make stuff fly around. Later it would be of use.

When I used the VC6 Build, the "Docking" Demo crashes after synchronizing the rotation rate with the Station...A lenghty "dumpreg.exe" slows my system down, but that's another issue ;)
No problem with all other scenarios when I use the VC2005 Build!
It's old, VC6. The only good thing about it is that it's results always start. Functioning is another issue.

The "Docking" Demo rotation sync seems to be off by ca. 45 degrees.
Is this an error on my side? Or is it intended?
No. Fixed.

Any plans for interplanetary travel? I figure you wont work on syncing with existing TransX or IMFD since that would defeat the purpose, but this would be a great opportunity for a more user friendly launch-to-land AP.
Some are. The guidance is not too hard, figuring out what to do and when is. It would need something the size of TransX to define and control, or even something better, like IMFD's map. Distant plans for the moment, not before landing autopilot.
 
Last edited:

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
Would this work with regular aircraft? e.g. Kev33's fleet?
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
Would this work with regular aircraft? e.g. Kev33's fleet?
I tried 4 of them that came first on OH, runway take-off autopilot works fine with all, so i guess it's actually universal as advertised. :)
Are some not working for you?
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
Not tried yet as I'm stuck at work for a few more hours.
Ok, then here is an update with the useful one:
Alpha 100305 (updated):
orbides.1gb.ru/orbf/uap-alpha-100305.zip

Aerial state hold autopilot
Keeps the vessel in the atmosphere at given altitude, speed and heading, with given rates of them.
- engine specifies the engine to use
- altitude defines the altitude to hold
- velocity defines speed to hold
- heading is heading to hold
- alt_rate defines the altitude change rate
- vel_rate defines speed change rate
- hdg_rate is heading change rate
- onoff defines what to hold - 1 is altitude, 2 is heading, 4 is speed (bit field, 1+2=3 - hold heading and altitude, for example)
 
Last edited:

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
Thanks & Request

Hi Artlav,

thanks for the quick fix on the rotational miss-alignment! It works perfect now!

I've tried your AP on several vessels and it works great! :thumbup:
When I tried it with "Ares V" (another alpha or beta state add-on) I came along one "whish":
Is it possible that you could make some kind of parallel task?
What I mean is something like the following: "when altitude reaches 100k, press 'F'). In this case the 'F'-Key will jettison the fairing.
I know that this kind of "wait for something while running another (main-)task" might need some kind of co-routine.
I surely I can split my ascend-task into 3 parts (1st:climb to 100k, than press 'F' and 3rd continue to climb to desired orbit), but I was wondering if you planned something like this maybe already.

In the scenario-file synax maybe something like the '+' (pus) sign might be intuitive: e.g.:
Code:
lift_off(mode=2,engine=main,heading=70,pitch_tgt=30,pitch_duration=10,off_duration=0),
trans_orbit(engine=main,apoapsis=20000,periapsis=20000,ta=0,azimuth=70)
+tools(type=0,trigger=altitude,trigger_value=100000,key=g)
What do you think? It just came into my mind.
Whatever your answere might be, I will still love this add-on! :love:

Regards, and good night,
Kuddel
 
Status
Not open for further replies.
Top