This repo provides a minimal example of how to replace the flight dynamics model in FlightGear with an external one, provided by a .NET core application. This could be used to create and fly your own simulation code without having to provide any graphics or scenery.
- Download and install FlightGear onto your machine.
- Copy the files from the
Configdirectory into FlightGear's/data/Protocolfolder. On Windows machines, this is typically found under the following path:C:\\Program Files\\FlightGear <version> - Run FlightGear from the
startFlightGear.batfile provided. If you use linux, a different version of FlightGear or a different install path, you will need to modify accordingly. - Run this .NET core app your favourite way -
dotnet run, debugging in an IDE etc. - To "fly" this simulation, press the
Tabkey in FlightGear to change into mouse steering.
Firstly, we configure FlightGear to run in the following ways:
- Disable the Flight Dynamics Model within the application. This stops FlightGear from running it's own aircraft simulation.
- Configure FlightGear to send aircraft controls (throttle, ailerons, elevator, rudder etc) frequently over UDP.
- Configure FlightGear to read aircraft position and orientation frequently over UDP.
We then run a .NET core app which can send and receive over the same protocol and run it's own simulation loop. In this repository, we do not build a simulation model, but simply rotate the aircraft based on the inputs provided.
FlightGear can be configured to input or output most values in it's Property Tree over a variety of protocols.
This can be used to experiment with all sorts of things without modifying or interacting with the core FlightGear codebase. For example, it can be used to create experimental autopilots, external gauges or even custom input devices.