Skip to content

salcedoinaki/MsfsDebrief

Repository files navigation

MsfsDebrief

AI-Powered Flight Debrief for Microsoft Flight Simulator 2020/2024

MsfsDebrief is a telemetry logging and analysis application that connects to MSFS via SimConnect, records flight data, automatically detects flight phases and events, scores your takeoffs and landings, and provides AI-powered post-flight debriefs using the Model Context Protocol (MCP).

.NET Platform License Build Coverage

Features

📊 Real-Time Telemetry

  • Records 77+ SimConnect variables at configurable rates
  • Displays live telemetry (IAS, altitude, VS, heading, engine data)
  • Visual warnings for stall, overspeed, and other conditions
  • Exports to CSV for external analysis

✈️ Flight Phase Detection

  • Automatically tracks 14 flight phases:
    • Preflight → Taxi → Takeoff Roll → Initial Climb → Climb → Cruise
    • Descent → Approach → Final → Landing → Rollout → Taxi In → Shutdown
  • Configurable thresholds for different aircraft types
  • Go-around and touch-and-go detection

🎯 Event Detection

  • Takeoff Events: Liftoff speed, rotation pitch, climb rate
  • Landing Events: Touchdown rate (FPM), G-force, centerline tracking
  • Configuration: Gear up/down, flaps changes
  • Warnings: Stall, overspeed, excessive bank/pitch
  • Pattern Work: Bounce detection, go-around identification

📈 Automatic Scoring

  • Takeoff Score: Rotation speed, directional control, initial climb
  • Landing Score: Touchdown rate, centerline, approach speed, flare technique
  • Pattern Score: Altitude adherence, speed control, bank angles
  • Overall Flight Score: Weighted combination with letter grades (A+ to F)

🤖 AI-Powered Debrief (MCP)

  • Integrates with AI assistants via Model Context Protocol
  • 12 MCP tools for querying flight data
  • 7 prompt templates for detailed analysis
  • Resources for flight recordings, events, scores, and aircraft profiles

💾 Flight Database

  • SQLite storage for all flights
  • Browse past flights with search and filtering
  • View detailed debrief for any recorded flight
  • Export capabilities

Installation

Prerequisites

  • Windows 10/11
  • .NET 10.0 Runtime
  • Microsoft Flight Simulator 2020 or 2024
  • SimConnect SDK (included with MSFS SDK)

Building from Source

# Clone the repository
git clone https://github.com/yourusername/MsfsDebrief.git
cd MsfsDebrief

# Build the solution
dotnet build

# Run the application
dotnet run --project src/MsfsDebrief.Win

Running Tests

dotnet test --verbosity normal

Usage

Quick Start

  1. Start MSFS and load into an aircraft
  2. Launch MsfsDebrief - it will auto-connect to SimConnect
  3. Click "Start Recording" (or enable auto-start in Settings)
  4. Fly your flight - phases and events are detected automatically
  5. Stop Recording when complete - flight is scored and saved
  6. View Debrief from File → Flight Browser

Recording Controls

Control Description
Start Recording Begin capturing telemetry
Stop Recording End capture and score flight
Auto-Start Automatically start on SimConnect connect
Auto-Stop Automatically stop on disconnect

Status Bar

The status bar shows:

  • Connection: SimConnect connection status
  • Phase: Current flight phase (Taxi, Climb, Cruise, etc.)
  • Recording: Recording state and duration
  • Samples: Number of telemetry samples captured

Keyboard Shortcuts

Key Action
F5 Start Recording
F6 Stop Recording
Ctrl+B Open Flight Browser
Ctrl+S Open Settings

Aircraft Profiles

MsfsDebrief includes built-in profiles for:

  • Cessna 172S Skyhawk SP (c172s)
  • Piper PA-28-181 Archer III (pa28-181)

Profile Contents

Each profile defines:

  • V-Speeds: Vs0, Vs1, Vr, Vx, Vy, Va, Vfe, Vno, Vne
  • Approach Speeds: By flap setting (0°, 10°, 20°, 30°)
  • Performance Limits: Pattern altitude, climb rate, takeoff/landing roll
  • Engine Limits: RPM ranges, oil pressure/temp, CHT/EGT

Custom Profiles

Profiles are stored as JSON in %LOCALAPPDATA%\MsfsDebrief\profiles\

{
  "id": "c172s",
  "name": "Cessna 172S Skyhawk SP",
  "category": "GA_PISTON_SINGLE",
  "vSpeeds": {
    "vr": 55,
    "vx": 62,
    "vy": 74,
    "vs0": 40,
    "vs1": 48
  }
}

MCP Integration

MsfsDebrief includes an MCP server for AI integration.

Available Tools

Tool Description
ListFlights List recent flights
GetFlight Get flight details by ID
GetFlightSummary Comprehensive summary for AI analysis
GetFlightEvents All detected events
GetFlightPhases Phase transitions
GetFlightScores Detailed scoring breakdown
GetLandingDetails Specific landing analysis
GetTakeoffDetails Specific takeoff analysis
GetAircraftProfile Aircraft V-speeds and limits
ListAircraftProfiles All available profiles
GetLatestFlight Most recent flight
SearchFlights Search by date/aircraft

MCP Prompts

Prompt Description
AnalyzeLanding Detailed landing feedback
AnalyzeTakeoff Detailed takeoff feedback
AnalyzePattern Traffic pattern analysis
GenerateDebrief Full flight debrief
SuggestImprovements Improvement recommendations
CompareLandings Compare multiple landings
ExplainScore Explain scoring logic

Configuring with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "msfs-debrief": {
      "command": "path/to/MsfsDebrief.Mcp.exe"
    }
  }
}

Data Storage

All data is stored in %LOCALAPPDATA%\MsfsDebrief\:

MsfsDebrief/
├── flights.db          # SQLite database
├── telemetry/          # CSV telemetry files
├── profiles/           # Aircraft profile JSONs
├── logs/               # MCP server logs
└── settings.json       # Application settings

Scoring System

Landing Score Components

Component Weight Description
Touchdown Rate 30% Vertical speed at touchdown
Centerline 20% Lateral deviation from centerline
Approach Speed 20% Speed vs. recommended Vref
Flare Technique 15% Pitch attitude at touchdown
Touchdown Zone 15% Distance from threshold

Touchdown Rate Scoring

FPM Rating Score
< 60 Greaser 100
60-120 Excellent 90-100
120-200 Good 75-90
200-300 Firm 50-75
300-500 Hard 25-50
> 500 Very Hard 0-25

Grade Scale

Score Grade
97-100 A+
93-96 A
90-92 A-
87-89 B+
83-86 B
80-82 B-
77-79 C+
73-76 C
70-72 C-
67-69 D+
63-66 D
60-62 D-
< 60 F

Configuration

Settings are stored in %LOCALAPPDATA%\MsfsDebrief\settings.json:

{
  "defaultAircraftProfileId": "c172s",
  "autoStartRecording": false,
  "autoStopOnDisconnect": true,
  "pollingRateFrames": 6,
  "outputDirectory": null
}
Setting Description Default
defaultAircraftProfileId Default profile for new flights c172s
autoStartRecording Start recording on connect false
autoStopOnDisconnect Stop recording on disconnect true
pollingRateFrames SimConnect polling rate 6
outputDirectory Custom telemetry output path (auto)

Troubleshooting

SimConnect Won't Connect

  1. Ensure MSFS is running and in an aircraft
  2. Check that SimConnect.dll is accessible
  3. Verify MSFS SDK is installed (for development)

No Telemetry Data

  1. Verify "Connected" shows in status bar
  2. Check recording is started (red indicator)
  3. Ensure aircraft is powered on in sim

Phases Not Detecting

  1. Verify correct aircraft profile is selected
  2. Check phase thresholds match your aircraft type
  3. Ensure on-ground state is updating correctly

Contributing

See CONTRIBUTING.md for development guidelines.

For architecture diagrams and system design documentation, see docs/architecture/README.md.

Code Quality

This project uses:

  • GitHub Actions for CI/CD (build, test, coverage)
  • Codecov for code coverage reporting
  • .editorconfig for consistent code style
  • Microsoft.CodeAnalysis.NetAnalyzers for static analysis
  • coverlet for test coverage collection

License

Proprietary License - This software is provided for personal, non-commercial use only. See LICENSE for details.

Acknowledgments

  • Microsoft Flight Simulator SDK team for SimConnect
  • The MCP (Model Context Protocol) project
  • The flight simulation community for testing and feedback

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages