Hi everyone.

Are you trying to test your control law, that you implemented in Simulink, on a flight simulator (e.g. X-Plane) and see how it  performs before you actually try it on your drone?

Then this is the right tool for you!!

This is basically some Simulink models that allow communication between Simulink and X-Plane 10 (Yes X-Plane 10, not 9!)

Simply, it decodes the UDP data packets coming from X-Plane to meaningful data (roll, pitch, yaw, rates...etc), so you can use them in your control design!

Also, it allows you to send commands to the plane in X-Plane (e.g. control surfaces, nosewheel and many!!)

I know many of you (developers, researchers, or even hobbyists), myself included, have been looking for such tool. Probably since long time, like myself!

I also know that there are many people who have already done that, but I can not easily find such tool that can be just downloaded and used immediately.  So I thought of just doing it and share it with you guys.

These are basically three models.

1- 'setup_xplane': it sends some commands to xplane to tell it what data to send back (e.g. attitude angles, rates, GPS data..etc). Basically, it checks the boxes of the requested data in the 'Data Input & Output' screen in xplane

2- 'getData_from_xplane': it receives requested data packets from xplane, then decipher them to meaningful information.

3- 'commands_to_xplane': send commands to xplane to manipulate the plane actuators (elevators, ailerons, rudder, nose wheel). However, it's not limited to that!! You can have almost full control of the simulator environment, by sending the appropriate commands.

Again, this is tested successfully on X-Plane 10 NOT 9. However, it can be modified to talk to X-Plane 9 (you will do that; yet, i don't see why you still use X-Plane9 anyway!)

Feel free to play with it and tune/modify/improve/copy/redistribute it, for good, but please at least keep the credit :)

I hope you find it useful for you guys, and I am waiting for your feedback.

[Codes here]

Thanks

[EDIT] July 2nd 2014

I did a little modification on the nose wheel  control signal. It was not working properly. Now it does.

Inbox me if you are interested in the modified version.

=============================

[EDIT] Jul 6 2014

Files are moved to Mathwroks File Exchange website

Link here

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

Join diydrones

Email me when people reply –

Replies

  • Hi Mohamed

    while i was trying connect the simulink with x-plane i opened all m files(getdata,send command and setup_x-plane ) i get a error.

    "Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks.
    Use 'mex -setup' to select a supported C-compiler."

    Do you have any advise

    • @ thevenin:  Could you contact me by email?

      • yes i contated to you by e-mail at 10.44 today

  • Hi Yoga,

    I am glad it serves your needs. It certainly helped a lot in our lab, too. It facilitates the process of simulation testing and control design.

  • I have found this UDP very useful as it is very configurable. I could adapt it to a helicopter X-planes model and set the various parameters like rotor rpm, pitch etc. Getting the data back is also very easy and I could close the loop on an X-planes helicopter model using Simulink. Thank you.

This reply was deleted.

Activity

DIY Robocars via Twitter
RT @a1k0n: @SmallpixelCar @diyrobocars It's just something that's easy to track with chroma keying. I ended up using different colors on th…
5 hours ago
DIY Robocars via Twitter
5 hours ago
DIY Robocars via Twitter
RT @TinkerGen_: "The Tinkergen MARK ($199) is my new favorite starter robocar. It’s got everything — computer vision, deep learning, sensor…
Nov 23
DIY Robocars via Twitter
Nov 23
DIY Robocars via Twitter
RT @roboton_io: Join our FREE Sumo Competition 🤖🏆 👉 https://roboton.io/ranking/vsc2020 #sumo #robot #edtech #competition #games4ed https://t.co/WOx…
Nov 16
DIY Drones via Twitter
First impressions of Tinkergen MARK robocar https://ift.tt/36IeZHc
Nov 16
DIY Robocars via Twitter
Our review of the @TinkerGen_ MARK robocar, which is the best on the market right now https://diyrobocars.com/2020/11/15/first-impressions-of-tinkergen-mark-robocar/ https://t.co/ENIlU5SfZ2
Nov 15
DIY Robocars via Twitter
RT @Ingmar_Stapel: I have now explained the OpenBot project in great detail on my blog with 12 articles step by step. I hope you enjoy read…
Nov 15
DIY Robocars via Twitter
RT @DAVGtech: This is a must attend. Click the link, follow link to read the story, sign up. #chaos2020 #digitalconnection #digitalworld ht…
Nov 15
DIY Robocars via Twitter
RT @a1k0n: Got a new chassis for outdoor races (hobbyking Quantum Vandal) but I totally didn't expect that it might cause problems for my g…
Nov 11
DIY Drones via Twitter
First impressions of the Intel OpenBot https://ift.tt/36qkVV4
Nov 10
DIY Robocars via Twitter
Nov 9
DIY Robocars via Twitter
Excellent use of cardboard instead of 3D printing! https://twitter.com/Ingmar_Stapel/status/1324960595318333441
Nov 7
DIY Robocars via Twitter
RT @chr1sa: We've got a record 50 teams competing in this month's @DIYRobocars @donkey_car virtual AI car race. Starting today at 10:00am…
Nov 7
DIY Robocars via Twitter
Nov 6
DIY Robocars via Twitter
RT @a1k0n: Car's view, using a fisheye camera. The ceiling light tracking algorithm gave me some ideas to improve ConeSLAM, and having grou…
Nov 5
More…