Automatic rocket landing autopilot for Spaceflight Simulator (Steam/PC).
- 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
- BepInEx 5.4.x installed in your SFS game folder
- Spaceflight Simulator (Steam, PC)
- Install BepInEx 5.4.x if you haven't already — follow the BepInEx installation guide
- Download
AutoLanding.zipfrom the Releases page and extract it - Copy
AutoLanding.dllto:<SFS game folder>\BepInEx\plugins\AutoLanding.dll - Launch the game — BepInEx will load the mod automatically
| 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
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.
- Clone the repo
- Copy
Directory.Build.props.example→Directory.Build.props - Edit
Directory.Build.props— set<SFSGamePath>to your SFS game folder - Build and deploy:
Or just build without deploying:
.\deploy.ps1
dotnet build -c Release AutoLanding
