felixge / node-ar-drone

A node.js client for controlling Parrot AR Drone 2.0 quad-copters.
http://nodecopter.com/
MIT License
1.76k stars 428 forks source link

Cant receive GPS data #111

Open shehroze37-zz opened 9 years ago

shehroze37-zz commented 9 years ago

Hi I have tried the following code however it just returns undefined for couple of time and then doesn't output anything whats the problem here ?

var arDrone = require('ar-drone'); var arDroneConstants = require('ar-drone/lib/constants');

var fs = require('fs');

function navdataOptionMask(c) { return 1 << c; }

var navdataOptions = ( navdataOptionMask(arDroneConstants.options.DEMO) | navdataOptionMask(arDroneConstants.options.VISION_DETECT) | navdataOptionMask(arDroneConstants.options.MAGNETO) | navdataOptionMask(arDroneConstants.options.WIFI) | navdataOptionMask(arDroneConstants.options.ZIMMU_3000) );

// Connect and configure the drone var client = new arDrone.createClient(); client.config('general:navdata_demo', true); client.config('general:navdata_options', navdataOptions);

client.on('navdata', function(navdata){ console.log(navdata.gps); });

wiseman commented 9 years ago

What version of the firmware is your drone running?

shehroze37-zz commented 9 years ago

Its 2.4.12

wiseman commented 9 years ago

It might be a few days before I have a chance to test, but I wonder if it's a firmware version issue--just because I've seen something similar happen before when a new version of firmware started sending GPS data in a different format. I think 2.4.8 is known to work with the GPS, but you might have to hunt around to find a copy of old firmwares.

shehroze37-zz commented 9 years ago

I have downgraded to 2.4.8 but still the same output

Talamantez commented 9 years ago

What kind of ardrone are you using?

On Thu, Dec 18, 2014 at 3:54 AM, Shehroze Bhatti notifications@github.com wrote:

I have downgraded to 2.4.8 but still the same output

— Reply to this email directly or view it on GitHub https://github.com/felixge/node-ar-drone/issues/111#issuecomment-67476192 .

Robert Talamantez 813-404-0800

shehroze37-zz commented 9 years ago

Its a normal parrot ardrone 2.0

Talamantez commented 9 years ago

The normal ardrone 2.0 doesn't come with gps - only the gps edition comes with it built in. You can get the flight recorder to plug in that gives you gps data.

On Fri, Dec 19, 2014 at 1:11 AM, Shehroze Bhatti notifications@github.com wrote:

Its a normal parrot ardrone 2.0

— Reply to this email directly or view it on GitHub https://github.com/felixge/node-ar-drone/issues/111#issuecomment-67614244 .

Robert Talamantez 813-404-0800

shehroze37-zz commented 9 years ago

I did the test with the flight recorder

Talamantez commented 9 years ago

what prints out when you log out the other nav data?

On Sat, Dec 20, 2014 at 2:51 AM, Shehroze Bhatti notifications@github.com wrote:

I did the test with the flight recorder

— Reply to this email directly or view it on GitHub https://github.com/felixge/node-ar-drone/issues/111#issuecomment-67732018 .

Robert Talamantez 813-404-0800

shehroze37-zz commented 9 years ago

The other nav data prints out fine

Talamantez commented 9 years ago

have you seen the issue "Activate GPS navdata #75"?

"Even with the Flight Recorder GPS accessory, from a cold boot the AR.Drone doesn't send GPS data as part of navdata."

https://github.com/felixge/node-ar-drone/issues/75

On Mon, Dec 22, 2014 at 12:26 AM, Shehroze Bhatti notifications@github.com wrote:

The other nav data prints out fine

— Reply to this email directly or view it on GitHub https://github.com/felixge/node-ar-drone/issues/111#issuecomment-67812722 .

Robert Talamantez 813-404-0800

lwsang13 commented 9 years ago

Hi @wiseman !! I have Big problem! Please help me... I'm using ARdrone1.0...I attatched gps to my ardrone. And i tested it using Arduino and linux.... but I don't know how to get data using Visual studio(c++).

  1. Do you know how to get data from Ardrone 1.0??
  2. And can you expain ZIMMU_3000 ?? is it similar with gps?
  3. Is it right that the gps data are included in navdata?

size of data are just 12 in my program, so I'm very confused. Thank you!

wiseman commented 8 years ago

Sorry, @lwsang13, this code isn't compatible with AR.Drone 1.0 and I don't know anything about it.

tdgreen commented 7 years ago

Hi @wiseman, @Talamantez ,

Long shot since it's been so long since you've worked on this, but I can't seem to get navdata either. Following issue #75 and #94, and running the exact same firmware (2.4.8) and gps firmware (4.1.2-P6), I still get essentially empty gps navdata. When printing navadata.gps.nbSatellites at every navdata event, I get just 0's.

Any ideas?

Thanks

wiseman commented 7 years ago

Just to be clear, you do get navdata, and the GPS navdata, but the GPS navdata basically shows that it's not receiving any satellites and it's not getting a GPS fix?