MechJeb2

MechJeb2

4M Downloads

Landing Autopilot EPIC rewrite

lamont-granquist opened this issue ยท 6 comments

commented

This is for wishlist features for a rewrite of the Landing Autopilot. This would be based on PEG-like explicit guidance.

This is the "Why can't MechJeb land my Falcon 9 automatically?" bug.

Also everything to do with "Land on flat surfaces and do everything possible so I don't tip over" bug.

(And generally the "Landing Autopilot freaks out and [lithobrakes, flies in circles, etc, etc]...." bug.

  • should support staging during landing
  • should support hoverslamming with TWR > 1 engines
  • two burn, zero throttling support (no dribble throttling, no wasting relights)
  • should support selecting the nearest sufficiently flat surface (see #254)
  • should optionally pass off to SmartASS to keep upright
  • should optionally support leaving the vehicle in a SmartASS hover
  • should support suborbital vacuum 'hops' from surface to surface (Launch-Land) (#115)
  • should support aerodynamic entries (ultimately should support F9 and F9H out of the box)
  • should target X meters above the terrain with Z m/s constant descent if the engines are throttable
  • should leave RCS and SAS on (optionally?)
  • should support FAR and stock aero models correctly
  • should know about gridfins
  • should know about chutes
  • should be able to land on Eve (optimally)
  • should also be able to land on Gilly with exceedingly high TWR engines
  • auto-warp must be handled correctly -- no smacking into the surface

This does not include fixing current bugs in the existing 'classic' landing autopilot.

Current Status is "Not Started"
Current ETA is ">> 6 months" (from whenever date you are reading this comment)

Blocked on getting better ascents and node execution code working and merged.

commented

Rock on good luck with all this, heck any of this is progress.

commented

PVG is "Primer Vector Guidance" which is the current RSS/RO launch ascent guidance. It is based on optimal control theory / primer vector theory / calculus of variations / "indirect" optimization.

UI/UX is User Interface / User Experience.

commented

I was just in a whole though process and I don't mean this disrespectful in any way but maybe this could be useful? And if you have any questions or anything please message me. Once again with the upmost respect.

Wouldn't it be cool to have a Space Shuttle autoland possibility? As drop down from options:

  • Powered Landing
  • Parachute Landing
  • Gliding Landing

I think the following things have to be taken into account, at least from my AE background:

  • The spaceship will enter with an angle of attack of 40 degrees in it's last of second to last stage to be sure that the ship doesn't burn. The stage number you should be able to select already in the menu. I don't know if you can easily get the drag coefficient under the 40 degree angle but that should be implemented to know when and where to burn to get the ship just in front of the runway.

  • The spaceship has a glide angle which is related to L/D=1/(tan(alpha)) should be the the automatically selected approach path. The speed is a function of it's weight.

  • The flare should also be incorporated to have the aircraft touch down at 0 vertical speed and a positive angle of 5 degrees. The flare should take 2 seconds (as is used in real life engineering) to get it from the glide angle to the 5 degrees positive rate. The flare moment or height should be calculated as followed:

  1. The speed of approach should be obtained.
  2. The deceleration during flare should be taken as the average angle of beginning and end of maneuver times the lift coefficient times two seconds so the amount of dV and eventually height can be calculated of the maneuver.
  3. The lift then at the 5 degree angle and the speed (which is squared so it's not just average) should be used to determine the time and height needed of the deceleration.
  4. To get it on the right runway the glide angle path (without flare) should be placed just on the end of the runway.
  • And some rough thoughts to get from the 40 degree angle to the glide angle after reentry. I don't know if in KSP the glide ratios change from hypersonic to supersonic to normal as it does in actual life, but after leaving the hypersonic trajectory the nose could be lowered to 0 degrees angle of attack until it would hit Mach 2 and then it would duck to it's glide angle and do the final part of the approach described above. This is to simplify the supersonic to subsonic calculations.
    This data could be used to calculate the intersect point of the orbit and the start of the decent.

  • Most ships have airbrakes so maybe these could be used to get to the proper velocity on the final part of the velocity. Some redundant air speed could be used to be sure to get the ship on the runway every time.
    -The breakes and parachutes might be automatically deployed once after the touch down? And the parachutes cut at a certain speed (25 m/s?)?

  • During the decent the spacecraft will decrease in mass used for attitude correction. This could be modelled (painstakingly) for the flare moment but the location of the glide trajectory wouldn't change. Or you could simply update it just around the flare moment when it is travelling subsonic already.

commented

So, I think that's probably out of scope of all this. The Landing Autopilot is more focused on rocket-driven and/or parachute driven landing. Just from a UI/UX perspective it probably wouldn't support high lift to drag hypersonic landing like that, which is more of an aircraft autoland autopilot. All useful stuff, but probably would need to go somewhere else. And I'm certainly 2-3 years away from even /thinking/ about that myself...

commented

There's also a lot of work on entry guidance using more or less the same control principles behind PVG: https://arc.aiaa.org/doi/abs/10.2514/1.62605 and https://www.sciencedirect.com/science/article/pii/S1270963818301354

commented

I'm going to be a complete fool here but what do you mean with UI/UX and PVG?