Added motion planel for raw/pitch/roll and acceleration. Consolidated all colors into one stylesheet in themes/palette.gd.

This commit is contained in:
RedNicStone committed 2026-11-07 21:31:14 +01:00
1 parent 948b177eee
commit f05a6148fb
13 files changed
+672

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
# Colors
Edit `themes/palette.gd`: base swatches define the hues; derived shades use `lightened()`, `darkened()`, and `lerp()`. `SOFT`, `HIGH_CONTRAST`, and `INSTRUMENT` map them to theme roles. Treat derived static values as read-only.
Regenerate after palette edits:
```sh
godot --headless --path . --script themes/build_theme.gd
```
Commit the generated themes and compass material alongside palette changes. The generator also updates the viewport background when needed.
Controls inherit the active theme. Custom graphics use `get_theme_color(role, "SurfaceSide")` for instrument roles and `get_theme_color("font_color", "Label")` for text. Prefer existing roles before adding new ones.
+20
View File
@@ -0,0 +1,20 @@
# Motion instrument
Instance `components/motion_panel.tscn`. Run `scenes/motion_demo.tscn` with F6 for simulated telemetry; pause the feed to preview stale status.
```gdscript
$MotionPanel.set_telemetry(
Vector3(roll_degrees, pitch_degrees, heading_degrees),
Vector3(momentum_x, momentum_y, momentum_z),
Vector3(accel_x, accel_y, accel_z)
)
```
- Orientation: positive roll right side down, positive pitch nose up, heading clockwise from north (0–360°).
- Body axes: X forward, Y right, Z down.
- Angular momentum: kg·m²/s, distinct from gyroscope angular velocity.
- Acceleration: m/s², with gravity removed upstream.
Missing values show dashes; non-finite samples are rejected. After `stale_after_seconds` (default 2), the banner marks held values STALE. `acceleration_full_scale` sets plot limits; numeric values remain unclamped.
Edit layout and Labels in the scene tree. Preserve scene-unique names used by `motion_panel.gd`. The four graphics use `motion_instrument.gd`; `radius_source` keeps the circles and Z scale aligned. Colors inherit the active theme; see [colors.md](colors.md).