MCPcopy Index your code
hub / github.com/dronekit/dronekit-python / simple_takeoff

Method simple_takeoff

dronekit/__init__.py:1963–1989  ·  view source on GitHub ↗

Take off and fly the vehicle to the specified altitude (in metres) and then wait for another command. .. note:: This function should only be used on Copter vehicles. The vehicle must be in GUIDED mode and armed before this is called. There is no mech

(self, alt=None)

Source from the content-addressed store, hash-verified

1961
1962
1963 def simple_takeoff(self, alt=None):
1964 """
1965 Take off and fly the vehicle to the specified altitude (in metres) and then wait for another command.
1966
1967 .. note::
1968
1969 This function should only be used on Copter vehicles.
1970
1971
1972 The vehicle must be in GUIDED mode and armed before this is called.
1973
1974 There is no mechanism for notification when the correct altitude is reached,
1975 and if another command arrives before that point (e.g. :py:func:`simple_goto`) it will be run instead.
1976
1977 .. warning::
1978
1979 Apps should code to ensure that the vehicle will reach a safe altitude before
1980 other commands are executed. A good example is provided in the guide topic :doc:`guide/taking_off`.
1981
1982 :param alt: Target height, in metres.
1983 """
1984 if alt is not None:
1985 altitude = float(alt)
1986 if math.isnan(alt) or math.isinf(alt):
1987 raise ValueError("Altitude was NaN or Infinity. Please provide a real number")
1988 self._master.mav.command_long_send(0, 0, mavutil.mavlink.MAV_CMD_NAV_TAKEOFF,
1989 0, 0, 0, 0, 0, 0, 0, altitude)
1990
1991 def simple_goto(self, location, airspeed=None, groundspeed=None):
1992 '''

Callers 8

arm_and_takeoffFunction · 0.80
arm_and_takeoffFunction · 0.80
arm_and_takeoffFunction · 0.80
arm_and_takeoffFunction · 0.80
arm_and_takeoffFunction · 0.80
arm_and_takeoffFunction · 0.80
arm_and_takeoffFunction · 0.80
takeoffMethod · 0.80

Calls

no outgoing calls

Tested by 2

arm_and_takeoffFunction · 0.64
arm_and_takeoffFunction · 0.64