Gets the attitude of the aircraft, where the pitch, roll, and yaw values will be in the range of [-180, 180] degrees. If its pitch, roll, and yaw values are 0, the aircraft will be hovering level with a True North heading.
true if the clearance between the aircraft and the ground is less than 0.3m, and confirmation from the user is needed to continue the landing. When the confirmation is needed, confirmLanding in FlightController can be used to continue landing. It is
supported by flight controller firmware 3.2.0.0 or above.
true if the ultrasonic sensor is being used. Variables that can impact the quality of the ultrasound measurement, or whether it's being used, are height above ground and the type of ground (if it reflects sound waves well). Usually, the ultrasonic sensor works when the aircraft is less than 8m above ground.
Height of aircraft measured by the ultrasonic sensor in meters. The data will only be available if isUltrasonicBeingUsed returns true. Height has a precision of 0.1m. This value has reference significance when the height is below 5 meters.
Return:
float
A float value of the height of the aircraft measured by the ultrasonic sensor in meters.
true if a vision sensor is being used. Variables that can impact the quality of the vision measurement, or whether it's being used, are height above ground and the type of ground (if it has sufficiently rich texture). Usually, the vision sensor works when the aircraft is less than 3m above ground.
An enum used to identify the different stages of the go-home command. Some aircraft only support part of the state depending on the firmware. For exampele: Phantom 4 Pro V2.0 and Mavic 2 Enterprise Dual only support GO_DOWN_TO_GROUND. Matrice 300 RTK only suppoort GO_UP_TO_HEIGHT, AUTO_FLY_TO_HOME_POINT and GO_DOWN_TO_GROUND.
Enum Members:
NOT_EXECUTING
The aircraft is not executing a Go-Home command.
TURN_DIRECTION_TO_HOME_POINT
The aircraft is turning the heading direction to the home point.
GO_UP_TO_HEIGHT
The aircraft is going up to the height for go-home command.
AUTO_FLY_TO_HOME_POINT
The aircraft is flying horizontally to home point.
GO_DOWN_TO_GROUND
The aircraft is going down after arriving at the home point.
Flight controller flight modes. If the current flight mode means P-GPS, it will show OPTI in DJI app if the vision system is working. If the current flight Mode contains GPS and also the RTK signal is healthy, it will show RTK in DJI app.
Enum Members:
MANUAL
Manual mode. Shown as Manual in DJI app.
ATTI
Attitude mode. Shown as Atti in DJI app.
ATTI_COURSE_LOCK
Attitude course lock mode. Shown as Atti in DJI app.
ATTI_HOVER
Attitude hover mode. Shown as Atti in DJI app.
HOVER
Hover mode. Shown as P-GPS in DJI app.
GPS_BLAKE
GPS blake mode. Shown as P-GPS in DJI app.
GPS_ATTI
GPS Attitude mode. Shown as P-GPS in DJI app.
GPS_COURSE_LOCK
GPS course lock mode. Shown as CL/P-CL/F-CL in DJI app.
GPS_HOME_LOCK
GPS Home mode. Shown as HL/P-HL/F-HL in DJI app.
GPS_HOT_POINT
GPS hotpoint mode. Show as POI/F-POI in DJI app.
ASSISTED_TAKEOFF
Assisted takeoff mode. Shown as TakeOff in DJI app.
AUTO_TAKEOFF
Auto takeoff mode. Shown as TakeOff in DJI app.
AUTO_LANDING
Auto landing mode. Shown as Landing in DJI app.
ATTI_LANDING
Attitude landing mode. Shown as Landing in DJI app.
GPS_WAYPOINT
GPS waypoint mode. Shown as WP/F-WP in DJI app.
GO_HOME
Go home mode. Shown as Gohome in DJI app.
JOYSTICK
Joystick mode. hown as Joystick in DJI app.
ATTI_LIMITED
Attitude limited mode. Shown as Atti in DJI app.
DRAW
Draw mode. Shown as Draw in DJI app.
GPS_FOLLOW_ME
GPS follow me mode. Shown as FM/F-FM in DJI app.
ACTIVE_TRACK
ActiveTrack mode. Shown as ActiveTrack in DJI app.
TAP_FLY
TapFly mode. Shown as TapFly in DJI app.
GPS_SPORT
Sport mode. Shown as Sport in DJI app.
UNKNOWN
The main controller flight mode is unknown.
CONFIRM_LANDING
Confirm landing mode. Shown as Landing in DJI app.
TERRAIN_FOLLOW
The aircraft should move following the terrain. Shown as TerrainTracking in DJI app.
TRIPOD
Tripod mode. Shown as Tripod in DJI app.
TRACK_SPOTLIGHT
Active track mode, corresponds to Spotlight active track mode. Shown as QuickShot/ActiveTrack in DJI app.
MOTORS_JUST_STARTED
The motors are just started. Shown as TakeOff in DJI app.