Skip to main content

Path Planning Parameters (Fixed-wing aircraft)

PathPlanningParameter

Description: Fixed-wing aircraft path planning parameters

class PathPlanningParameter {
/**
* Basic information for path planning parameters
*/
private IntroInfo introInfo;
/**
* Information related to takeoff and departure routes
*/
private LaunchInfo launchInfo;
/**
* Information related to approach and landing routes
*/
private LandInfo landInfo;
/**
* Information related to forced landing routes (currently unused)
*/
private ArrayList<ForceLandInfo> forceLandInfo;
/**
* Information related to mission routes
*/
private ArrayList<MissionInfo> missionInfo;
/**
* Algorithm return error code
*/
private ErrorCode errorCode;
}

IntroInfo

Description: Basic route information

class IntroInfo {
/**
* Bitwise value representing the validity of this structure:
* bit1: LAUNCH
* bit2: LANDING
* bit3: FORCELAND
* bit4: MISSION
* Example for route containing takeoff, landing and mission:
* MISSION LANDING LAUNCH
* -----------------------------
* 1 << 3 | 1 << 2 | 1 = 11
*/
private int planningType;
/**
* Number of valid sub-missions in the operation task
*/
private int subMisNum;
/**
* Number of valid forced landing points
*/
private int forceLandNum;
/**
* Initial position latitude
*/
private double initLat;
/**
* Initial position longitude
*/
private double initLon;
/**
* Initial position altitude
*/
private float initAlt;
/**
* Minimum turning radius
*/
private float MinRadius = 100;
/**
* Maximum vertical speed
*/
private float MaxVz = 3;
/**
* Route cycle mode: -1: infinite loop; 0: no loop; n: loop n times
*/
private int CycleMode;
/**
* Starting sub-task for route cycle
*/
private int StartSubID = 1;
/**
* Starting waypoint for route cycle
*/
private float StartWPID = 1;
/**
* Ending sub-task for route cycle
*/
private int EndSubID = 1;
/**
* Ending waypoint for route cycle
*/
private float EndWPID = 1;
}

LaunchInfo

Description: Information related to takeoff point

class LaunchInfo {
/**
* Takeoff point latitude
*/
private double launchLat;
/**
* Takeoff point longitude
*/
private double launchLon;
/**
* Takeoff point absolute altitude (above sea level)
*/
private float launchAlt;
/**
* Departure loiter point latitude
*/
private double departureLat;
/**
* Departure loiter point longitude
*/
private double departureLon;
/**
* Departure loiter point altitude
*/
private float departureAlt;
/**
* Departure loiter point altitude type 1: Absolute altitude (ASL); 2: Relative altitude
*/
private int altType;
/**
* Departure loiter radius
*/
private float departureR;
/**
* Departure flight speed
*/
private float departureVel;
/**
* Vertical takeoff relative altitude
*/
private float transAlt;
}

LandInfo

Description: Information related to approach and landing point

class LandInfo {
/**
* Approach point latitude
*/
private double approachLat;
/**
* Approach point longitude
*/
private double approachLon;
/**
* Approach point altitude
*/
private float approachAlt;
/**
* Approach point altitude type 1: Absolute altitude (ASL); 2: Relative altitude
*/
private int altType = 2;
/**
* Approach loiter radius
*/
private float approachR;
/**
* Approach flight speed
*/
private float approachVel = 20;
/**
* Landing point latitude
*/
private double homeLat;
/**
* Landing point longitude
*/
private double homeLon;
/**
* Landing point altitude
*/
private float homeAlt;
/**
* Landing point altitude type 1: Absolute altitude (ASL); 2: Relative altitude
*/
private int homeAltType = 2;
/**
* Landing transition relative altitude
*/
private float transAlt;
}

ErrorCode

Description: Error codes

enum class ErrorCode {
/**
* Number of polygon vertices in survey area exceeds limit
*/
CODE_10001(CodeType.NEW_ROUTE, 1),
/**
* Number of Mission Items generated from normal waypoints exceeds limit
*/
CODE_10002(CodeType.NEW_ROUTE, 2),
/**
* Number of Mission Items generated from sub-tasks exceeds limit
*/
CODE_10003(CodeType.NEW_ROUTE, 4),
/**
* Number of Mission Items exceeds limit when constructing landing module
*/
CODE_10004(CodeType.NEW_ROUTE, 8),
/**
* Number of Mission Items generated from sub-tasks exceeds limit
*/
CODE_10005(CodeType.NEW_ROUTE, 16),
/**
* Number of Mission Items exceeds limit when constructing landing module
*/
CODE_10006(CodeType.NEW_ROUTE, 32),
/**
* Unsupported PlanningType
*/
CODE_10007(CodeType.NEW_ROUTE, 64),
/**
* Unsupported SubMissionType
*/
CODE_10008(CodeType.NEW_ROUTE, 128),
/**
* Number of 2D blocks exceeds limit
*/
CODE_10009(CodeType.NEW_ROUTE, 256),
/**
* Number of 3D blocks exceeds limit
*/
CODE_10010(CodeType.NEW_ROUTE, 512),
/**
* Number of route sampling points exceeds limit (route over 100km)
*/
CODE_10011(CodeType.NEW_ROUTE, 1024),
/**
* Two consecutive sampling points have identical latitude and longitude
*/
CODE_10012(CodeType.NEW_ROUTE, 2048),
/**
* Invalid combination of adjacent points
*/
CODE_10013(CodeType.NEW_ROUTE, 4096),
/**
* Less than 2 anchor points in observation path
*/
CODE_20001(CodeType.INSPECTION, 1),
/**
* More than 1000 anchor points in observation path
*/
CODE_20002(CodeType.INSPECTION, 2),
/**
* Generated waypoints fewer than anchor points due to wide strip width and sharp bends
*/
CODE_20003(CodeType.INSPECTION, 4),
/**
* Cannot generate route due to observation path reverse fold
*/
CODE_20004(CodeType.INSPECTION, 8),
/**
* More than 10000 sampling points when sampling terrain
*/
CODE_20005(CodeType.INSPECTION, 16),
/**
* Internal algorithm waypoint groups exceed 1000
*/
CODE_20006(CodeType.INSPECTION, 32),
/**
* Waypoints within algorithm group exceed 100
*/
CODE_20007(CodeType.INSPECTION, 64),
/**
* Invalid camera FOV, negative or over 180 degrees
*/
CODE_20008(CodeType.INSPECTION, 128),
/**
* Target width polygon generation failed due to ring formation
*/
CODE_20009(CodeType.INSPECTION, 256),
/**
* Route generation failed due to inability to calculate line offset
*/
CODE_20010(CodeType.INSPECTION, 512),
/**
* Invalid home point coordinates or loiter points
*/
CODE_90001(CodeType.COMMON, 90001),
/**
* Waypoint mission is null
*/
CODE_90002(CodeType.COMMON, 90002),
/**
* Rectangle or polygon mission is null
*/
CODE_90003(CodeType.COMMON, 90003),
/**
* Inspection mission is null
*/
CODE_90004(CodeType.COMMON, 90004),

UNKNOWN(CodeType.UNKNOWN, -1);
}

MissionInfo

Description: Mission information

class MissionInfo {
/**
* Mission finish action: 1.LOITER; 2.GOHOME
*/
private int FinishMove;
/**
* Mission lost link action: 1.LOITER; 2.GOHOME
*/
private int LinkLostMove;
/**
* Mission type 1: Free waypoint route 2: Area survey route 3: Figure-8 loiter route
*/
private int subMissionType;
/**
* Sub-mission route information
*/
private SubMissionInfo subMissionInfo;
/**
* Sub-mission waypoint information
*/
private ArrayList<WPInfo> wpInfo;
/**
* Number of sub-mission waypoints
*/
private int WPNum;
/**
* Interest areas
*/
private ArrayList<InterestArea> InterestArea;
/**
* Number of interest areas
*/
private int IANum;
}

WPInfo

Description: Waypoint information

class WPInfo {
/**
* Waypoint index
*/
private short wpIndex;
/**
* Waypoint latitude
*/
private double wpLat;
/**
* Waypoint longitude
*/
private double wpLon;
/**
* Waypoint altitude
*/
private float wpAlt;
/**
* 1: Absolute altitude (ASL) 2: Relative altitude
*/
private int wpAltType = 2;
/**
* Waypoint type 4: Normal waypoint 5: Survey corner point
*/
private int wpType = 4;
/**
* Waypoint speed
*/
private float wpVel = 20;
/**
* Waypoint turn radius
*/
private float wpRadius = 200;
/**
* Turn mode 1: Early turn 2: Turn at point 3: Timed loiter 4: Count loiter
* 5: Figure-8 loiter 6: Infinite loiter 7: Alpha turn 8: Strip inspection U-turn
*/
private int wpTurnMode = 2;
/**
* Loiter parameters - Figure-8 reference heading [-180°,180°]
*/
private float wpTurnParam1;
/**
* Climb mode 1: Normal 2: Fast
*/
private int wpClimbMode = 1;
/**
* Payload action 0: No action 1: Take photo 2: Timed photo 3: Distance photo 4: Record video
*/
private int payloadAction = 1;
/**
* Payload parameter
*/
private float actionParam1;
/**
* Gimbal pitch angle [-120, 20]
*/
private float gimbalPitch;
/**
* Gimbal relative yaw angle [-180, 180]
*/
private float gimbalYaw;
/**
* Reserved parameter - Figure-8 reference distance in meters [205,10000]
*/
private float wpReserved1;
}

InterestArea

Description: Interest area information

class InterestArea {
/**
* Interest area latitude
*/
private double ip_lat_deg;
/**
* Interest area longitude
*/
private double ip_lon_deg;
/**
* Interest area altitude (ASL)
*/
private float ip_alt_m;
/**
* Interest area radius
*/
private float ip_radius_m;
/**
* Interest area type
*/
private int ip_type;
/**
* Number of valid connected points
*/
private int valid_cpt_num;
/**
* Connected point indices
*/
private int[] ip_connectPt;
}

SubMissionInfo

Description: Sub-mission route information

class SubMissionInfo {
/**
* Lens focal length in mm
*/
private float focalLength;
/**
* Sensor size X in mm
*/
private float sensorSizeX;
/**
* Sensor size Y in mm
*/
private float sensorSizeY;
/**
* Pixel count X
*/
private int pixNumX;
/**
* Pixel count Y
*/
private int pixNumY;
/**
* Camera mount orientation 1: Horizontal 2: Vertical
*/
private int sensorOrient = 1;
/**
* Route angle [0°,360°]
*/
private float airLineDir;
/**
* Base surface altitude (ASL)
*/
private float baseAlt;
/**
* Ground resolution in cm/pixel
*/
private float resolution;
/**
* Side overlap percentage [0, 100]
*/
private int overlapSide;
/**
* Forward overlap percentage [0, 100]
*/
private int overlapAlong;
}

ForceLandInfo

Description: Forced landing point information

class ForceLandInfo {
/**
* Forced landing approach point latitude
*/
private double approachLat;
/**
* Forced landing approach point longitude
*/
private double approachLon;
/**
* Forced landing approach point altitude
*/
private float approachAlt;
/**
* Approach point altitude type 1: Absolute altitude (ASL) 2: Relative altitude
*/
private int altType;
/**
* Approach point loiter radius
*/
private float approachR;
/**
* Approach speed
*/
private float approachVel;
/**
* Forced landing point latitude
*/
private double landLat;
/**
* Forced landing point longitude
*/
private double landLon;
/**
* Forced landing point altitude
*/
private float landAlt;
/**
* Landing point altitude type 1: Absolute altitude (ASL) 2: Relative altitude
*/
private int landAltType;
/**
* Landing transition relative altitude
*/
private float transAlt;
}