Giter Site home page Giter Site logo

fslogger's Introduction

Microsoft Flight Simulator Logger (fsLogger)

What it does

This script connects to a Microsoft Flight Simulator (FSX or newer), extracts flight variables (like a flight data recorder or "black box") and records it to a CSV file. The script can also automatically load KST2 for real-time viewing of the data while flying. It logs about 10-20 points per second, depending on the FPS, which is sufficient to resolve most manouvers and

This can be used to analyze flight details, such as climb rate, G-forces, bank angles, etc., which is usefull as a student training to fly a real airplane or if you are a airplane/modding developer wanting to investigate flight behaviour in more detail.

Requirements

  • PowerShell v3 or higher
  • FSX SP2 (or "newer")
  • .Net 4.5 or higher
  • (Optional) KST2 data visualization tool

Installation

  1. Download the script from: https://github.com/RandomDude4/fsLogger/releases
  2. Extract fsLogger files in any directory of your choice (where you have write access)
  3. Install SimConnect (Microsoft API for communicating with the simulation)
    1. This is the same client used by for example Little Navmap (should be version 10.0.61259)
    2. Example of download location: https://www.littlenavmap.org/downloads/SimConnect/
  4. (Optional) Download KST2 (https://kst-plot.kde.org/) and place the "Kst" folder in the same folder as the script so that the exe is located in "/kst/bin/KST2.exe"

Running

Double click START.bat This will open a PowerShell console in admin mode (you need admin rights) that connects to the simulator and it creates a Data.csv file which updates contineously as long as the simulation is running.

If you also have installed KST and the variable $startKST (in fsLogging.ps1) is set to "1", then KST will start and display all data in real time. To reopen an existing Data.csv file (or the included example file) run KST_start.bat

fsVar.xml contains all the variables that are extracted. All variables that can be added or used can be found here: https://docs.microsoft.com/en-us/previous-versions/microsoft-esp/cc526981(v=msdn.10)

Screenshots

Here are a few screenshots of the data collected by default and the default KST profile for real-time analysis. The data shows a simple take off with a dual engine aircraft, with flaps and gear retraction. The KST profile is divided into two tabs both showing the same time axis.

Flight variables: Flight variables

Airplane control surfaces: Plane control surfaces

References

The script is based on the PowerShell code in the FSX RESTful API project by pariljain (https://github.com/paruljain/fsx).

Known issues

  • Positive Pitch and Pitch-rate is defined as a negative angle in SimConnect
    • (probably has to do with left/right handed coordinate system in the simulator for the math to be correct)
  • SimConnect seems to only work for the first Flight Simulator installation (known bug in SimConnect)
  • The script does not work properly if you change time of day mid flight, as it uses the time for detection of new datapoints.
    • Solution: Restart the script
  • The script is quite simple, hence there is almost no error handling or other fancy features.

fslogger's People

Contributors

randomdude4 avatar paulwalkeruk avatar

Stargazers

 avatar Lee Berg avatar Subrat avatar

Watchers

 avatar  avatar

Forkers

paulwalkeruk

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.