Skip to content

Add generate-config CLI command for GNSS degradation config files#111

Merged
jbrodovsky merged 3 commits into
mainfrom
copilot/add-config-file-generator
Dec 1, 2025
Merged

Add generate-config CLI command for GNSS degradation config files#111
jbrodovsky merged 3 commits into
mainfrom
copilot/add-config-file-generator

Conversation

Copilot AI commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

Users need a way to create properly formatted GNSS degradation config files without manually constructing the schema. This adds a generate-config subcommand that outputs template configs in JSON, YAML, or TOML.

Changes

Core (core/src/messages.rs)

  • Added Default impl for GnssFaultModel (→ None) and GnssDegradationConfig (passthrough scheduler, no faults, seed=42)
  • Added #[serde(default)] annotations for partial config deserialization
  • Added roundtrip test for default config serialization

CLI (sim/src/main.rs)

  • Added generate-config subcommand with -o/--output path argument
  • Format auto-detected from file extension (.json/.yaml/.yml/.toml)
  • Refactored to use #[command(flatten)] for SimArgs composition
  • Fixed dead logic in validate_output_path

Usage

strapdown-sim generate-config -o config.yaml

Output:

scheduler:
  kind: pass_through
fault:
  kind: none
seed: 42

Use with simulations via --config:

strapdown-sim closed-loop -i data.csv -o out.csv --config config.yaml
Original prompt

This section details on the original issue you should resolve

<issue_title>Add option to generate config files via cli</issue_title>
<issue_description>We have functionality hooks for reading in input configurations in .json, .yaml, etc. but that doesn't necessarily mean the input is standardized in the correct format. I'd like a way to be able to walk the user through creating a config file by creating a blank template for them.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits December 1, 2025 17:02
Co-authored-by: jbrodovsky <57160841+jbrodovsky@users.noreply.github.com>
…put_path logic

Co-authored-by: jbrodovsky <57160841+jbrodovsky@users.noreply.github.com>
Copilot AI changed the title [WIP] Add option to generate config files via CLI Add generate-config CLI command for GNSS degradation config files Dec 1, 2025
Copilot AI requested a review from jbrodovsky December 1, 2025 17:13
@jbrodovsky
jbrodovsky marked this pull request as ready for review December 1, 2025 17:30
@jbrodovsky
jbrodovsky merged commit dc254f6 into main Dec 1, 2025
4 checks passed
@jbrodovsky
jbrodovsky deleted the copilot/add-config-file-generator branch December 1, 2025 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to generate config files via cli

2 participants