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
Alpha 100307:
orbides.1gb.ru/orbf/uap-alpha-100307.zip

Changes:
-General attitude stability improvements for all autopilots, noticeable with PB and Sh-a.
-Various stability and completion fixes
-Fixed orientation bug in docking autopilot
-Better calibration of docking autopilot, limits of vehicle accounted for
-Improved docking AP stability
-Added inverted main mode for shuttle-like vehicles, Atlantis launches right side down now

Scenarios (all moved to UAP-demos folder):
-Docking demo for Atlantis
-Docking demo for DG

Nearby plans:
-Continuing development

This alpha is largely a bug fix for all the things that are already in, especially docking autopilot. No alphas are planned in the near time, so deeper testing is welcome. Testing parameters - all autopilots provided should be universal and reliable.

I tried it by just letting it go without touching anything and it did the same, went spinning round and eventually crashed.
I tried all the other cenarios and they all work fine, only the shuttle crashes.
Strange. Try it in this alpha, Shuttle launch - not touching anything till engines quit - result?
Also, check your expectations - start playback/Atlantis Launch recording, to get a look at a proper-looking shuttle launch in Orbiter.
 
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,696
Reaction score
1,353
Points
128
Location
Saco, ME
Website
mwhume.space
Preferred Pronouns
he/him
I have an idea:

Would it be possible for you to implement a radio navigation autopilot, that would fly from VOR to VOR.


Just an idea.
 

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 it be possible for you to implement a radio navigation autopilot, that would fly from VOR to VOR.
A plane flying from one point to another in the air? Should be possible.
 

mjanicki

Addon Developer
Addon Developer
Donator
Joined
Apr 4, 2008
Messages
106
Reaction score
0
Points
0
Location
Spokane
I hadn't seen any other posts testing a launch involving both hover and main engines, so I thought I'd get you some feedback on UAP with a Shuttle-A, Artlav.

Shuttle-A on Mars, start launch with hover thrusters to gain altitude, then switch to mains. This is with UAP alpha-100307.

Code:
BEGIN_uap
  $SH-03:tools(is_running=0,is_started=0,is_finished=0,type=0,key=g,wait=10.000000),
  lift_off(is_running=0,is_started=0,is_finished=0,engine=hover,mode=0,heading=90.000000,altitude=1500.000000,pitch_tgt=0.000000,pitch_duration=1.000000,off_duration=1.000000,stage=0),
  lift_off(is_running=0,is_started=0,is_finished=0,engine=main,mode=2,heading=90.000000,altitude=30000.000000,pitch_tgt=45.000000,pitch_duration=10.000000,off_duration=1.000000,stage=0),
  trans_orbit(is_running=0,is_started=0,is_finished=0,engine=main,kind=0,target=,apoapsis=200000.000000,periapsis=200000.000000,ta=0.000000,mode=0). 
END
This worked well, and the final orbit around Mars was 200 km with eccentricity 0.0001 so well done. But there are a couple of things that seemed akward in the transition from hover lift_off to main lift_off.

I used mode=0 for the hover lift_off, but that allows the vessel to start falling back to the surface before the mains engage. I thought mode=1 with hovers would be better, and it is, but the hover thrusters never shut down at 1.5 km when the next sequence starts. So you end up with mains and hovers fighting each other in mode=1.

The second lift_off with mains doesn't pitch to the value I've specified in pitch_tgt. It wants to pitch to about 60 degrees every time. With mode of other than 2 here it pitches to what I've specified, so I imagine that the current behavior is intended and I just misunderstand.

And the tools entry correctly sends a "g" to retract the gear, but it doesn't seem to wait the 10 seconds specified. The gear is being retracted immediately when the "Go" button is pressed in the MFD.

Overall, outstanding work you've done here. Hopefully the oddities I've seen are more just my misunderstanding and someone can help me find a better way to program a hover-to-mains launch. Just thought I'd get you some feedback for the alpha stages.

-- Mike
 
Last edited:

Pablo49

Member
Joined
Feb 24, 2010
Messages
753
Reaction score
0
Points
16
You are missing documentation on the align planes function. I wasnt exactly sure what to do with the delta variable. I kept that at zero and set the target, but there were no burns after passing both nodes. I assume this is from not setting delta to something. (This was with Shuttle Fleet 4.2.1)
 

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 used mode=0 for the hover lift_off, but that allows the vessel to start falling back to the surface before the mains engage. I thought mode=1 with hovers would be better, and it is, but the hover thrusters never shut down at 1.5 km when the next sequence starts. So you end up with mains and hovers fighting each other in mode=1.The second lift_off with mains doesn't pitch to the value I've specified in pitch_tgt.
For mode 0 it's a correct behaviour. mode 1 should blast off and align heading while keep thrusting. Shutting down the engine at the end seemed a bad idea, it will be fixed in either. No pitch is supposed in mode 1, only mode 2 does a pitchover, so it's somewhat strange too.

And the tools entry correctly sends a "g" to retract the gear, but it doesn't seem to wait the 10 seconds specified. The gear is being retracted immediately when the "Go" button is pressed in the MFD.
That is correct, the wait variable is only used in waiting mode, keypress mode presses the key and quits.

You are missing documentation on the align planes function.
More precisely, it's the missing the align plane function that is the problem. That is simply incomplete and only works in special cases, so no documentation yet.
 

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 100310:
orbides.1gb.ru/orbf/uap-alpha-100310.zip

Changes:
-Added align planes autopilot
-Added target to lift-off autopilot
-Fixed overspin in hover heading

Added autopilots:
Align planes autopilot
Aligns vessel orbital plane with the target. Only works within 90 degrees.
- engine specifies the engine to use
- target specifies the target vessel to align into a plane of
- rinc_delta is the inclination difference to stop at

Scenarios:
-lunar_station_ascent - Gets a DG from brighton to Luna-OB1 orbit, demo of targeting in trans-orbital, lift-off, pitchover and demo of planes align.
-Launch-Atlantis - Demo of a shuttle launch towards ISS with full target tracking

Plans:
1. Sync orbits autopilot, and thus - a full ground to docking autopilot
2. Land airless from orbit autopilot - full pad-docking-pad mission autopilot
3. Land runway autopilot and re-entry autopilot - full runway-docking-runway autopilot, and beta/gold release.

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

Pablo49

Member
Joined
Feb 24, 2010
Messages
753
Reaction score
0
Points
16
When running the trans orbit autopilot with Shuttle Fleet (4.2.1), it seems to ignore the target PeA and ApA. I used the same variables setup as you provided in the default Atlantis demo scenario (To be sure, I even copy/pasted it from one .scn to the other). If I let it go, it will take me to an orbit around 1.5 M and -60 km or so. I tried it twice, both times it put me into a high eccentricity orbit like that. Though, it does keep the inclination close. EDIT: I tried it once more, and realized what it isn't doing. The shuttle never changes pitch, through either lift off or trans orbit.

I did not try this autopilot on one of the earlier alphas, so I'm not sure if this is a new or old issue.
 
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
When running the trans orbit autopilot with Shuttle Fleet (4.2.1),
...
I tried it once more, and realized what it isn't doing. The shuttle never changes pitch, through either lift off or trans orbit.
It appears that Shuttle Fleet uses something like engine gimballing for pitch control instead of RCS, making it uncontrollable for the UAP. Won't be easy to fix.

---------- Post added at 18:14 ---------- Previous post was at 09:50 ----------

The second lift_off with mains doesn't pitch to the value I've specified in pitch_tgt. It wants to pitch to about 60 degrees every time. With mode of other than 2 here it pitches to what I've specified, so I imagine that the current behavior is intended and I just misunderstand.
Got a closer look on that Mars case, the engine transition is now fixed, but there is no problem with ther pitch.

Reduced to meaningful variables only, here is your launch program:
Code:
lift_off(engine=hover,mode=0,heading=90,altitude=1500,off_duration=1),
tools(type=0,key=g),
lift_off(engine=main,mode=2,heading=90,pitch_tgt=45,pitch_duration=10,off_duration=1),
trans_orbit(engine=main,kind=0,apoapsis=200000,periapsis=200000,ta=0,mode=0).
As you can see, it only gets 10 seconds between off-the-pad lift_off and trans-orbit to set the 45 degrees pitch, which it can or can not do, then the trans-orbit kicks in, setting the pitch to optimal for ascent.

Does it seems to be vague about this in the manual?
 

mjanicki

Addon Developer
Addon Developer
Donator
Joined
Apr 4, 2008
Messages
106
Reaction score
0
Points
0
Location
Spokane
Hi, Artlav.

As you can see, it only gets 10 seconds between off-the-pad lift_off and trans-orbit to set the 45 degrees pitch, which it can or can not do, then the trans-orbit kicks in, setting the pitch to optimal for ascent.

Does it seems to be vague about this in the manual?

Not vague at all -- just me trying out different things to see what would work. I went through my usual tests with alpha-100310 and things look good. ShuttleA liftoff from Mars works perfectly. Here's the UAP block as written to a save file.

Code:
BEGIN_uap
  $SH-03:lift_off(is_running=0,is_started=0,is_finished=0,engine=hover,mode=0,target=,heading=90.000000,altitude=200.000000,pitch_tgt=0.000000,pitch_duration=1.000000,off_duration=0.000000,stage=0),
  tools(is_running=0,is_started=0,is_finished=0,type=0,key=g,wait=0.000000),
  lift_off(is_running=0,is_started=0,is_finished=0,engine=main,mode=2,target=,heading=90.000000,altitude=30000.000000,pitch_tgt=45.000000,pitch_duration=15.000000,off_duration=0.000000,stage=0),
  trans_orbit(is_running=0,is_started=0,is_finished=0,engine=main,kind=0,target=,apoapsis=200000.000000,periapsis=200000.000000,ta=0.000000,mode=0),
  attitude(is_running=0,is_started=0,is_finished=0,engine=main,mode=0),
  attitude(is_running=0,is_started=0,is_finished=0,engine=main,mode=2). 
END
It looks like an extra blank character is being written at the end of the last line in the block though. Might just be a bit of bad copy/paste by me.

Good news is that the blocks written during a quick save are now placing a "$" at the start of the block when the UAP is not engaged. One of the older alpha releases was writing ">" even if the sequence hadn't been started.

Other feedback:
- In demo scenario "Launch-Many from the Moon.scn", did you mean to launch the ShuttleA to an orbit of only 20 km? (minor)

- Typo in vessel name causes CTD during scenario load. Would it be possible to catch that and just ignore UAP entries for nonexistent vessels? (wish list)

- Aerial State Hold with "onoff" of 1 or 3 does not hold altitude using hover engines in a ShuttleA when there is no, or little, forward velocity. The hover engines are engaged but never turn off and in the case of onoff=3, the vessel does not turn to the specified heading. (probably something I'm doing wrong)

- Is it possible to allow for use of runway_off with hover engines? I wanted to try avoiding the slight loss of altitude when switching to the mains so I tried: (also wish list)

Code:
BEGIN_uap
  $SH-03:runway_off(engine=hover,altitude=600,heading=90,v1=0,gear_key=g),
  lift_off(engine=main,mode=2,target=,heading=90,altitude=30000,pitch_tgt=45,pitch_duration=15,off_duration=1,stage=0),
  trans_orbit(engine=main,kind=0,target=,apoapsis=200000,periapsis=200000,ta=0,mode=0). 
END
This looks like it should work, but the hover engines are not turned off at the specified altitude. I tried various different settings for v1= but in all cases the hover engines stay lit and the next step in the sequence (lift_off) never begins.

I'm wondering if not recognizing that it's reached the specified altitude is related to what I've seen with the aerial state hold also not holding a fixed altitude with little or no forward velocity. In both cases, the autopilot just continues to burn the hover engines. Again, probably something I'm doing incorrectly.

Thanks again for the great work, and I hope the feedback is helpful.

-- Mike
 

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
ShuttleA liftoff from Mars works perfectly. Here's the UAP block as written to a save file.
...
lift_off(...altitude=30000.000000,pitch_tgt=45.000000,pitch_duration=15...)
Nice, just to clarify - do you put the altitude in there? Doesn't look like any default.

It looks like an extra blank character is being written at the end of the last line in the block though.
Not a problem :)

In demo scenario "Launch-Many from the Moon.scn", did you mean to launch the ShuttleA to an orbit of only 20 km?
Certainly. All vessels there should enter roughly the same 20x20 km orbit.

Typo in vessel name causes CTD during scenario load.
Fixed.

Aerial State Hold with "onoff" of 1 or 3 does not hold altitude using hover engines in a ShuttleA when there is no, or little, forward velocity. The hover engines are engaged but never turn off and in the case of onoff=3, the vessel does not turn to the specified heading. (probably something I'm doing wrong)
Um, that autopilot only works with air surfaces - elevators, rudder, etc. It doesn't use either RCS or any but the defined engine. If you defined the engine as hover, it will assume the vessel is in top-forward nose-down atmospheric flight, and hover engine will be used for velocity control.

Is it possible to allow for use of runway_off with hover engines?
...
This looks like it should work, but the hover engines are not turned off at the specified altitude. I tried various different settings for v1= but in all cases the hover engines stay lit and the next step in the sequence (lift_off) never begins.
As before, the vessel is assumed to be in nose-down, hover engine-backward orientation, and the engine is working at full trying to get it to move forward, but no forward motion follow. If you want it to take off vertically with hover engine, it's pad take-off AP (lift off), not runway one.

In all autopilots, the selected engine is defined as tail, the logical choice of up direction depends on where it points, and the right wing direction is choosen to the right of that pair. This is the orientation it will fly in, with all parameters (pitch, heading, etc) rotated accordingly. Look at how various vessels take off in then Launch-Many from the Moon.scn to get the idea of orientations assumed.
 

kevinvr

New member
Joined
Jan 5, 2009
Messages
193
Reaction score
0
Points
0
Location
Asuncion, Paraguay
Alpha 100310:
http://orbides.1gb.ru/orbf/uap-alpha-100310.zip

3. Land runway autopilot and re-entry autopilot - full runway-docking-runway autopilot, and beta/gold release.

Thoughts?
Ideas?
Problems?
Don't forget, your feedback defines the quality of the add-on you will get.
Is this what I think it is? eg takeoff from wideawake, dock with iss, reenter and land on wideawake? If I am understanding correctly all I have to say is WOW!!
Thanks for the new update:tiphat:, can't wait for the weekend to try it out.!
 

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
Is this what I think it is?
Sorry to burst your balloon, but this is explicitly specified to be the distant, final goal in the plans, not something already working. I'll try to make it more clear in the future releases, if any.
 

mjanicki

Addon Developer
Addon Developer
Donator
Joined
Apr 4, 2008
Messages
106
Reaction score
0
Points
0
Location
Spokane
Nice, just to clarify - do you put the altitude in there? Doesn't look like any default.
Yes, that is a remnant from me messing around before I understood how that autopilot functioned. Please ignore that 30 km altitude.

Um, that autopilot only works with air surfaces - elevators, rudder, etc.
Ahh, thank you for the explanation. Now I understand why I wasn't getting the desired result with a ShuttleA. The runway_off is for those fancy pilots whose vessels have control surfaces. :) No worries as the regular lift_off works just fine going from hover to mains.

Again, thanks for the explanation and this fantastic work. I plan to test out some target launches and docking tonight and tomorrow and will let you know if I run into any problems.

-- Mike
 

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
hello,

I have some trouble with this add-on:

orbiter2010-03-1207-59-49-53.jpg


there is nothing I can select. it doesn't matter witch button I press, nothing happenn. and when I press < or > I get a CTD

I tried it in a falcon 9, but it doesn't matter wich one I choose, I get the same result with other vehicles

what am I doing wrong? do I need some extra dll's or something??

I have version 100310

Thanks!

Iron
 
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
I have some trouble wioth this add-on (see attachment)

there is nothing I can select. it doesn't matter witch button I press, nothing happenn. and when I press < or > I get a CTD
Are you sure you use Orbiter 2006P1 or better?
Do any of the scenarios in UAP-demos folder work?
EDIT: Judging by a better screenshot, you try to use it on a custom scenario.
What happens if you go to page 2 (Sequence) and press INS?
 
Last edited:

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
Are you sure you use Orbiter 2006P1 or better?
Do any of the scenarios in UAP-demos folder work?
EDIT: Judging by a better screenshot, you try to use it on a custom scenario.
What happens if you go to page 2 (Sequence) and press INS?


when I go to page 2 it works! I tried it earlier bu it didn't work. now it works, thanks!
 
Last edited:

Sideshow

New member
Joined
Jul 1, 2009
Messages
31
Reaction score
0
Points
0
I've been trying the demo scenarios one by one and all seems to be working well. I especially loved the Launch Many from the Moon scenario, one of the coolest things I've seen in orbiter :thumbup:

Now I need to read the manual and find out how to do it myself.
 

kevinvr

New member
Joined
Jan 5, 2009
Messages
193
Reaction score
0
Points
0
Location
Asuncion, Paraguay
Sorry to burst your balloon, but this is explicitly specified to be the distant, final goal in the plans, not something already working. I'll try to make it more clear in the future releases, if any.
That is ok, I did realize that it was just part of your ultimate plans...even so.. they're great plans:).
Have been using UAP now on the dgiv and Arrow and so far it's been very interestng going. Still trying to work out those sequences. Thanks for a great addon!!:thumbup:
 

mjanicki

Addon Developer
Addon Developer
Donator
Joined
Apr 4, 2008
Messages
106
Reaction score
0
Points
0
Location
Spokane
Hi, Artlav. All good news with the things I've been testing using UAP alpha-100310.

Launch first ShuttleA into 200 km by 200 km orbit around Mars.
Code:
BEGIN_uap
  $SH-01:lift_off(engine=hover,mode=0,heading=70,altitude=200,pitch_tgt=0,pitch_duration=1,off_duration=0,stage=0),
  tools(type=0,key=g),
  lift_off(engine=main,mode=2,heading=70,pitch_tgt=45,pitch_duration=15,off_duration=0,stage=0),
  trans_orbit(engine=main,kind=0,apoapsis=200000,periapsis=200000,ta=0.000000,mode=0),
  attitude(engine=main,mode=0),
  attitude(engine=main,mode=2). 
END
Launch second ShuttleA into 200 km by 250 km orbit using first shuttle as a launch target and align planes after ascent.
Code:
BEGIN_uap
  $SH-02:lift_off(engine=hover,mode=0,target=SH-01,altitude=200,pitch_tgt=0,pitch_duration=0,off_duration=0,stage=0),
  tools(type=0,key=g),
  lift_off(engine=main,mode=2,target=SH-01,pitch_tgt=40,pitch_duration=15,off_duration=0.000000,stage=0),
  trans_orbit(engine=main,kind=0,target=SH-01,apoapsis=200000,periapsis=250000,ta=0.000000,mode=0),
  attitude(engine=main,mode=0),
  attitude(engine=main,mode=2),
  align(engine=main,target=SH-01,rinc_delta=0.010000),
  attitude(engine=main,mode=2).
END
5 runs of the same sequence of scenarios, results given are averaged over those 5 runs.

First vessel orbit: 199.8 km by 200.3 km
Second vessel orbit: 199.7 km by 250.2 km
Plane difference after targeted launch: 1.81 degrees
Plane difference after align: < 0.01 degrees

In case it makes a difference, I was using nonspherical gravity sources in Orbiter, but not gravity-gradient torque.

After a manual orbit sync, I tried an autopilot docking to the first shuttle.
Code:
BEGIN_uap
  $SH-02:dock(target=SH-01,port=0,with_port=0). 
END
The autopilot wouldn't engage, but I imagine that is because the ShuttleA does not have an IDS to lock onto. It's a visual-only docking so I wouldn't expect an autopilot to handle it. Or would I? :)

Good stuff. Enjoy the weekend.

-- Mike
 
Status
Not open for further replies.
Top