Skip to content

kushagra1912/Simulated-Telemetry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Simulated-Telemetry

🚦 A cross-platform C# console application for simulating and visualizing racing telemetry data.
Designed for real-time use cases such as racing cockpits, simulators, and telemetry training tools.


🧰 Features

  • βœ… Telemetry Modes

    • Simulated: Generates internal mock data
    • UDP: Listens for incoming telemetry over UDP
    • Serial: Connects to physical telemetry devices (e.g., Arduino)
  • βœ… Live ASCII Dashboard
    Displays speed, RPM, gear, throttle, and brake in real time.

  • βœ… Input Commands
    Interact using:

    • pause, resume, stop
    • speed=<value> to override speed in simulation mode
  • βœ… Telemetry Logging

    • JSONL logs per session in telemetry_logs/
    • Ideal for analysis and replay

πŸ“ Project Structure

SimTelemetry/
β”œβ”€β”€ Program.cs           # Main telemetry processor (Simulated, UDP, Serial)
β”œβ”€β”€ telemetry_logs/      # Automatically generated on runtime

UDPSender/
└── Program.cs           # Sends mock JSON telemetry to SimTelemetry

πŸš€ Getting Started

1. Requirements


▢️ Run the SimTelemetry App

cd SimTelemetry
dotnet run

Choose one of the modes:

  • 1 - Simulated (no external input)
  • 2 - UDP (must run UDPSender separately)
  • 3 - Serial (requires a serial device or emulator)

🌐 Run the UDP Sender

In a separate terminal:

cd UDPSender
dotnet run

This app sends mock JSON packets every second to localhost:9000.

Sample packet:

{
  "Speed": 185,
  "RPM": 7200,
  "Gear": 4,
  "Throttle": 0.87,
  "Brake": 0.13,
  "Timestamp": "2025-04-15T10:30:00Z"
}

πŸ§ͺ Simulate Serial Input (Optional)

Upload the following sketch to an Arduino:

void setup() {
  Serial.begin(9600);
}
void loop() {
  Serial.println("Speed=183,RPM=7400,Gear=4,Throttle=0.88,Brake=0.10");
  delay(1000);
}

Connect via USB and choose option 3 in SimTelemetry.


πŸ—ƒοΈ Logs

All telemetry is logged to:

telemetry_logs/session_YYYYMMDD_HHMMSS.jsonl

Each line is a JSON object for easy import into tools like Excel, Power BI, or Grafana.


🧠 Tech Stack

  • C# .NET 7 (console apps)
  • System.Text.Json
  • UdpClient / SerialPort
  • async/await for concurrency

πŸ“Œ Future Ideas

  • Add replay mode from JSON logs
  • Create .NET MAUI GUI version
  • Add WebSocket server for broadcasting telemetry

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages