java.lang.Object | |
↳ | dji.sdk.flightcontroller.DJIIntelligentFlightAssistant |
This class contains components of the Intelligent Flight Assistant and provides methods to change the settings of Intelligent Flight Assistant.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | DJIIntelligentFlightAssistant.VisionControlStateUpdatedCallback | ||||||||||
interface | DJIIntelligentFlightAssistant.VisionDetectionStateUpdatedCallback | This protocol provides a interface to update the Intelligent Flight Assistant current state. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DJIIntelligentFlightAssistant() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | destroy() | ||||||||||
void | getActiveObstacleAvoidance(DJICompletionCallbackWith<Boolean> callback) | ||||||||||
void |
getCollisionAvoidanceEnabled(DJICompletionCallbackWith<Boolean> callback)
Get collision avoidance enabled.
| ||||||||||
void |
getLandingProtectionEnabled(DJICompletionCallbackWith<Boolean> callback)
Gets if landing protection is enabled.
| ||||||||||
void |
getPrecisionLandingEnabled(DJICompletionCallbackWith<Boolean> callback)
Gets if precision landing is enabled.
| ||||||||||
void |
getUpwardsAvoidanceEnabled(DJICompletionCallbackWith<Boolean> callback)
Gets if upwards avoidance is enabled.
| ||||||||||
void |
getVisionPositioningEnabled(DJICompletionCallbackWith<Boolean> callback)
Get vision position enable.
| ||||||||||
void |
setActiveObstacleAvoidance(boolean enabled, DJICommonCallbacks.DJICompletionCallback callback)
Enables/disables active obstacle avoidance.
| ||||||||||
void |
setCollisionAvoidanceEnabled(boolean enable, DJICommonCallbacks.DJICompletionCallback callback)
Set collision avoidance enabled.
| ||||||||||
void |
setLandingProtectionEnabled(boolean enabled, DJICommonCallbacks.DJICompletionCallback callback)
Enables/disables landing protection.
| ||||||||||
void |
setPrecisionLandingEnabled(boolean enabled, DJICommonCallbacks.DJICompletionCallback callback)
Enables/disables precision landing.
| ||||||||||
void |
setUpwardsAvoidanceEnabled(Boolean enabled, DJICommonCallbacks.DJICompletionCallback callback)
Enables/disables upwards avoidance.
| ||||||||||
void |
setVisionControlStateUpdatedcallback(DJIIntelligentFlightAssistant.VisionControlStateUpdatedCallback callback)
Callback function that updates the aircraft state controlled by the
intelligent flight assistant.
| ||||||||||
void |
setVisionDetectionStateUpdatedCallback(DJIIntelligentFlightAssistant.VisionDetectionStateUpdatedCallback callback)
Callback function that updates the detection state of each vision sensor.
| ||||||||||
void |
setVisionPositioningEnabled(boolean enable, DJICommonCallbacks.DJICompletionCallback callback)
Set vision positioning enabled.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Get collision avoidance enabled.
Gets if landing protection is enabled. It is supported by Mavic Pro, Phantom 4 Pro and Inspire 2.
callback | The execution callback with the returned value(s). |
---|
Gets if precision landing is enabled. It is supported by Phantom 4 Pro and Mavic Pro.
callback | The execution callback with the returned value(s). |
---|
Gets if upwards avoidance is enabled. It is supported by Inspire 2.
callback | The execution callback with the returned value(s). |
---|
Get vision position enable.
Enables/disables active obstacle avoidance. When enabled, and an obstacle is moving toward the aircraft, the aircraft will actively fly away from it. If while actively avoiding a moving obstacle, the aircraft detects another obstacle in its avoidance path, it will stop. `CollisionAvoidance` must also be enabled.
enabled | true to enable the active avoidance. |
---|---|
callback | Completion callback that receives the setter result. |
Set collision avoidance enabled. When collision avoidance is enabled, the aircraft will stop and try to go around an obstacle when detected.
Enables/disables landing protection. During auto-landing, the downward facing vision sensor will check if the ground surface is flat enough for a safe landing. If it is not and landing proteciton is `YES`, then landing will abort and need to be manually performed by the user. It is supported by Mavic Pro, Phantom 4 Pro and Inspire 2.
enabled | true to enable the landing protection. |
---|---|
callback | The execution callback with the returned execution result. |
Enables/disables precision landing. When enabled, the aircraft will record its take-off location visually (as well as with GPS). On a Return-To-Home action the aircraft will attempt to perform a precision landing using the additional visual information. This method only works on a Return-To-Home action when the home location is successfully recorded during take-off, and not changed during flight. It is supported by Phantom 4 Pro and Mavic Pro.
enabled | True to enable the precise landing. |
---|---|
callback | The execution callback with the returned execution result. |
Enables/disables upwards avoidance. When the infrared sensor on top of the Inspire 2 detects an obstacle, the aircraft will slow down the ascent speed and maintain a minimum distance (1 meter) from the obstacle. The sensor has a 10-degree horizontal field of view (FOV) and 10-degree vertical FOV. The maximum detection distance is 5 meters. It is supported by Inspire 2.
enabled | True to enable the upwards avoidance. |
---|---|
callback | The execution callback with the returned value(s). |
Callback function that updates the aircraft state controlled by the intelligent flight assistant.
Callback function that updates the detection state of each vision sensor.
Set vision positioning enabled. Vision positioning is used to augment GPS to improve location accuracy when hovering and improve velocity calculation when flying.