4 #include <ardrone_api.h>
5 #include <VP_Os/vp_os_types.h>
7 typedef struct _instance_navdata_t
9 uint32_t ardrone_state;
10 bool_t flyingState; /// Tells whether ARDrone is flying or not
11 bool_t commandState; /// ???
12 bool_t comWatchdog; /// Tells if we are loosing communication with ARDrone
13 /// Be aware that at startup, comWatchdog is set to 1 because no input reach the drone yet
14 bool_t emergencyLanding; /// Tells ARDrone landed because of a serious reason
15 bool_t timerElapsed; /// Tells ARDrone can take off again
16 bool_t startPressed; /// Start button state by ARDrone
17 bool_t bootstrap; /// mykonos is starting
19 unsigned int remainingBattery; /// Remaining battery in mV
21 float pitch; /// cabrement en radians (nez vers le bas negatif)
22 float roll; /// roulis en radians (pencher a gauche = negatif)
23 float yaw; /// lacet en radians (tourner vers la gauche = negatif)
25 float trimPitch; /// trim on pitch
26 float trimRoll; /// trim on roll
27 float trimYaw; /// trim on yaw
29 float vx; // Horizontal velocity on x-axis
30 float vy; // Horizontal velocity on y-axis
31 float vz; // Horizontal velocity on y-axis
33 float altitude; /// altitude en m
35 int nbDetectedOpponent; /// Does we see an opponent?
36 int xOpponent[4]; /// Position (in screen space) of the opponent
38 int widthOpponent[4]; /// Position (in screen space) of the opponent
39 int heightOpponent[4];
40 int distOpponent[4]; /// Distance from the opponent
45 // Camera parameters compute by detection
46 float detectCameraRot[3][3];
47 float detectCameraHomo[3][3];
48 float detectCameraTrans[3];
54 // Camera parameters compute by drone
55 float droneCameraRot[3][3];
56 float droneCameraTrans[3];
60 bool_t adcVersionProblem;
62 bool_t ultrasoundProblem;
65 bool_t vbatLowProblem;
70 bool_t navdataThreadOn;
72 C_RESULT ardrone_navdata_reset_data(instance_navdata_t *nav);
73 C_RESULT ardrone_navdata_get_data(instance_navdata_t *data);
74 C_RESULT ardrone_navdata_write_to_file(bool_t enable);