feat(gs-ai): add AI telemetry health explainer#30
Open
root3315 wants to merge 1 commit into
Open
Conversation
Add an optional AI assistant to the ground station that turns decoded subsystem telemetry into a plain-language operator status report. A deterministic rule-based engine (battery SOC, OBC temperature, ADCS pointing error, GNSS fix, error counts) is the default backend so the module runs fully offline and tests stay deterministic. An optional Google Gemini backend produces richer narrative when an API key is configured; any backend failure degrades gracefully to the rule-based text, so a missing key or network outage never breaks operations. Ships utils/ai_telemetry.py, a demo Streamlit page (12_ai_assistant), and 10 unit tests. Updates the pages smoke-test count to 12.
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
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.
What
Adds an optional AI assistant to the ground station that turns decoded subsystem telemetry into a plain-language operator status report.
Why
Operators currently read raw decoded fields (battery SOC, CPU temp, pointing error…) and judge health manually. This module produces an at-a-glance natural-language assessment and is a clean hook for an LLM-backed narrative — without making the ground station depend on a network service.
Design
nominal → advisory → warning → criticalseverity ladder. Runs fully offline, so tests are deterministic and CI needs no secrets.use_gemini=True+api_key) produces richer narrative text. The optionalgoogle-generativeaiimport is lazy and isolated.Changes
ground-station/utils/ai_telemetry.pyground-station/tests/test_ai_telemetry.pyground-station/pages/12_ai_assistant.pyground-station/tests/test_pages_smoke.pyground-station/requirements.txtgoogle-generativeaidocumented (commented)Gates
pytest— 118 passed, 1 skipped (10 new)black --line-length 79— cleanmypy --strict utils/ai_telemetry.py— cleanGenerated by Claude Code