hybridgroup / node-bebop

A Node.js client for controlling Parrot Bebop & Bebop2 quadcopters.
http://nodebebop.com
MIT License
146 stars 61 forks source link

Support For Getting GPS Coordinates #11

Closed ryanjbaxter closed 8 years ago

ryanjbaxter commented 8 years ago

Is it possible to add support for getting the GPS coordinates of the drone?

deadprogram commented 8 years ago

The Bebop API shows PilotingStatePositionChanged with a PositionChanged packet: https://github.com/Parrot-Developers/libARCommands/blob/master/Xml/ARDrone3_commands.xml#L539

So it should be possible.

ryanjbaxter commented 8 years ago

Any pointers on how to implement that? Maybe an example of an existing event that is already implemented in the node bebop library?

deadprogram commented 8 years ago

This is the FlyingStateChanged packet code that is currently implemented:

https://github.com/hybridgroup/node-bebop/blob/master/lib/bebop.js#L241

deadprogram commented 8 years ago

Hi, @ryanjbaxter you can now get the GPS info as part of the PositionChanged message. Check out https://github.com/hybridgroup/node-bebop/blob/master/examples/gps.js

ryanjbaxter commented 8 years ago

Nice thanks I will take a look at it this week! Has this been published to NPM?

deadprogram commented 8 years ago

Yes, published yesterday.

deadprogram commented 8 years ago

Hi @ryanjbaxter we've just released v0.5.0 which has many improvements including more support for the GPS events. Please give it a try, and if needed reopen this issue. Thanks!