The current max value for setting GF_MAX_HOR_DIST and GF_MAX_VER_DIST is 10000m in QGroundControl. Is there a reason for using 10000m as a limitation? Is it ok to extend this value to larger values?
Hi,
Welcome to the PX4 community!
Both GF_MAX_HOR_DIST and GF_MAX_VER_DIST are PX4 geofence parameters.
The 10,000 m limit may originate from the parameter metadata supplied by the firmware rather than being a hardcoded QGroundControl limitation.
In principle, larger values may be supported, but I would verify the following before changing the limits:
-
Check the parameter definitions in your specific PX4 firmware version, particularly the
@maxmetadata. -
Verify whether QGroundControl is enforcing the limit received from the firmware.
-
Check the geofence implementation for any additional range assumptions.
-
If extending the supported range, update the relevant parameter metadata and validate the behavior in SITL first.
I would also treat the two parameters separately. Increasing the horizontal geofence radius is not equivalent to increasing the permitted flight altitude.
For GF_MAX_VER_DIST, operational altitude restrictions and applicable airspace regulations remain relevant regardless of what the firmware allows.
Could you confirm which PX4 firmware version and QGroundControl version you’re using, and what maximum distance you need?
That would help determine whether this requires a PX4 parameter-definition change, a QGC change, or both.
Best regards,
Yiğitcan Öztürk
PAMILANGA LIMITED
Thank you for your answer. I’m using PX4 v1.17.0, QGroundControl v5.1.5. I want to set both values to 20000m. I can “force save” GF_MAX_HOR_DIST and GF_MAX_VER_DIST to larger values. I can also modify the @max metadata to display larger values in QGroundControl. I’m wondering if there is any physical reason for the 10000m limit, e.g., communication delay or flight control stability at altitudes above 10000+.
Hi,
Thanks for confirming the versions and the intended 20,000 m limits.
There is an important distinction between a geofence parameter limit and a physical flight limitation.
For GF_MAX_HOR_DIST, increasing the geofence radius from 10 km to 20 km should not, by itself, introduce communication latency or reduce flight-controller stability. The geofence check operates on the vehicle’s estimated position; it does not depend on continuous communication with QGroundControl.
For GF_MAX_VER_DIST, the situation is different. This parameter defines a vertical geofence distance, not the aircraft’s physical altitude capability. Setting it to 20,000 m does not mean the aircraft can safely operate at that altitude.
Actual altitude capability depends on the airframe, propulsion system, atmospheric conditions, sensor limitations, and applicable regulations.
Since you can already force-save larger values, the next step is to distinguish the parameter metadata limit from any internal implementation constraints.
I would suggest:
-
Checking the PX4 v1.17.0 geofence implementation for assumptions about the maximum distance.
-
Testing 20,000 m horizontal and vertical geofence boundaries separately in SITL.
-
Verifying the expected geofence warning and violation behavior.
-
Confirming that the parameters retain their values after reboot.
I haven’t yet verified the exact reason for the 10,000 m metadata limit in the v1.17.0 source, so I wouldn’t characterize it as purely arbitrary without checking.
If those checks pass, increasing the metadata maximum may be reasonable. I would still avoid treating the higher vertical limit as evidence of safe high-altitude operation.
Best regards,
Yiğitcan Öztürk
PAMILANGA LIMITED
Thank you very much for the detailed information. I’ll run the checks and tests as you suggested.