Developer


I've finally perfected the X-Plane HIL for Ardupilot. This will be a feature on 2.6.3 which will be in beta today.


Flying Waypoints:



Here is missed waypoint detection: (I nudged the plane at the last second with the radio to miss the WPs.)


Here is fully auto take off and landing:



Here is the video of auto takeoff and landing:


Xplane and Ardupilot from Jason Short on Vimeo.




If you want to try this out you have to use some software to glue this all together.


Serproxy - used to talk serial to Ardupilot

Perl - to link Serproxy and X-Plane using "X-Plane.pl"

X-Plane 9 (the free version works fine, but it time limited)


I've only tested this on a Mac, so if anyone can try this on a PC, please let me know of changes to make, if any.


In the config header you will see a new ground station called GCS_Xplane (3). You must also use GPS_protocol 3 for ArduIMU.


Here is the Perl file:X-Plane.pl

Here is Windows Serproxy - Windows

Here is Mac Serproxy - Mac


in the config set:

newlines_to_nils=true

comm_baud=38400

Then set the com port accordingly



Go ahead and download 2.6.3 from the SVN. I'll post a beta soon as a download.


Moving forward I'd like to replace the Perl/Serproxy combination with a single C or Python based solution. If anyone can help, that would make it so much easier to set up!



Bonus:



E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Moderator
    Michael,

    Can you post the source code as well?

    Nathaniel
  • Developer
    Hi, Jason

    I have written a serial to xplanes program in c# it can be downloaded from http://vps.oborne.me/Ardupilot2Xplanes.exe

    Its based on the 2.7 code
  • Jason, this may me helpful to you;
    http://gitorious.org/ron-s-hanger/easystar-rc/trees/master
  • Hi Bosak ! Thats really great !

    Thank u !
  • T3
    NsRana:
    "I have ordered my X-Plane from Laminar, it is already on the way containing 6-7 double layer DVD's of scenery databank of almost all the globe. "
    I have it.
    They have EVERYTHING depicted accurately... except your local airport. And the next closest local airport. And the next closest (who cares about an arport that cannot accomodate a Boeing or two?). And except the record flight airport you would like to takeoff from. LAX is superb. Then your local plains with 1 house every 200m turn out to have Arizona looks, and Paris suburbs gain Chicago layout...
    At the end you can 'simulate' a flight around top overcrowded city centers, and nowhere else.
    Because for merely Google Earth accuracy you would need Terabytes.
  • Developer
    Yes, we need a wind estimator really badly in Mega, because few people will be flying with airspeed sensors. It's much more satisfying to try out new things knowing you won't loose a plane...
    Looking forward to implementing some of your ideas.
  • Developer
    Excelent work Jason now you can really "see" your flight laws! I still havn't had much time to glance at any of the new code but Doug knows exactly how my implementation works. It appeard that he may have been tailoring it to different configurations of hardware etc. Skype me if you have any specific quesitons. I can help you a ton now with a sim and screen sharing! I did alot of testing using xplane ( improved heading controller which you should check out, gps alt smoother, super simple wind estimator, etc) thanks to Tim Trueman's setup in Python

    http://diydrones.com/profiles/blogs/position-amp-wind-extended
  • There are some pretty ok RC planes available for x-plane here as well:
    http://forums.x-plane.org/index.php?app=downloads&showcat=60
  • I just gotta say it too... Fantastic work Jason! I'm looking forward to getting this running in my lab soon. Thanks so much for sharing all your work so far.
  • Developer
    David & Jason,
    Thanks for FlightGear Sim setup info, I agree that Sim testing is preferred to UAV flying away or into the ground. HW in loop can reveal any goofy behavior with little risk to equipment or people. I have flown FG with Rascal_110 in past using Jean-Louis Naudin's AP 2.47 AP and ArduFGControl 1.1 glue code on a HP laptop with Nvidia graphics. It worked great. but I could not get it going with AP 2.6
    I have not flown ArduPilot 2.6_2 in the air since March due to not trusting my code or PID settings, but with Jason's new AP in loop Sim I can verify that I don't have up and down swapped, and PIDs are set pretty close. I have X-Plane 9 and prefer to run it on my MacBookPro.
    Thank You Jason, keep the great updates & utilities coming...
This reply was deleted.