libkovan  1
The kovan standard library
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 
26 #include "export.h"
27 #include "vtable.h"
28 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
43 
44 /*
45  * \brief Disconnects from the drone.
46  */
48 
53 
59 
67 
73 VF EXPORT_SYM void drone_land();
74 
81 
90 
98 VF EXPORT_SYM float get_drone_x();
99 
106 VF EXPORT_SYM float get_drone_y();
107 
114 VF EXPORT_SYM float get_drone_z();
115 
122 
129 
136 
143 
150 
156 VF EXPORT_SYM float get_drone_yaw();
157 
164 
166 {
169 };
170 
178 
185 VF EXPORT_SYM int set_drone_mac_address(const char *const address);
186 
192 VF EXPORT_SYM int drone_pair();
193 
199 VF EXPORT_SYM int set_drone_ssid(const char *const ssid);
200 
211 VF EXPORT_SYM void drone_move(float x_tilt, float y_tilt, float z_vel, float yaw_vel);
212 
217 VF EXPORT_SYM void drone_hover();
218 
226 
233 
234 VFL
235 
236 #ifdef __cplusplus
237 }
238 #endif
239 
240 #endif
241 
242 #endif
VF EXPORT_SYM float get_drone_altitude()
Retrieves the current altitude of the AR.Drone, in meters.
VF EXPORT_SYM float get_drone_yaw()
Retrieves the current rotation in the clockwise (positive) or counterclockwise (negative) direction...
VF EXPORT_SYM float get_drone_x_velocity()
Retrieves the current velocity in the right or left direction.
Definition: ardrone.h:167
VF EXPORT_SYM int drone_connect()
Establishes a connection between the drone and the Link. This function must be called before any othe...
VF EXPORT_SYM float get_drone_x()
Retrieves the x value relative to the drones starting position. Negative values indicate the drone ha...
VF EXPORT_SYM int set_drone_mac_address(const char *const address)
Sets the Drone's MAC Address Pair to be the given string.
VF EXPORT_SYM int set_drone_ssid(const char *const ssid)
VF EXPORT_SYM int drone_pair()
Automatically detects the host MAC Address and pairs the drone with it.
VF EXPORT_SYM float get_drone_y_velocity()
Retrieves the current velocity in the forward or backwards direction.
drone_camera
Definition: ardrone.h:165
VF EXPORT_SYM float get_drone_y()
Retrieves the y value relative to the drones starting position. Negative values indicate the drone ha...
VF EXPORT_SYM float get_drone_z()
Retrieves the y value relative to the drones starting position. Negative values indicate the drone ha...
Definition: ardrone.h:168
VF EXPORT_SYM void set_drone_emergency_stop_enabled(int enabled)
VF EXPORT_SYM float get_drone_pitch()
Retrieves the current pitch of the AR.Drone, in degrees.
VF EXPORT_SYM int drone_camera_open(enum drone_camera camera)
Opens the AR.Drone's camera as the camera input device. You must use camera_close() once finished...
VF EXPORT_SYM int get_drone_version()
VF EXPORT_SYM void drone_clear_position()
Clears the accumulated absolute x, y, and z positions of the AR.Drone.
#define VF
Definition: vtable.h:10
#define VFL
Definition: vtable.h:11
VF EXPORT_SYM float get_drone_roll()
Retrieves the current roll of the AR.Drone, in degrees.
VF EXPORT_SYM void drone_takeoff()
Makes the drone takeoff and stabilize itself. This command will return immeadiately.
VF EXPORT_SYM int get_drone_emergency_stop_enabled()
#define EXPORT_SYM
Definition: export.h:7
VF EXPORT_SYM int get_drone_battery()
retrieves the cached battery value
VF EXPORT_SYM void drone_hover()
Tells the drone that it should stop moving and hover at its current location.
VF EXPORT_SYM void drone_move(float x_tilt, float y_tilt, float z_vel, float yaw_vel)
Tells the drone to move with the given parameters.
VF EXPORT_SYM void drone_disconnect()
VF EXPORT_SYM void drone_calibrate()
Calibrates the drone's accelerometers to understand what "flat" is.
VF EXPORT_SYM float get_drone_z_velocity()
Retrieves the current velocity in the upward or downwards direction.
VF EXPORT_SYM void drone_land()
This function will be used to land the drone at its current position.