libkovan  1
The kovan standard library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ardrone.h
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright 2013 KISS Institute for Practical Robotics *
3  * *
4  * This file is part of libkovan. *
5  * *
6  * libkovan is free software: you can redistribute it and/or modify *
7  * it under the terms of the GNU General Public License as published by *
8  * the Free Software Foundation, either version 2 of the License, or *
9  * (at your option) any later version. *
10  * *
11  * libkovan is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License *
17  * along with libkovan. Check the LICENSE file in the project root. *
18  * If not, see <http://www.gnu.org/licenses/>. *
19  **************************************************************************/
20 
21 #ifndef _WIN32
22 
23 #ifndef _ARDRONE_H_
24 #define _ARDRONE_H_
25 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
39 int drone_connect(void);
40 
41 /*
42  * \brief Disconnects from the drone.
43  */
44 void drone_disconnect(void);
45 
49 void drone_calibrate(void);
50 
55 int get_drone_version(void);
56 
63 void drone_takeoff(void);
64 
70 void drone_land(void);
71 
77 int get_drone_battery(void);
78 
87 
95 float get_drone_x(void);
96 
103 float get_drone_y(void);
104 
111 float get_drone_z(void);
112 
118 float get_drone_x_velocity(void);
119 
125 float get_drone_y_velocity(void);
126 
132 float get_drone_z_velocity(void);
133 
139 float get_drone_pitch(void);
140 
146 float get_drone_roll(void);
147 
153 float get_drone_altitude(void);
154 
160 float get_drone_yaw(void);
161 
163 {
166 };
167 
174 int drone_camera_open(enum drone_camera camera);
175 
182 int set_drone_mac_address(const char *const address);
183 
189 int drone_pair(void);
190 
196 int set_drone_ssid(const char *const ssid);
197 
208 void drone_move(float x_tilt, float y_tilt, float z_vel, float yaw_vel);
209 
214 void drone_hover(void);
215 
222 void set_drone_emergency_stop_enabled(int enabled);
223 
230 
231 #ifdef __cplusplus
232 }
233 #endif
234 
235 #endif
236 
237 #endif
Definition: ardrone.h:164
float get_drone_roll(void)
Retrieves the current roll of the AR.Drone, in degrees.
float get_drone_z_velocity(void)
Retrieves the current velocity in the upward or downwards direction.
int set_drone_ssid(const char *const ssid)
float get_drone_y(void)
Retrieves the y value relative to the drones starting position. Negative values indicate the drone ha...
int drone_camera_open(enum drone_camera camera)
Opens the AR.Drone&#39;s camera as the camera input device. You must use camera_close() once finished...
void drone_land(void)
This function will be used to land the drone at its current position.
drone_camera
Definition: ardrone.h:162
void drone_move(float x_tilt, float y_tilt, float z_vel, float yaw_vel)
Tells the drone to move with the given parameters.
float get_drone_pitch(void)
Retrieves the current pitch of the AR.Drone, in degrees.
float get_drone_x_velocity(void)
Retrieves the current velocity in the right or left direction.
int get_drone_emergency_stop_enabled(void)
Definition: ardrone.h:165
float get_drone_yaw(void)
Retrieves the current rotation in the clockwise (positive) or counterclockwise (negative) direction...
float get_drone_altitude(void)
Retrieves the current altitude of the AR.Drone, in meters.
float get_drone_x(void)
Retrieves the x value relative to the drones starting position. Negative values indicate the drone ha...
int drone_connect(void)
Establishes a connection between the drone and the Link. This function must be called before any othe...
int get_drone_battery(void)
retrieves the cached battery value
void drone_hover(void)
Tells the drone that it should stop moving and hover at its current location.
void drone_calibrate(void)
Calibrates the drone&#39;s accelerometers to understand what &quot;flat&quot; is.
float get_drone_y_velocity(void)
Retrieves the current velocity in the forward or backwards direction.
void drone_takeoff(void)
Makes the drone takeoff and stabilize itself. This command will return immeadiately.
void drone_clear_position()
Clears the accumulated absolute x, y, and z positions of the AR.Drone.
void drone_disconnect(void)
void set_drone_emergency_stop_enabled(int enabled)
int set_drone_mac_address(const char *const address)
Sets the Drone&#39;s MAC Address Pair to be the given string.
float get_drone_z(void)
Retrieves the y value relative to the drones starting position. Negative values indicate the drone ha...
int drone_pair(void)
Automatically detects the host MAC Address and pairs the drone with it.
int get_drone_version(void)