FlySpark logo
Betaflight logoBetaflightBetaflight setup guidesUpdated

Betaflight position hold and altitude hold setup

FlySpark's Position hold tab is the Betaflight screen for altitude hold, position hold and the autopilot numbers those modes share with GPS Rescue. It reads matching CLI variables with a framed get and writes each change as set name = value. The controls appear when the board is Betaflight and reports MSP API 1.47 or newer, which is Betaflight 2025.12. Older firmware, including the in-browser demo, gets an explanation card instead of the fields.

Connect in Chrome or Edge over USB or Bluetooth. The Android app also connects over USB OTG or Wi-Fi. The iPhone app connects over Bluetooth or Wi-Fi. An iPhone has no USB host, so it never sees a flight controller over USB, and a browser page cannot open the craft's Wi-Fi. Take the propellers off before you test a hold. GPS and the GPS Rescue return path are on the GPS page. Assign ALTHOLD and POSHOLD on the Modes tab.

Free. Hardware connections need Chrome or Edge on a computer; phones use the FlySpark app.

  • Free
  • Nothing to install
  • Demo without hardware

In short

Betaflight position hold, altitude hold and the shared autopilot numbers live on the Position hold tab in FlySpark. The tab needs Betaflight 2025.12 (MSP API 1.47). The in-browser demo is Betaflight 4.5 (API 1.46) and shows that this firmware is older.

Key facts

  • Position hold needs Betaflight 2025.12, which reports MSP API 1.47.
  • The browser demo is Betaflight 4.5 (API 1.46) and only shows that the firmware is older.
  • ALTHOLD holds height in Angle mode. POSHOLD is assigned on the Modes tab.
  • Allow without compass is off unless you turn it on. Heading can then drift.
  • Hover throttle is 1100 to 1700 µs. Altitude hold, position hold and GPS Rescue start from it.
  • Maximum angle, 10 to 70 degrees, appears when the board reports MSP API 1.48.
  • Betaflight logoBetaflight
  • INAV logoINAV
  • ArduPilot logoArduPilot
  • PX4 logoPX4
  • BLHeli_S
  • Bluejay logoBluejay
  • AM32 logoAM32
  • ExpressLRS logoExpressLRS
  • EdgeTX logoEdgeTX
  • DroneCAN logoDroneCAN
  • MAVLink logoMAVLink

Try it

Hold the spot

The craft holds between 1100 and 1700 µs. The 4.5 demo does not fly this.

Hold

Betaflight

Features

  • 01

    Three CLI groups

    Names starting with alt_hold_, pos_hold_, autopilot_ or ap_ are grouped as Altitude hold, Position hold and Autopilot. A documented name gets a label, a unit and help. Any other match is shown as the CLI name and its raw value.

  • 02

    Firmware gate

    Below MSP API 1.47 the card says Needs Betaflight 2025.12 or newer. The body says altitude hold, position hold and the autopilot arrived with MSP API 1.47, then prints the API the board reported.

  • 03

    Build without the settings

    A new enough API with no alt_hold, pos_hold or autopilot variables says Not in this firmware build, and tells you to build Betaflight with altitude and position hold (GPS and a barometer).

  • 04

    Switches and whole numbers

    Allowed values of exactly OFF and ON become a switch labelled Off and On. Other numbers use minus and plus, clamp to the range the board reported, and send a whole number. The hint ends with the CLI name and the default.

  • 05

    Shared with GPS Rescue

    The Autopilot footer says the block is shared by altitude hold, position hold and GPS Rescue. Hover throttle, throttle limits, altitude and position gains, and landing altitude sit here.

  • 06

    Angle limit on API 1.48

    Maximum angle is absent on API 1.47 and present on API 1.48. It is the largest lean, in degrees, used while holding position or flying GPS Rescue. The range is 10 to 70, default 50.

  • 07

    Demo stays on 4.5

    The simulated board in the browser is Betaflight 4.5 and reports MSP API 1.46. The tab then shows the newer-firmware card. The hold fields are not on that demo.

What you see before the controls

If the board is Betaflight and its API minor is below 47, FlySpark does not query the hold variables. The card is titled Altitude and position hold. The row is Needs Betaflight 2025.12 or newer. The subtitle says altitude hold, position hold and the autopilot arrived with MSP API 1.47, then the API the board reported. The in-browser demo reports 1.46 because that firmware is Betaflight 4.5. The card is the whole tab: no climb rate, deadband or hover throttle, and that screen is only the older-firmware notice.

On API 1.47 or newer, framed CLI queries for alt_hold, pos_hold, autopilot and ap_ keep names with those prefixes. An empty result says Not in this firmware build: the board reports no alt_hold, pos_hold or autopilot settings, and using them means a build with altitude and position hold (GPS and a barometer). Documented names come first. Other matches follow by name, as a plain row with the raw value.

Altitude hold and position hold

Altitude hold needs a barometer or GPS altitude. Assign ALTHOLD on the Modes tab. The footer says it flies in Angle mode while holding height. Climb rate is alt_hold_climb_rate, in cm/s, allowed range 1 to 200, default 50. It is the climb or descent speed with the throttle stick fully up or down. Altitude is held with the stick centred. Throttle deadband is alt_hold_deadband, in percent, range 5 to 70, default 20. It is the band around centre throttle, as a percentage of the stick range, where altitude is held. Outside it, the throttle commands a climb or descent. This percent deadband is the Betaflight control. INAV's altitude deadband is a different stick-point setting in the INAV configurator.

Position hold needs a GPS with a 3D fix, and a compass unless allowed without. Assign POSHOLD on the Modes tab. Allow without compass is pos_hold_without_mag, values OFF and ON, so it is a switch. The default is Off. The help line says it lets Position Hold engage without a working compass, that heading can drift so the hold may wander, and that holds should stay short with yaw avoided. Stick deadband is pos_hold_deadband, in percent, range 0 to 50, default 5. It is the roll and pitch band where position is held. Past it the craft flies like Angle mode, and a new hold point is taken when the sticks return. A value of 0 ignores the sticks. The hint includes the CLI name and the default, such as pos_hold_deadband, default 5.

Autopilot numbers shared with GPS Rescue

The Autopilot footer says the block is shared by altitude hold, position hold and GPS Rescue. GPS Rescue is Betaflight's return path, set on the Failsafe tab and described on the GPS page. These gains are separate from the roll, pitch and yaw table on the PID tab.

Landing altitude is autopilot_landing_altitude_m, 1 to 15 m, default 4. It is the height above home where GPS Rescue and autopilot landings start the slow final descent. Hover throttle is autopilot_hover_throttle, 1100 to 1700 µs, default 1275. Altitude hold, position hold and GPS Rescue start from it, so set it close to the real hover. Minimum throttle is autopilot_throttle_min, 1050 to 1400 µs, default 1100, the lowest the altitude controller may command. Maximum throttle is autopilot_throttle_max, 1400 to 2000 µs, default 1700, the highest it may command.

Altitude P, I, D and feedforward (autopilot_altitude_P, _I, _D and _F) are each 0 to 200, default 15. P corrects height error: too high bounces, too low sags. I removes steady error such as sag as the battery drains. D damps vertical speed so climbs and descents stop without overshoot. Feedforward sends the requested climb rate straight to the throttle. Position P, I, D and acceleration (autopilot_position_P, _I, _D and _A) are each 0 to 255, default 30. P pulls back to the hold point. I removes steady drift, for example from wind. D damps speed relative to the hold point. Acceleration damps changes in speed and smooths GPS noise. Position filter cutoff is autopilot_position_cutoff, 10 to 250, default 80, the low-pass for the speed and acceleration terms. Lower is smoother and responds later.

Maximum angle is autopilot_max_angle, in degrees, only when the board reports MSP API 1.48. The range is 10 to 70, default 50. It is the largest lean the autopilot may use while holding position or flying GPS Rescue. On API 1.47 the row is absent. Save sends each edit as a framed CLI set of a whole number, then stores it with the other edits.

Modes, GPS and where to connect

The hold cards do not assign the switch themselves. Put ALTHOLD and POSHOLD on the Modes tab and flip each switch so the channel range lights, the same way as ARM or ANGLE on the Modes page. A GPS 3D fix is part of the position-hold footer. The compass stays required until Allow without compass is on. Everyday ports and the other tabs are in the Betaflight configurator. INAV position hold and return to home are a different firmware. Open the INAV configurator for those.

In the browser, use Chrome or Edge. USB and Bluetooth work there. Wi-Fi to an ESP serial bridge or a simulator is the Android and iPhone apps. Safari and Firefox stay on the demo, and that demo is the Betaflight 4.5 board that reports API 1.46.

At a glance

Position hold ranges reported to the tab

FirmwareBetaflight 2025.12 (MSP API 1.47) or newer. Maximum angle needs API 1.48. The browser demo is 4.5 (API 1.46).
Altitude holdClimb rate 1 to 200 cm/s, default 50. Throttle deadband 5 to 70 percent, default 20.
Position holdAllow without compass OFF or ON, default OFF. Stick deadband 0 to 50 percent, default 5.
ThrottleHover 1100 to 1700 µs, default 1275. Minimum 1050 to 1400 µs, default 1100. Maximum 1400 to 2000 µs, default 1700.
GainsAltitude P, I, D and feedforward each 0 to 200, default 15. Position P, I, D and acceleration each 0 to 255, default 30. Cutoff 10 to 250, default 80. Landing altitude 1 to 15 m, default 4. Maximum angle 10 to 70 degrees, default 50, on API 1.48.
ConnectionChrome or Edge over USB or Bluetooth. Android: USB, Bluetooth or Wi-Fi. iPhone: Bluetooth or Wi-Fi. iPhone has no USB host.

Betaflight

How to set Betaflight position hold in FlySpark

  1. Confirm the firmware

    Connect the flight controller. If the tab says Needs Betaflight 2025.12 or newer, the board is older than MSP API 1.47. The in-browser demo reports 1.46 and stops on that card. Flash 2025.12 or newer on hardware before the fields appear.

  2. Check the build

    If the tab says Not in this firmware build, the API is new enough but no alt_hold, pos_hold or autopilot variable came back. Use a build that includes altitude and position hold, which needs GPS and a barometer.

  3. Set the two holds

    Set Climb rate from 1 to 200 cm/s (default 50) and Throttle deadband from 5 to 70 percent (default 20). Leave Allow without compass off unless you accept a wandering heading. Set Stick deadband from 0 to 50 percent (default 5). Assign ALTHOLD and POSHOLD on the Modes tab.

  4. Set the shared autopilot values

    Set Hover throttle near a real hover, inside 1100 to 1700 µs (default 1275). Keep minimum throttle inside 1050 to 1400 µs and maximum throttle inside 1400 to 2000 µs. Set landing altitude from 1 to 15 m. On API 1.48, set Maximum angle from 10 to 70 degrees.

  5. Save and test

    Save writes each edited variable as a framed CLI set and stores it. The hint on a row shows the CLI name and the default the board reported. Test with the propellers off, then with a GPS fix, before trusting a hold.

Troubleshooting

Common problems and fixes

  • Problem

    The tab says Needs Betaflight 2025.12 or newer

    Fix

    The board reported an MSP API older than 1.47. The subtitle prints the required API and the reported one. The in-browser demo reports 1.46 because it is Betaflight 4.5. Update a real board to 2025.12 or newer. The fields appear only after that check passes.

  • Problem

    The tab says Not in this firmware build

    Fix

    The API is 1.47 or newer, but no name started with alt_hold_, pos_hold_, autopilot_ or ap_. Use a build that includes altitude and position hold (GPS and a barometer).

  • Problem

    Position hold wanders or the sticks do nothing

    Fix

    Allow without compass On means heading can drift. Turn it off when a compass is fitted. The footer also requires a GPS 3D fix. Stick deadband 0 ignores the sticks. The default is 5 percent, inside 0 to 50.

  • Problem

    Altitude sags, bounces, or the throttle hunts

    Fix

    Set Hover throttle near the real hover, inside 1100 to 1700 µs. Minimum throttle is 1050 to 1400 µs and maximum is 1400 to 2000 µs. Altitude P too high bounces and too low sags, inside 0 to 200. Climb rate only runs from 1 to 200 cm/s.

  • Problem

    Maximum angle is missing, or a typed value will not stick

    Fix

    Maximum angle arrives with MSP API 1.48, range 10 to 70 degrees, default 50. Number rows clamp to the allowed range and send a whole number. The hint shows the CLI name and the default. OFF and ON become a switch. Any other lookup is a choice list, with names such as GPS_ONLY in sentence case.

Glossary

Glossary of terms

ALTHOLD
The mode named on the Altitude hold footer. Assign it on the Modes tab. It flies in Angle mode while holding height, and needs a barometer or GPS altitude.
POSHOLD
The mode named on the Position hold footer. Assign it on the Modes tab. It needs a GPS 3D fix and a compass unless Allow without compass is on.
GPS Rescue
Betaflight's return path. The Autopilot footer says hover throttle, throttle limits, gains and landing altitude are shared with it. Return altitude itself is on the Failsafe tab.
MSP API 1.47
The API FlySpark requires before it reads these CLI variables. The tab ties that API to Betaflight 2025.12. The 4.5 demo reports 1.46.
Framed CLI
The channel this tab uses. It runs get for each name prefix and writes set name = value, then stores the edit with the other saved settings.

FAQ

Frequently asked questions

Which Betaflight version has position hold?

Betaflight 2025.12, MSP API 1.47, is the first API the tab accepts. The text says altitude hold, position hold and the autopilot arrived with MSP API 1.47. Maximum angle appears when the board reports API 1.48.

Does the FlySpark demo fly position hold?

The in-browser demo is simulated Betaflight 4.5 and reports MSP API 1.46. The tab shows Needs Betaflight 2025.12 or newer and that reported API. The hold fields are not on that demo.

What is the difference between ALTHOLD and POSHOLD?

ALTHOLD flies in Angle mode while holding height, and needs a barometer or GPS altitude. POSHOLD needs a GPS 3D fix and a compass unless Allow without compass is on. Both are assigned on the Modes tab.

Can position hold run without a compass?

Only with Allow without compass (pos_hold_without_mag) On. The default is Off. The help line says heading can drift, the hold may wander, and holds should stay short with yaw avoided.

What does a stick deadband of 0 do?

The help line says 0 ignores the sticks. The range is 0 to 50 percent, default 5. Past the deadband the craft flies like Angle mode, and a new hold point is taken when the sticks return.

Why is hover throttle on this tab?

It is in the Autopilot group. Altitude hold, position hold and GPS Rescue start from it. The range is 1100 to 1700 µs, default 1275. Set it close to the throttle that actually hovers.

Are these the same numbers as the PID tab?

The gains here are autopilot_altitude_P through autopilot_position_cutoff. The PID tab is roll, pitch and yaw. This block is shared by altitude hold, position hold and GPS Rescue.

Where is GPS Rescue configured?

This tab holds the shared landing altitude, hover throttle, throttle limits, gains and, on API 1.48, the maximum lean. Return altitude and sanity checks are on the Failsafe tab, covered on the GPS page.

Can an iPhone set position hold over USB?

An iPhone has no USB host. The iPhone app uses Bluetooth or Wi-Fi. USB is Chrome or Edge, and the Android app. Wi-Fi is the apps, because a browser cannot open the craft's Wi-Fi address.

References

Sources

The official documentation behind the background facts on this page.

  1. Position Hold (2025.12)Betaflight · betaflight.com
  2. Betaflight wikiBetaflight · betaflight.com
  3. NavigationINAV · github.com

Tools

See every FlySpark tool

Ready to try it?

Free. Hardware connections need Chrome or Edge on a computer; phones use the FlySpark app.