Geofencing
Last updated
Last updated
This feature is only applicable for PRS-M3DTEX users who are running firmware version 3.6.4 or later.
DJI has not yet released the functionality in the FlightHub 2 platform to export Custom Task Areas (i.e., geofences). This document will be updated when this feature is released. Meanwhile, AVSS PRS-M3DTEX users can use the QGroundControl platform to design their desired geofence and import it to the AVSS PRS-M3DTEX.
This instruction set assumes that the user has already designed a geofence in FlightHub 2. For instructions on how to design a geofence in FlightHub 2, refer to the DJI FlightHub 2 user manual at the following link: https://fh.dji.com/user-manual/en/overview.html
Follow the instructions at the link below to install the QGroundControl platform onto a local computer: https://docs.qgroundcontrol.com/master/en/qgc-user-guide/getting_started/download_and_install.html
If prompted to select a firmware and vehicle type during the process, ensure that "PX4 Pro" and "Multi-Rotor" are both selected.
Open QGroundControl and then click the “Fly Plan” icon to create the Geofence.
Refer to the instructions at the link below to design the desired geofence:
https://docs.qgroundcontrol.com/master/en/qgc-user-guide/plan_view/plan_geofence.html
Ensure that "inclusion" is selected as the Fence type, as this will match the green “Custom Task Area” in DJI Flight Hub 2. Ensure that your fence matches the fence created in DJI Flight Hub 2 as closely as possible.
The following link shows how to export the designed geofence. Please save the geofence file as “PX4_mission.plan” as this is the name that the AVSS PRS recognizes as its current geofence mission.
https://docs.qgroundcontrol.com/master/en/qgc-user-guide/plan_view/plan_view.html
As outlined previously in the "Firmware Updates" section of this manual, firmware updates are conducted by connecting the PRS to a local computer, accessing AVSS Assistant and placing the PRS into "SD mode". These steps are repeated here.
Similar to a firmware update, the user will then copy-pase the geofence file exported in the previous step (labeled as "PX4_mission.plan") into the main directory of the PRS's SD card.
After successfully transferring the geofence file to the PRS SD Card storage, cycle the power of the PRS by unplugging the PRS fron the computer and then re-plugging it in.
ENSURE THAT THE PRS'S SD CARD DIRECTORY WINDOW IS CLOSED PRIOR TO DISCONNECTING THE PRS FROM THE COMPUTER TO AVOID CORRUPTING THE PRS SD CARD.
Upon re-connecting the PRS to the computer, follow the process detailed in the "Firmware Updates" section of this manual to put the PRS into "SD mode".
Once in "SD mode", navigate to the latest event log"
When checking the event log, use the actual log number (e.g. 000008) as a guide to the most recent event log instead of the calendar date on the log file. A higher number indicates a more recent log.
Ensure that the geofence information in the event log (i.e. shape, coordinates) is consistent with the key information in the "PX4_mission.plan" file. Note that the first two images shown below correspond to a circular geofence and the next two images correspond to a polygon geofence.
Once the geofence information on the PRS is confirmed, the user can install the PRS-M3DTEX on the DJI drone and check the status of the Geofence triggering function on the remote using the DJI Pilot float window. The following status indications will be shown in the window.
Status
Possible Values
geofence_mission_status
GEOFENCE_IDLE: When no geofence mission is set
GEOFENCE_SYNCING: When PRS synchronizes the geofence information with the drone
GEOFENCE_RUNNING: When the geofence triggering function is active and running
GEOFENCE_ERROR: When geofence information has an error
geofence_breach_status
BREACH_NONE: When no geofence breach has happened
BREACH_MINALT: When a geofence breach happened due to violating minimum altitude
BREACH_MAXALT: When a geofence breach happened due to violating maximum altitude
BREACH_BOUNDARY: When a geofence breach happened due to crossing a boundary
geofence_id
mission_opaque_id,
geofence_circle_count,
geofence_polygon_count
in the following format: “%04d-%04d-%04d”
Polygon geofences must have fewer than 50 vertices in total. Circle geofences must have fewer than 15. If these limits are exceeded, the PRS-M3DTEX will fail to fully import the geofence information and record one of the following messages in the event log: "The geofence file is too large to import", or "Out of memory. DISARMED".
Arming and Disarming: Auto arming/disarming conditions of the Geofence triggering function are the same as ATS’s. Please also note that when the geofence triggering function is armed, the drone must have already been in an inclusive geofence and outside of exclusive geofences. Therefore, make sure the whole flight from takeoff to land stays in an inclusive geofence zone and outside of any exclusive geofence zone.
VERTICAL_BUFFER_BASELINE and HORIZONTAL_BUFFER_BASELINE: The geofence triggering function in PRS considers a vertical and horizontal buffer at the boundaries of the geofences where the parachute deployment command is masked. The baseline values for vertical and horizontal buffers are 30m and 20m, respectively. However, note that if the onboard GNSS module of the PRS estimates that vertical or horizontal accuracies are better, those values DO NOT overwrite the baseline values. For instance, if the GNSS module estimates that the vertical positioning accuracy is 25m, the vertical buffer is still the baseline value of 30m; however, if the GNSS module estimates that the horizontal positioning accuracy is 25m, the horizontal buffer will be set to 25s instead of the baseline value of 20m.
GEOFENCE_TRIGER_DELAY: If the drone crosses the geofence boundary and also passes the buffer distance discussed before, the pilot has 5 seconds to react and bring the drone back to a safe zone before the parachute is deployed.
VERTICAL_BUFFER_MAXIMUM and HORIZONTAL_BUFFER_MAXIMUM: If the onboard GNSS positioning error grows above a certain threshold, the PRS will disable the Geofence trigger function. The vertical and horizontal thresholds are 50m and 30m, respectively.
The maximum altitude is based off of the Barometric Altitude Above Takeoff provided by the onboard barometer. To set the ceiling of the PRS open the AVSS Assistant software and connect the PRS to the computer via the provided USB-C cable.
After connecting to the PRS, click “Device Parameters”
Then set the ceiling by adding a value in meters Above Takeoff Level in the “Set Maximum Safety Height” text box, then click “SET”. You should see the “Maximum Safety Height” change in the list of parameters above.
When planning a mission, provide a sufficient buffer in the altitude so that you clear any elevations in the terrain in your flight area.
When setting the Maximum Safety Height, consider the highest building/elevation point within the flight plan so that the Altitude Above Takeoff is never greater than the Maximum Safety Height.