3689709649?profile=originalThis video shows me flying our homebrew "Hackflight Sim" quadcopter flight simulator using a Spektrum DX8 receiver without a cable. The DX8 is talking to a Lemon RX satellite receiver connected to Teensy 3.2 (32-bit Arduino-compatible microcontroller), which connects to my Linux computer over a USB cable, as shown in the image below. A simple Arduino sketch reads the DSM-encoded values from the RX over the Teensy's RX1 (UART input) pin, and converts them to serial messages encoded using Multiwii Serial Protocol (MSP). The simulator parses these messages, converting them into stick demands to fly the simulated MAV.

Consistent with the Hackflight approach of using and re-using inexpensive, open-source hardware and software as much as possible, this hack relies on hardware (Teensy 3.2 micrcontroller, Lemon RX satellite receiver) and software (MSP parser) that we are using onboard our MAVs as well.

3689709697?profile=original

Although it'd be great to get this cable-free hack working with a commercial flight simulator like Phoenix, there is already at least one such solution available commercially.  

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Hilarious!  That's why ye a teacher and aye's a adult learner.

  • Tarnation, rabbit, ya got it plumb backerds!

    UINT8 = BYTE

    UINT16 = SHORT

    UINT32 = INT

  • I'm using a i2cNav setup for UBX so I'm pretty sure MSP_RAW_GPS is what the controller is sending.  Based on the MSP message definitions, I edited the json file.  If the variable is UINT 8, I made it "short", UINT16 "int", and UINT32 "byte".  The whole bytebuffer cant be bigger than "16" based on the index out of bound message I got.  When I got that newByteBuffer(16) was actually newByteBuffer(18). 

    Right now for some reason, I'm getting perfect longitude in the altitude spot.

    ;

            

  • The Multiwii Serial Protocol specifies the format for values in MSP_RAW_GPS messages, which are all integers of various sizes (byte, short, int).  It would be easy to add such a message specification to messages.json.  The hard work will be in adding to your firmware so that it can take standard GPS messages (NMEA or UBX) from your GPS unit and translate them into MSP_RAW_GPS.    

    Multiwii Serial Protocol - MultiWii
  • Simon, Victory is addictive and fleeting.  I got ambitious and tried to add GPS to the messages parser handles.  Python worked fine and built the java output directory and java compiled it, but I didn't know whether I needed int float or short for each GPS variable.  I went with short for each and I get something but none of it looks right. 

  • @Harry Victory Dance!!!

  • Simon, I got it finally.  I had every Java error ever conceived and then I changed the roll,pitch,yaw in my HUD to public and it worked.  Its very pretty and better than all my previous attempts at a ground station. 

  • I chewed on it for awhile.  I have a few examples of attitude indicators that extend View.  I got HackFlight to display a HUD but I don't know how to get roll,pitch,yaw into this View.  Its a shame, HUD is so pretty and parser is chugging away.   

  • Holy cow, that's exactly what Ive been trying to do.  Your app even uses the same USB driver/service Ive been using.  Ill chew on this example for a while.  Thanks.

  • No worries, Harry.  I've got a simple, complete Android example for you to work with:

    Video: https://www.youtube.com/watch?v=jncxOl-Xkcg

    Code: https://github.com/simondlevy/hackflight/tree/master/gcs/android

This reply was deleted.