-
Notifications
You must be signed in to change notification settings - Fork 1
Q25 Telemetry System #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
mcassar4
wants to merge
14
commits into
master
Choose a base branch
from
Q25-Telemetry
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Explains what the files do, the purpose of the project, and how next steps for development
- use `pipenv install --dev` in the directory to set up the virtual environment
- Created `main.py` as the entry point for the telemetry system. - Added PyQt5-based GUI initialization. - Implemented `TelemetryWindow` (to be added in future commits). - Launched the PyQt5 application loop.
- Imported PyQt5 modules for UI components, timers, and multimedia effects. - Integrated `pyqtgraph` for real-time telemetry data visualization. - Added CSV and datetime support for potential data logging.
…orage - Added `TelemetryWindow` class for displaying telemetry data. - Configured window properties (title, size, initialization). - Introduced data structures for telemetry storage: - Cell temperatures for `num_BMS_sensors` sensors. - SOC, wheel speed, throttle, and brake data tracking. - Implemented timers for real-time plot updates every 50ms.
- Added `initUI()` method to construct the telemetry dashboard layout. - Integrated real-time plots for: - Cell temperatures - Wheel speed - Battery SOC (State of Charge) - Throttle and brake percentages - Implemented dials for throttle and brake display. - Added speed display and fault indicator status. - Included Reset and Export buttons for data control. - Created helper methods for plot creation and organization. - Initialized data curves for real-time plotting.
- Added `updateTelemetry()` method to process incoming telemetry data. - Updates time tracking with effective timestamps. - Stores and updates key telemetry values: - Cell temperatures - State of Charge (SOC) - Wheel speed - Throttle and brake percentages - Speed numeric display - Fault status indicator - Dynamically changes UI fault status color based on fault conditions.
- Added `updatePlots()` to update real-time graphs: - Cell temperatures with rolling averages. - Wheel speed with historical tracking. - Battery SOC with a full-timeline view. - Throttle and brake values with averages in a 60-second window. - Integrated `updateElapsedTime()` to track and display elapsed time. - Ensured dynamic range adjustments to keep recent data visible. - Implemented statistical averaging for each telemetry metric.
- Added `resetData()` to clear and restart telemetry tracking. - Resets time offset to maintain continuity in timestamps. - Clears all telemetry data storage arrays: - Cell temperatures - SOC, wheel speed, throttle, and brake data - Resets plot displays and reinitializes curves. - Ensures the telemetry session restarts with fresh data.
- Implemented `exportData()` to save telemetry data to a timestamped CSV file. - Captures key telemetry metrics, including: - Time - BMS Cell Temperatures - State of Charge (SOC) - Wheel Speed - Throttle and Brake Percentages - Ensures missing data points are handled gracefully. - Prints confirmation message upon successful export.
- Added `lowBattery.wav` sound file to `assets/` for audio alerts. - Integrated `QSoundEffect` to play a warning beep when battery SOC drops below 10%. - Implemented a warning light: - Displays an orange "Battery Low!" message when SOC < 10%. - Automatically hides the warning when SOC recovers above 10%. - Ensures real-time alerts in `updateTelemetry()` for low SOC detection.
- Implemented `DemoDataThread`: - Generates simulated telemetry data with sine/cosine patterns. - Includes throttle, brake, cell temperatures, SOC, wheel speed, speed, and random fault generation. - Runs continuously, emitting telemetry updates every 5ms. - Added a `--demo` command-line flag in `main.py` to enable simulated telemetry mode. - Ensures smooth integration by connecting the demo data generator to the telemetry UI. - Allows resetting SOC value to 100% for repeatable test sessions.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR: Initial Implementation of Q25FSAE Telemetry System
Overview
This PR introduces the initial implementation of the Q25FSAE telemetry system, designed to provide live telemetry data visualization for the race car during testing. The system is currently in a demonstration phase, relying on simulated telemetry data for testing and development.
Features Added
Core Components:
gui.py: Implements the PyQt5-based graphical user interface (GUI) for real-time telemetry monitoring.main.py: Serves as the entry point of the application, initializing the GUI and handling demo data integration.demo_data.py: Generates simulated telemetry data to test the system’s real-time capabilities.GUI Features:
Data Handling:
DemoDataThreadto generate and emit synthetic telemetry data.updateTelemetry()to process real-time updates in the GUI.updatePlots()to dynamically update graphs and statistics.resetData()to clear and restart telemetry tracking.exportData()for saving telemetry logs as CSV files.How to Run
pipenv install.pipenv shell.Future Improvements
2. Performance Enhancements