RTH feature

event messageolympe.messages.rth.home_type_capabilities(values=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Rth.Home_type_capabilities

Home type capabilities

Parameters:
  • values (BitfieldOf(olympe.enums.rth.home_type, u32)) – Bitfield of suported home types.
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered at connection.

event messageolympe.messages.rth.home_type(type=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Rth.Home_type

Home type

Parameters:
  • type (olympe.enums.rth.home_type) – Home type.
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered when the home type changes and when setting a new home type has been refused by the drone.

command messageolympe.messages.rth.set_home_to_takeoff_location(_timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

Rth.Set_home_to_takeoff_location

Set the home to the takeoff location.

Parameters:
  • _timeout (int) – command message timeout (defaults to 10)
  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Result: If the [takeoff location](takeoff_location()) is known, (i.e. if the drone has fixed), home_type() is sent with type = takeoff, otherwise it is sent back with the former home type.

Expectations: home_type(type='takeoff', _policy='wait')

event messageolympe.messages.rth.takeoff_location(latitude=None, longitude=None, fixedBeforeTakeoff=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Rth.Takeoff_location

Takeoff location

Parameters:
  • latitude (double) – Latitude of the takeoff location
  • longitude (double) – Longitude of the takeoff location
  • fixedBeforeTakeoff (u8) – 1 if the location was acquired before the takeoff. 0 if it was acquired during the flight (i.e. is it the first fix location).
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered regularly when drone is landed then one last time right before taking off, if gps is fixed. If not, triggered on the first fix with the value fixed before takeoff set to true.

command messageolympe.messages.rth.set_home_to_custom_location(latitude, longitude, altitude_reference, altitude, _timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

Rth.Set_home_to_custom_location

Set the home to a custom location.

Parameters:
  • latitude (double) – Latitude of the takeoff location
  • longitude (double) – Longitude of the takeoff location
  • altitude_reference (olympe.enums.rth.altitude_reference) – Reference of the altitude, none if altitude is not given.
  • altitude (double) – Altitude of the custom location. Only valid if altitude_reference is not none.
  • _timeout (int) – command message timeout (defaults to 10)
  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Result: If the drone knows its own location and that the custom location is not outside a circle centered on the drone with a radius equals to the max distance setting value, home_type() is sent with type = custom, otherwise it is sent back with the former home type.

Expectations: home_type(type='custom', _policy='wait')

event messageolympe.messages.rth.custom_location(latitude=None, longitude=None, altitude_reference=None, altitude=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Rth.Custom_location

Custom location

Parameters:
  • latitude (double) – Latitude of the custom location
  • longitude (double) – Longitude of the custom location
  • altitude_reference (olympe.enums.rth.altitude_reference) – Reference of the altitude, none if altitude is not given.
  • altitude (double) – Altitude of the custom location. Only valid if altitude_reference is not none.
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered by set_home_to_custom_location().

command messageolympe.messages.rth.set_home_to_followee_location(_timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

Rth.Set_home_to_followee_location

Set the home to the followee location. Followee means the target of a FollowMe or LookAt with gps coordinates sent.

Parameters:
  • _timeout (int) – command message timeout (defaults to 10)
  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Result: If the [followee location](followee_location()) is known, (i.e. if the drone has made a FollowMe or a LookAt with controller gps coordinates), home_type() is sent with type = followee, otherwise it is sent back with the former home type.

Expectations: home_type(type='followee', _policy='wait')

event messageolympe.messages.rth.followee_location(latitude=None, longitude=None, altitude_reference=None, altitude=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Rth.Followee_location

Followee location

Parameters:
  • latitude (double) – Latitude of the takeoff location
  • longitude (double) – Longitude of the takeoff location
  • altitude_reference (olympe.enums.rth.altitude_reference) – Reference of the altitude, none if altitude is not given.
  • altitude (double) – Altitude of the custom location. Only valid if altitude_reference is not none.
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered regularly when drone is in FollowMe or LookAt with [controller gps coordinates](gps()) sent.

command messageolympe.messages.rth.set_return_home_delay(delay, _timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

Rth.Set_return_home_delay

Set the delay after which the drone will automatically try to return home after a disconnection.

Parameters:
  • delay (u16) – Delay in second
  • _timeout (int) – command message timeout (defaults to 10)
  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Result: The delay of the return home is set. Then, event return_home_delay() is triggered.

Expectations: return_home_delay(delay=self.delay, _policy='wait')

event messageolympe.messages.rth.return_home_delay(delay=None, min=None, max=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Rth.Return_home_delay

Return home trigger delay. This delay represents the time after which the return home is automatically triggered after a disconnection.

Parameters:
  • delay (u16) – Delay in second
  • min (u16) – Min delay in second
  • max (u16) – Max delay in second
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered by set_return_home_delay().

command messageolympe.messages.rth.return_to_home(_timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

Rth.Return_to_home

Return home. Ask the drone to fly to its home position. Please note that the drone will wait to be hovering to start its return home. This means that it will wait to have a PCMD() set at 0.

Parameters:
  • _timeout (int) – command message timeout (defaults to 10)
  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Result: event state() is triggered. Then, the drone will fly back to its home position. You can get a state pending if the drone is not ready to start its return home process but will do it as soon as it is possible.

Expectations: state(state='in_progress', _policy='wait')

command messageolympe.messages.rth.abort(_timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

Rth.Abort

Abort a currently executing return to home.

Parameters:
  • _timeout (int) – command message timeout (defaults to 10)
  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Result: The drone will abort its return home. Then, event state() is triggered.

event messageolympe.messages.rth.state(state=None, reason=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Rth.State

Return home state. Availability is related to gps fix, magnetometer calibration.

Parameters:
  • state (olympe.enums.rth.state) – State of the return to home
  • reason (olympe.enums.rth.state_reason) – Reason of the state change
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered by return_to_home() or by abort(), or when the state of the return home changes.

event messageolympe.messages.rth.home_reachability(status=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Rth.Home_reachability

Home reachability status.

Parameters:
  • status (olympe.enums.rth.home_reachability) – State of the return to home
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered when home reachability status changes.

event messageolympe.messages.rth.rth_auto_trigger(reason=None, delay=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Rth.Rth_auto_trigger

Return Home auto trigger information.

Parameters:
  • reason (olympe.enums.rth.auto_trigger_reason) – Reason of the auto trigger.
  • delay (u32) – Delay until the return home is automatically triggered by the drone, in seconds. If reason is none this information has no meaning.
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered when return home auto trigger information changes, then evey seconds while reason is different from none.

command messageolympe.messages.rth.cancel_auto_trigger(_timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

Rth.Cancel_auto_trigger

Cancel any current return home auto trigger. This command has no effect if there is no auto trigger currently planned (i.e. reason of [RTH auto trigger](rth_auto_trigger()) is none).

Parameters:
  • _timeout (int) – command message timeout (defaults to 10)
  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Result: The drone will cancel its return home auto trigger. Then, event [RTH auto trigger](rth_auto_trigger()) is triggered with reason set to none.

enumolympe.enums.rth.home_type

Home type.

none:No home type. This might be because the drone does not have a gps fix (0)
takeoff:The drone will return to the takeoff location (1)
followee:The drone will return to the followee position (2)
custom:The drone will return to a custom location (3)
enumolympe.enums.rth.altitude_reference

Altitude reference

none:Altitude is not meaningful (0)
above_sea_level:
 Altitude is relative to sea level (1)
above_take_off:Altitude is relative to take off (2)
enumolympe.enums.rth.state

State of return to home

Enum aliases:

available:Return to home is available (0)
in_progress:Return to home is in progress (1)
unavailable:Return to home is not available (2)
pending:Return to home has been received, but its process is pending (3)
enumolympe.enums.rth.state_reason

Reason of the state

Enum aliases:

user_request:User requested a return to home (available->in_progress) (0)
connection_lost:
 Connection between controller and product lost (available->in_progress) (1)
low_battery:Low battery occurred (available->in_progress) (2)
finished:Return to home is finished (in_progress->available) (3)
stopped:Return to home has been stopped (in_progress->available) (4)
disabled:Return to home disabled by product (in_progress->unavailable or available->unavailable) (5)
enabled:Return to home enabled by product (unavailable->available) (6)
enumolympe.enums.rth.home_reachability

Home reachability

unknown:Home reachability is unknown (0)
reachable:Home is reachable (1)
critical:Home is still reachable but won’t be if rth is not triggered now. If rth is running, cancelling it will probably make the home not reachable. (2)
not_reachable:Home is not reachable (3)
enumolympe.enums.rth.auto_trigger_reason

Home reachability

Enum aliases:

none:There is no return home auto trigger planned. (0)
battery_critical_soon:
 Battery will soon be critical. (1)
enumolympe.enums.rth.list_flags

Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages

First: Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (0)
Last: Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (1)
Empty: Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (2)
Remove: Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (3)