Skip to content

PaoloBrito01/AutoLanding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoLanding — Spaceflight Simulator Mod

License: MIT Version BepInEx

Automatic rocket landing autopilot for Spaceflight Simulator (Steam/PC).

AutoLanding demo


Features

  • 3-phase state machine: Coast → Braking → Final approach
  • PID velocity control with feedforward hover compensation
  • Reads local gravity in real time — works on the Moon, Mars, or custom planets
  • Corrects horizontal drift automatically
  • Emergency governor prevents suicide burns at high speed
  • Draggable HUD overlay with real-time telemetry
  • Compatible with any rocket with TWR ≥ ~1.1

Requirements

  • BepInEx 5.4.x installed in your SFS game folder
  • Spaceflight Simulator (Steam, PC)

Installation

  1. Install BepInEx 5.4.x if you haven't already — follow the BepInEx installation guide
  2. Download AutoLanding.zip from the Releases page and extract it
  3. Copy AutoLanding.dll to:
    <SFS game folder>\BepInEx\plugins\AutoLanding.dll
    
  4. Launch the game — BepInEx will load the mod automatically

Usage

Key Action
F8 Toggle autopilot on / off

Once activated, a HUD window appears in the top-left corner showing:

Field Description
Estado Current phase: Coast / Braking / Final / Landed
Altitude Height above terrain (m)
VSpeed Vertical speed (m/s, negative = descending)
HSpeed Horizontal speed (m/s)
Throttle Current throttle %
BurnAlt Calculated braking altitude (m)
VProfile Maximum safe speed at current altitude (m/s)
TWR Thrust-to-weight ratio

Tips:

  • Activate during a suborbital arc with engines off for best results
  • Works best with TWR ≥ 1.2; lower TWR increases braking distance
  • The rocket must be pointing roughly upward on activation

How it works

The autopilot runs a three-phase algorithm:

Phase Trigger Behavior
Coast h > burnAlt × 1.35 Engines off; attitude controller keeps rocket vertical
Braking h ≤ burnAlt × 1.35 Main deceleration burn; velocity target = min(0.85 × vProfile, 0.32 × √(2gh))
Final h < 25 m Smooth linear ramp from braking speed down to touchdown at 0.35 m/s

An emergency governor overrides to full throttle if the burn margin drops below 85% or current speed reaches 90% of the safe velocity profile.

Building from Source

  1. Clone the repo
  2. Copy Directory.Build.props.exampleDirectory.Build.props
  3. Edit Directory.Build.props — set <SFSGamePath> to your SFS game folder
  4. Build and deploy:
    .\deploy.ps1
    Or just build without deploying:
    dotnet build -c Release AutoLanding
    

License

MIT

About

Automatic landing autopilot mod for SpaceFlight Simulator (BepInEx)

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors