Project Universal autopilots

Could be done, if animations are key-triggered, one might be able to add a key press into the sequence, or something like that.

That is what I'm talking about, Thanks.
 
and make it fail sometimes so that we still have something to do, and of course the option to have it unbreakable, or breakable
 
I like the idea of being able to assign ships to make hands-off flights by themselves. Could come in very handy for cargo flights and the like.

Something I'd really like to see, though, is a simple "Follow Me" command that makes another ship fly in perfect formation with you, including stuff like transfer burns. Currently it's next to impossible to fly multiple ships to a destination as a group.
 
Continuing on development.
I'm largely finished on the system and framework part, leaving populating actual autopilots library still to do.

So far, and by experience, i think the whole Universal Autopilots SDK will be quite unused by anybody, so i'll limit it to UAP MFD.

How does it work for the user?
The MFD is a front-end to the system, that runs globally and can control any vessel anywhere simultaneously.

Each autopilot have a set of variables of three kinds - input, info, and state save.
The sequences can be defined in the scenario files, and there they are saved.
For example, "hover_take_off(engine=hover,heading=70), tools(type=0,key=g),peg_ascent(engine=main,apoapsis=20000,periapsis=20000,ta=0,azimuth=70,pitch=30,pitch_time=10)." takes your vessel from the pad using hover engines, issues a command to close the gears, and perform ascent to orbit using main engine.
On scenario save, the sequence is re-saved, and current autopilot state variables are dumped, to be resumable on start.

In Orbiter, the user can define the sequence from the MFD, by selecting autopilots from a list and setting their variables ala TransX, or by loading presets from the disk.

Once the sequence is set, the user starts it, and the ship flies, with the player free to do whatever he/she wants with other vessels. Time acceleration constraints are to be tested by the autopilots currently running.

It should also be possible to make persistent autopilot modes, like hold speed, kill translation wrt, hold attitude, etc, but i haven't made an interface for easy use of them yet.

As for autopilots themselves:
-I have a nice and working ascent to orbit autopilot, tested on Atlantis, DG, SH-A and SH-PB from the Earth, Mars and Moon.
-Less nicely working or in active development are landing and docking autopilots, and some auxiliary stuff in indefinite conditions.
-Several air and near-space autopilots are in planning - change plane, sync orbit, approach, runway take-off, runway landing.
-I have no idea how to make a reentry autopilot with useful accuracy, and interplanetary transfer one seems too complex and not useful enough to make for the moment.

and make it fail sometimes so that we still have something to do, and of course the option to have it unbreakable, or breakable
Certainly, they will fail enough from the bugs in them, no need to add another option. :)

Something I'd really like to see, though, is a simple "Follow Me" command that makes another ship fly in perfect formation with you, including stuff like transfer burns.
Wasn't there a formation MFD of some sort made before?
 
I have not read both pages I just want to get my ideas out first.

First of all redshift was an awesome addon. Bugs galore but when it worked it was amazing. Some people consider such autopilots "cheats" however should Orbiter not be a sandbox for different playstyles?

In my opinion this addon ought to have the power to automatically control a slew of craft. As this would be able to lead to "lively" addons. Such as moon cargo runs where you have to deal with traffic. To this end perhaps a simple traffic system can be constructed. A simple If and then system and a window to make requests to land or depart or something. Just an idea.

For launch autopilot in my opinion that module ought to use a two step system. The first defined by a simple script and then a line that moves on to the 2nd which in my opinion ought to be a multistage PEG based adaptive autopilot. The big issue with many general autopilots is that they act like there is but one stage. However most of the time there is another stage that ends up being put in the wrong direction leading it to waste a good bit of fuel righting itself. In my opinion a way must be established to "Tell" the autopilot there is another stage with so much power at start for lack of a better way to describe it.

Just some opinions on the general subject..

---------- Post added at 06:19 PM ---------- Previous post was at 06:01 PM ----------

Now that I have read the topic let me give a few more ideas.

You mentioned time acceleration. Obviously if you have say 20 cargo vessels moving between the lunar surface and an orbiting space station there is going to be quite a few "Events" However it would get annoying quick if you constantly had to reup your TimeX every time that happened.

Perhaps a way around that is that if an event (Burn, Launch, landing, whatever) is happening it will automatically limit to 10x until event is completed. Then return to whatever x is above 10 until user override. In my opinion it will allow people to get other things done during a long interplanetary flight or similar situation.

For reentry autopilot I would suggest just forgetting that part for now. I remember beta testing Aerobrake MFD and so many weird things always happened... Maybe an autopilot to handle the mach 4 to landing part (Or glide) however reentry sounds like a big PITA in my opinion.

I 2nd the request for a "Wingman" part formation burns may be extremely dangerous in real life but for a fantasy AI world it would be really cool to have.
 
In my opinion this addon ought to have the power to automatically control a slew of craft.

That is a very nice idea, the trouble is how will the autopilots deal with time compression? You don't really want your time compression cut down to 10 when some ship out there manouvers. I think a traffic addon is a bit out of the scope of this one, however I like the addon a lot because it's the first step in that direction.
 
That is a very nice idea, the trouble is how will the autopilots deal with time compression? You don't really want your time compression cut down to 10 when some ship out there manouvers. I think a traffic addon is a bit out of the scope of this one, however I like the addon a lot because it's the first step in that direction.

Note my idea above. If it automatically returns to previous time acceleration after the event is completed so a person will not have to babysit the flight. Now with lots of craft it will mean quite a bit of additional RL time but its unlikely you are going to have a bunch of traffic going to the moon if you are going to mars or the outer planets instead.

What is going to be a far harder problem in my opinion is getting guidance for all these craft. It might be possible to auto calculate but that is going to be an extremely difficult thing to code in.. In my opinion.

Perhaps a way to do it would be to allow the user or the community to design flights perhaps by being able to read TransX type data. If TransX or say Trajectory Planner were used to design the flight perhaps that and craft load details are all that are needed to generate traffic that can roughly go to other planets. Just an idea and surely needs a bunch of refinement..
 
Perhaps a way to do it would be to allow the user or the community to design flights perhaps by being able to read TransX type data.

I was thinking of a multistage style script, maybe with a bit more intelligence, e.g. at altitude x do THIS at speed Y do THAT.

The question them becomes how do you code for special vessels? E.g. could you have something that says "At mach 7 engage the XR-2 scrams".

A while back I was thinking of using a sendkeys style application to do this sort of thing for me. It never got passed the idea but it would have allowed for a consistent approach to any vehicle. *shrugs* just one of those wild ideas I had. :lol:
 
Well when I meant flights I meant stages after Orbit insertion. Im not a programmer but inst there a way to "Trigger" something without having to do a keypress?
 
This really looks like a great idea. I tried using redshift when first using orbiter and loved it but unfortunatly too many bugs. maybe there will be something in it to help me dock the dgiv to that luna ring.... still haven't got that working yet:)
Look forward to it!
 
Note my idea above. If it automatically returns to previous time acceleration after the event is completed so a person will not have to babysit the flight. Now with lots of craft it will mean quite a bit of additional RL time but its unlikely you are going to have a bunch of traffic going to the moon if you are going to mars or the outer planets instead.

Another question is how much fidelity you really need when the craft isn't in focus.

If the player wants to watch, you'll already be at low time-acc.

If the player doesn't want to watch, then it might be acceptable to cut certain stages out entirely and replace them with "magically" putting the craft into the end state.

For example, at 10000x time acc, it might well be acceptable, if a craft has a launch scheduled, to simply edit the craft's state vectors to put it in the target orbit, rather than simulating the launch painstakingly. Burns may be shorter than the step length at high accels, so it might be desirable to edit state vectors and deduct fuel rather than simulate the burn itself. All you really need to be able to do, unless the craft is very near the player and/or the time accel is low, is calculate where the craft needs to be when the player puts it in focus again, not exactly how it got there.

If the player is flying to Neptune at high warp, it's probably acceptable just to keep track of whether your moon-bound traffic is on Earth, en-route, or on the moon.

For a 1x rendezvous and docking involving the player and an AI craft, more precision is needed.
 
For example, at 10000x time acc, it might well be acceptable, if a craft has a launch scheduled, to simply edit the craft's state vectors to put it in the target orbit, rather than simulating the launch painstakingly. Burns may be shorter than the step length at high accels, so it might be desirable to edit state vectors and deduct fuel rather than simulate the burn itself. All you really need to be able to do, unless the craft is very near the player and/or the time accel is low, is calculate where the craft needs to be when the player puts it in focus again, not exactly how it got there.
Yeah, that's how I imagine it, but if I would be doing an addon like this, I'd consider that a second step after the autopilots are working as they should, like version 2.0 or something.

Easily doable, and is already working. Try UAP-dock scenario in the alpha provided in the thread nearby:
damn, you're fast! :tiphat:
 
There are many developers who already made different autopilot tools - launch MFD, reentry, IMFD, TransX, various base-to-base ones, etc.
If some of them can and agree to implement a good quality autopilot on the framework, the development will go faster and with better end result.

I'm trying to make a generic autopilot for Launch MFD using fuzzy logic, but it's a bit hard to guess the parameters neutral to any ship. When it's done, you'll learn that.

My approach has the "disadvantage" that is relies on a GPL licensed C++ fuzzy logic library, so the framework needs to be GPL and C++, and I assume you like Pascal.
 
Last edited:
I'm trying to make a generic autopilot for Launch MFD using fuzzy logic, but it's a bit hard to guess the parameters neutral to any ship. When it's done, you'll learn that.

My approach has the "disadvantage" that is relies on a GPL licensed C++ fuzzy logic library, so the framework needs to be GPL and C++, and I assume you like Pascal.
Well, UAP is written in C++ in anticipation of somebody actually using it, and being a kind of derive, reuse and inherit type of framework for which C++ model is perfect.
It is already released under GPL (albeit not the Orbiter version).

I don't see how fuzzy logic lets you guess the number of stages from the msh file or something, but if it works you're welcome to improve mine or add another UAP module.
 
Great.
But why isn't it GPLed for Orbiter? Is it about the Orbiter and its modules theoretical linking incompatibility?

I don't see how fuzzy logic lets you guess the number of stages from the msh file or something, but if it works you're welcome to improve mine or add another UAP module.

aaaah, if multistage is the problem, then I have no solution other than using [ame="http://orbithangar.com/searchid.php?ID=3800"]Java Multistage PEG[/ame] in (hopefully near) future. The fuzzy logic just helps me to smoothly point the ship to a marker which is calculated independently by, currently, single stage PEG algorithm.
Still interested? What's your current solution? Just in one sentence to save me reading other stuff. Is it a preprogrammed gradual pitching down?
 
Last edited:
Great.
But why isn't it GPLed for Orbiter? Is it about the Orbiter and its modules theoretical linking incompatibility?
No, that's too complicated for my simple legal knowledge.
No Orbiter version with sources for reasons of it being incomplete. Orbiter is complete, and incomplete add-on don't do there, while the other sim is as incomplete as UAP, so all is bundled together.

aaaah, if multistage is the problem, then I have no solution other than using Java Multistage PEG in (hopefully near) future. The fuzzy logic just helps me to smoothly point the ship to a marker which is calculated independently by, currently, single stage PEG algorithm.
Still interested? What's your current solution? Just in one sentence to save me reading other stuff. Is it a preprogrammed gradual pitching down?
Single-stage PEG guidance, with PD controller. The coefficients are calculated from the vessel's physical parameters and thruster definitions, with some guesswork. I was thinking of adding integral part or some other way of tracking actual accelerations produced, but so far it works nicely enough for non-too-unwieldy vessels.
Main problems - throttling properly and multistage discontinuity.
 
No, that's too complicated for my simple legal knowledge.

This is easy. You'd just need to make a linking exception, if you cared.

Single-stage PEG guidance, with PD controller. The coefficients are calculated from the vessel's physical parameters and thruster definitions, with some guesswork.

So it's quite the same as with fuzzy logic. My controller reacts on distance and velocity, not acceleration. I think it's enough. I also calculate the coefficients using vessel's mass and sum of rotational thrusters in one group.
This means that I, for one, with my fuzzy logic, am not any further than you with your PD. The question is - which controller is better. I'd have to check your PD for complicity and test its smoothness - the two major factors, where my controller is rather smoother than simpler I think.
 
I'd like to see a combined horizontal / vertical launch module integrated into a complete autopilot package, complete with "roll program" for the shuttle.

Sounds exciting.
 
How do you control the time warp. Sometimes it will only do x10 & @ others x1000 controled by UAP.
 
Back
Top