dagger package
dagger.acc_calibration module
Calibrates the accelerometer
-
class dagger.acc_calibration.AccCalibration(connection)[source]
Bases: object
Calibrates the accelerometer.
- Parameters
connection (PlutoConnection) – Pluto connection object for communicating with Pluto.
Examples
>>> t = dagger.PlutoConnection()
>>> t.connect(('Pluto_IP', Pluto_port))
>>> acc_cal = dagger.AccCalibration(t)
-
acc_calibartion()[source]
Sends the request to calibrate the accelerometer.
Examples
>>> acc_cal.acc_calibration()
Note
Place the drone on a flat surface before starting.
dagger.altitude module
Get the Altitude data from Pluto.
-
class dagger.altitude.Altitude(connection)[source]
Bases: object
Get the Altitude data from Pluto.
- Parameters
connection (PlutoConnection) – Pluto connection object for communicating with Pluto.
Examples
>>> t = dagger.PlutoConnection()
>>> t.connect(('Pluto_IP', Pluto_port))
>>> altitude = dagger.Altitude(t)
-
get_altitude_data()[source]
Get the Altitude OUT package from pluto.
- Returns
The altitude, vatio and timestamp values.
- Return type
AltitudeData
Examples
>>> data = altitude.get_altitude_data()
>>> data.altitude
-
class dagger.altitude.AltitudeData(altitude, vatio)[source]
Bases: object
Formats the altitude and vatio values.
-
altitude
Altitude values of Pluto in the Centimetre Units.
- Type
int
-
vatio
vatio values of pluto in the Centimetre per Second Units.
- Type
int
-
timstamp
timestamp values of pluto in the seconds Units.
- Type
float
Example
>>> AltitudeData.altitude
dagger.analog module
Get the Analog data from Pluto.
-
class dagger.analog.Analog(connection)[source]
Bases: object
Get the Analog data from Pluto.
- Parameters
connection (PlutoConnection) – Pluto connection object for communicating with Pluto.
Examples
>>> t = dagger.PlutoConnection()
>>> t.connect(('Pluto_IP', Pluto_port))
>>> analog = dagger.Analog(t)
-
get_analog_data()[source]
Get the Analog OUT package from pluto.
- Returns
The vbat, int_power_meter_sum, rssi, amperage and timestamp values.
- Return type
AnalogData
Examples
>>> data = analog.get_analog_data()
>>> data.vbat
-
class dagger.analog.AnalogData(vbat, int_power_meter_sum, rssi, amperage)[source]
Bases: object
Formats the Battery Voltage, Power Meter, RSSI and Amperage values.
-
vbat
Battery Voltage values of pluto in the 1/10 Volts Units.
- Type
int
-
int_power_meter_sum
Power Meter values of pluto.
- Type
int
RSSI values of pluto.
- Type
int
-
amperage
Amperage values of pluto.
- Type
int
-
timstamp
timestamp values of pluto in the seconds Units.
- Type
float
Example
dagger.attitude module
Get the Attitude data from Pluto.
-
class dagger.attitude.Attitude(connection)[source]
Bases: object
Get the Attitude data from Pluto.
- Parameters
connection (PlutoConnection) – Pluto connection object for communicating with Pluto.
Examples
>>> t = dagger.PlutoConnection()
>>> t.connect(('Pluto_IP', Pluto_port))
>>> attitude = dagger.Attitude(t)
-
get_attitude_data()[source]
Get the Attitude OUT package from pluto.
- Returns
The roll, pitch, yaw and timestamp values.
- Return type
AttitudeData
Examples
>>> data = attitude.get_attitude_data()
>>> data.roll
-
class dagger.attitude.AttitudeData(roll, pitch, yaw)[source]
Bases: object
Formats the roll, pitch and yaw values.
-
roll
Roll values of pluto in the Decidegree Units.
- Type
int
-
pitch
pitch values of pluto in the Decidegree Units.
- Type
int
-
yaw
yaw values of pluto in the Degree Units.
- Type
int
-
timstamp
timestamp values of pluto in the seconds Units.
- Type
float
Example
dagger.connect module
Defines API Connection
-
class dagger.connect.PlutoConnection[source]
Bases: socket
Handles connection with drone.
dagger.control module
Controls for the Pluto Drone.
-
class dagger.control.PlutoControl(connection)[source]
Bases: object
Controls for the Pluto Drone.
- Parameters
connection (PlutoConnection) – Pluto connection object for communicating with Pluto.
Examples
>>> t = dagger.PlutoConnection()
>>> t.connect(('Pluto_IP', Pluto_port))
>>> control = dagger.PlutoControl(t)
-
land()[source]
Landing command for Pluto.
Examples
-
left_yaw()[source]
Left Yaw command for Pluto.
Examples
-
pitch_backward()[source]
Backward Pitch command for Pluto.
Examples
>>> control.pitch_backward()
-
pitch_forward()[source]
Forward Pitch command for Pluto.
Examples
>>> control.pitch_forward()
-
right_yaw()[source]
Right Yaw command for Pluto.
Examples
-
roll_left()[source]
Left Roll command for Pluto.
Examples
-
roll_right()[source]
Right Roll command for Pluto.
Examples
-
take_off()[source]
Take off command for Pluto.
Examples
dagger.mag_calibration module
Calibrates the magnetometer
-
class dagger.mag_calibration.MagCalibration(connection)[source]
Bases: object
Calibrates the magnetometer..
- Parameters
connection (PlutoConnection) – Pluto connection object for communicating with Pluto.
Examples
>>> t = dagger.PlutoConnection()
>>> t.connect(('Pluto_IP', Pluto_port))
>>> mag_cal = dagger.MagCalibration(t)
-
mag_calibartion()[source]
Sends the request to calibrate the magnetometer.
Examples
>>> mag_cal.mag_calibration()
Note
Rotate the drone across all its axis until the process.
dagger.raw_imu module
Get the RawIMU data from Pluto.
-
class dagger.raw_imu.RawIMU(connection)[source]
Bases: object
Get the RawIMU data from Pluto.
- Parameters
connection (PlutoConnection) – Pluto connection object for communicating with Pluto.
Examples
>>> t = dagger.PlutoConnection()
>>> t.connect(('Pluto_IP', Pluto_port))
>>> rawimu = dagger.RawIMU(t)
-
get_raw_imu()[source]
Get the RawIMU OUT package from pluto.
- Returns
The x,y,z values of accelerometer,gyroscope and magnetometer and the
timestamp value.
- Return type
RawIMUData
Examples
>>> data = rawimu.get_raw_imu()
>>> data.acc_x
-
class dagger.raw_imu.RawIMUData[source]
Bases: object
Formats the RawIMU values.
-
acc_x
x-values of Pluto accelerometer.
- Type
int
-
acc_y
y-values of Pluto accelerometer.
- Type
int
-
acc_z
z-values of Pluto accelerometer.
- Type
int
-
gyro_x
x-values of Pluto gyroscope.
- Type
int
-
gyro_y
y-values of Pluto gyroscope.
- Type
int
-
gyro_z
z-values of Pluto gyroscope.
- Type
int
-
mag_x
x-values of Pluto magnetometer.
- Type
int
-
mag_y
y-values of Pluto magnetometer.
- Type
int
-
mag_z
z-values of Pluto magnetometer.
- Type
int
-
timstamp
timestamp values of pluto in the seconds Units.
- Type
float
Example
dagger.set_command module
Sets the command in Pluto
-
class dagger.set_command.CmdType(value)[source]
Bases: Enum
Maps the Command types to their corresponding int values
-
BACK_FLIP = 3
-
FRONT_FLIP = 4
-
LAND = 2
-
LEFT_FLIP = 6
-
RIGHT_FLIP = 5
-
TAKE_OFF = 1
-
class dagger.set_command.SetCommand(connection)[source]
Bases: object
Sets the command in Pluto.
- Parameters
connection (PlutoConnection) – Pluto connection object for communicating with Pluto.
Examples
>>> t = dagger.PlutoConnection()
>>> t.connect(('Pluto_IP', Pluto_port))
>>> com = dagger.SetCommand(t)
-
command(cmd)[source]
Sets the Command value in pluto
- Parameters
cmd ((TAKE_OFF, LAND, FRONT_FLIP, BACK_FLIP, RIGHT_FLIP, LEFT_FLIP)) – Sets the command type to pluto
Examples
>>> com.command(dagger.CmdType.cmd)
dagger.set_raw_rc module
Controls the pluto using RC params
-
class dagger.set_raw_rc.SetRawRC(connection)[source]
Bases: object
Controls the pluto using RC params.
- Parameters
connection (PlutoConnection) – Pluto connection object for communicating with Pluto.
Examples
>>> t = dagger.PlutoConnection()
>>> t.connect(('Pluto_IP', Pluto_port))
>>> rc = dagger.SetRawRC(t)
-
arm_drone()[source]
Arms the drone
Examples
-
box_arm()[source]
Box-arms the drone
Examples
-
disarm_drone()[source]
Disarms the drone
Examples
-
set_alt_hold_mode()[source]
Enables the Alt Hold mode in pluto
Examples
>>> rc.set_alt_hold_mode()
-
set_developer_mode_off()[source]
Disables the Developer mode in pluto
Examples
>>> rc.set_developer_mode_off()
-
set_developer_mode_on()[source]
Enables the Developer mode in pluto
Examples
>>> rc.set_developer_mode_on()
-
set_headfree_mode()[source]
Sets the Headfree mode in pluto
Examples
>>> rc.set_headfree_mode()
-
set_maghold_mode()[source]
Sets the Mag Hold Mode in pluto
Examples
>>> rc.set_maghold_mode()
-
set_pitch(pitch)[source]
Sets the pitch values in pluto
- Parameters
pitch (int [900,2100]) – Pitch values for Pluto, Pitch stick is 0 at 1500 value
Examples
-
set_roll(roll)[source]
Sets the roll values in pluto
- Parameters
roll (int [900,2100]) – Roll values for Pluto, Roll stick is 0 at 1500 value
Examples
-
set_throttle(throttle)[source]
Sets the throttle values in pluto
- Parameters
throttle (int [900,2100]) – Throttle values for Pluto, Throttle stick is 0 at 1500 value
Examples
>>> rc.set_throttle(throttle)
-
set_throttle_free_mode()[source]
Enables the Throttle free mode in pluto
Examples
>>> rc.set_throttle_free_mode()
-
set_yaw(yaw)[source]
Sets the yaw values in pluto
- Parameters
yaw (int [900,2100]) – Yaw values for Pluto, Yaw stick is 0 at 1500 value
Examples
dagger.utils module
Utils for the Dagger python wrapper for Pluto
-
dagger.utils.calculate_crc(byte_array)[source]
Calculates the checksum for an array of bytes
-
dagger.utils.get_direction_in_bytes()[source]
Converts the in direction arrow to bytes
-
dagger.utils.get_direction_out_bytes()[source]
Converts the out direction arrow to bytes
Converts the header to bytes
-
dagger.utils.send_out(con, code)[source]
Request for OUT packages
:param con: Pluto connection object for communicating with Pluto.
:type con: PlutoConnection
:param code: MSP packet code for the corresponding out packet.
:type code: int
Module contents
API defining checkpoint