Communicating with drones using different languages (i.e. mavlink for javascript)

Just curious if anyone has tried to use javascript to send mavlink commands to a drone... I am trying to make an HTML5/JS application that will send new waypoints to a drone.  the plan is for it to be mobile and platform independant.  does anyone know if this has been done?  I have seen the C++ implementation and a python implementation.

I also saw what the MAVlink packet looks like, If it came down to it, I guess I could just write some code to create my own packet.  However, I am not trying to reinvent the wheel if I don't need to.

Ideas and suggestions would be gladly accepted :)



Views: 581

Reply to This

Replies to This Discussion

For our JavaScrip HTML 5 you need a browser that supports Web Sockets

Otherwise you need either an intermediary like a web server or plugin for you browser.

Bill, thanks for the websocket advice... I was wondering, once I open the socket, how would I send a message like WAYPOINT_SET_CURRENT.  and how do I specify to use the MAVLink protocol.  Sorry for all the questions, just starting out with this project.  


FYI, I've issued a pull request to the main mavlink repository that contains code to generate Javascript implementations of the MAVLink protocol.  The work is preliminary and not flight-tested, but it may get you going in the right direction.

Here's the pull request:

And here's our forked repo; the relevant code is in the 'javascript' branch:

Feedback/questions welcome!

Reply to Discussion



Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service