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

  •  

    Guys could you share your cfg file? Can't manage to run it!

  • Developer

    I was never able to get it to work. It would be great to have someone do it and share.

    Jason

  • RE: X-Plane EasyStar

    Has anyone followed up on David Ankers suggestion to use the EasyStar.3ds file from the OpenPilot site, import it into AC3D and export it for X-Plane?

     

    If so, how did it work?

     

    I have X-Plane coming soon and would like to "fly" EasyStar with it.

  • Hmm Serproxy is running fine for me, but when XPlane starts up, XPlane.pl gives this message: Invalid type '<' in pack at ./XPlane.pl line 250.


    Anyone know whats going on?
    home.pl : Najlepszy hosting. Domeny, serwery, e-mail, sklepy internetowe, SSL
  • Serproxy with newlines_to_nils=false AND comm_baud=38400 worked great for me with Windows7 32bit. Having trouble with some of the flying modes on APM though, but better in the sim than in the air.
  • Moderator
    RecMaster,

    The default configuration in X-Plane 9 is: b Toggle Brakes To Regular, v Toggle Brakes To Maximum, and g Toggle Landing Gear. This applies to most aircraft, however custom aircraft files and those with special control sets may not respond in the same manner.

    This information, along with all the keyboard shortcuts, are on the last page of the Operation Manual. Unfortunately there isn't an electronic version of this installed. You might explore the installation disc to see if there is a copy there.

    Nathaniel
  • Yello people!

    I've a stupid question: do I need to press some buttons to start simulation in X-plane?
    I mean break off, set gear and so on.
  • Looks like serproxy is talking to XPlane.pl on Windows 7 x64 for me now after swapping the cfg file. I haven't configured X-Plane yet, as I only have an Ardupilot Mega right now (showed up late to the diydrones party).
    home.pl : Najlepszy hosting. Domeny, serwery, e-mail, sklepy internetowe, SSL
  • Developer
    Skip that config file. I think it's confusing.

    Get a fresh copy of serproxy from here:
    http://download.berlios.de/arduino/serproxy-0.1.3-3.bin.win32.zip

    in the config set:
    newlines_to_nils=false
    comm_baud=38400

    The you can set your com port accordingly.
  • The config file provided works for me in Windows. You could a couple of things...
    1. Do you have the FTDI drivers installed?
    2. Once the USB cable is plugged in, do you see the 'serial' comm port in device manager?

    For me, it was Com port 4, so I used com_ports=4.. then I set net_port4 = 5334.
    The other lines, I just commented out.

    I have not tried ports beyond com port 4 (e.g. com port 9 like you are trying)
This reply was deleted.