ARDrone Navigation
Allows user to receive in-flight navgation data from an ARDrone. Navigation data includes such information as the ARDrone's current pitch and yaw, along with many other data elements.
For more information click here.
How To Connect
Communication with the ARDrone's navigation data interface takes place using a WiFi connection. The ARDrone is a WiFi access point, so it normally can be the only device you connect to, without some additional effort to reconfigure the drone itself to put it into infrastructure mode.
Cylon.robot({ connections: { ardrone: { adaptor: 'ardrone', port: '192.168.1.1' } }, devices: { drone: { driver: 'ardrone' }, nav: { driver: 'ardrone-nav' } } });
How To Use
Once the connection and the devices have been setup (as explained above) you can receive navigation events on them as follows:
var Cylon = require('cylon') Cylon.robot({ connections: { ardrone: { adaptor: 'ardrone', port: '192.168.1.1' } }, devices: { drone: { driver: 'ardrone' }, nav: { driver: 'ardrone-nav' } }, work: function(my) { my.drone.config('general:navdata_demo', 'TRUE'); my.nav.on('navdata', function(data) { console.log(data); } } }).start();
Events
navdata
Emitted when the ARDrone has new navigation data
landing
Emitted when the ARDrone is landing
landed
Emitted when the ARDrone has landed
takeoff
Emitted when the ARDrone has taken off
hovering
Emitted when the ARDrone is hovering
flying
Emitted when the ARDrone is flying
lowBattery
Emitted when the ARDrone has a low battery
batteryChange
Emitted when the ARDrone"s battery percentage has changed
altitudeChange
Emitted when the ARDrone"s altitude has changed