Jump to content

Sign in to follow this  

sim which outputs "realtime" attitude and position

Recommended Posts

I'm working on an quasi-autonomous control system for very small fixed wing aircraft. Project is non-commercial and was the hardest thing I could think of to devote my retirement to. This would include airframe design and construction, electronics, and coding - everything.  

I had planned to write code and run it in an R/C plane so I could swirtch back to manual if I didn't like what it was doing. 

After a lot of thought, I've concluded that this isn't a good idea.  The cycle times between flights and likelihood that more than one thing will be wrong would suggest that this sort of program will not cause the work to converge in a positive direction.  It would be better to do this in simulation.

So I wonder if any of the relatively inexpensive simulation packages either include or can have added to them, a subroutine which will export "relatively real-time" attitude, heading, altitude, and present position (lat/lon) ??

Best form of output would be serial datastream out a usb port or if not that sent to an ip address.  

My plan would then be to have my black-box drive the simulation using the datastream as feedback.

Is there anyway to do this using commercially available software - could be Windows, Linux, or Mac - with preference for Linux. 

'Grateful for any ideas or advice on this subject.


Share this post

Link to post
Share on other sites

The closest I could find was at the following link - https://www.lifewire.com/flight-simulators-for-linux-2204909.  If you want in-depth information concerning your project, I would post your questions in the fsdeveloper forums -  https://www.fsdeveloper.com/forum/.  This is where many of the technical experts in our community post topics and ideas like yours.  I am sure you will find a solution there!  Good luck in your retirement!  I have been fully retired 19 years now and it has been enjoyable!

Jim Young | AVSIM Online! - Simming's Premier Resource!

Member, AVSIM Board of Directors - Serving AVSIM since 2001

Submit News to AVSIM
Important other links: Basic FSX Configuration Guide | AVSIM CTD Guide | AVSIM Prepar3D Guide | Help with AVSIM Site | Signature Rules | Screen Shot Rule | AVSIM Terms of Service (ToS)

I7 8086K  5.0GHz | GTX 1080 TI OC Edition | Dell 34" and 24" Monitors | ASUS Maximus X Hero MB Z370 | Samsung M.2 NVMe 500GB and 1TB | Samsung SSD 500GB x2 | Toshiba HDD 1TB | WDC HDD 1TB | Corsair H115i Pro | 16GB DDR4 3600C17 | Windows 10 


Share this post

Link to post
Share on other sites

Thanks much Jim Young.  I retired in 2003.  It was that or Baghdad (consultant - not military).  I've been working on this project 4 years now.  An evening's discussion with an engineer last summer convinced me that it would be quicker to develop control software in simulation - and fewer beroken airplanes.


Share this post

Link to post
Share on other sites

Thanks Jim. I was going to suggest FS Developer as well. We have a plethora of tech wonks there who may be helpful.

  • Like 1

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556

Interests: Gauge Programming - 3d Modeling for Milviz

Share this post

Link to post
Share on other sites
On ‎10‎/‎15‎/‎2018 at 2:39 AM, jferguson said:

plethora.  Yup, That's what I need. I've had a terrible time even finding someone who understood wht I was asking.


Most desktop simulators have an API of some kind, in different flavors of quality, documentation and wealth of code examples online.

The most accessible is probably the SimConnect API that is part of FSX and P3D. It can be used with C++ or C# code, is documented relatively well, and there are many examples online of how to use it. I can recommend using C#, as the language is really powerful and a lot easier to use than C++ if you are writing native Windows client software like Forms or WPF.

The use cases are probably these:

  • Read the desired data from the API
  • Send the data to your external hardware
  • Read back steering information from your external hardware
  • Inject the steering commands into the sim

Programmatically these tasks are a piece of cake, especially the first two are a couple of hours at most. The last two could probably be covered simply by implementing a USB Joystick interface in your hardware, to send bog standard steering commands to the sim directly. If that is not an option, the interface would have to be written by hand, reading the steering data from whatever data output you have, transforming them and injecting them into the sim. Also not that big a deal.

Right, inexpensive: I would use the FSX Steam Edition.

All of this is assuming that you don't need some special aircraft simulated. That would be a whole other department, and you would have to ask a skilled designer to create it for you - especially the flight dynamics.

Best regards


Edited by Lorby_SI


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online

  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
  • Donation Goals

    AVSIM's 2020 Fundraising Goal

    Donate to our annual general fundraising goal. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.

    $13,405.00 of $25,000.00 Donate Now
  • Create New...