add additions to claude.md
This commit is contained in:
60
DESIGN.md
60
DESIGN.md
@@ -187,13 +187,25 @@ src/
|
||||
simulator.h / simulator.cpp
|
||||
knob_panel.h / knob_panel.cpp
|
||||
rpi_receiver.h / rpi_receiver.cpp
|
||||
db_panel.h / db_panel.cpp — Dear ImGui database management panel
|
||||
(active only when --database flag passed;
|
||||
no radar rendering in this mode)
|
||||
settings.h — all tunable constants (no .cpp needed)
|
||||
|
||||
imgui/ — Dear ImGui source, compiled into project
|
||||
imgui.h / imgui.cpp
|
||||
imgui_impl_glfw.h / imgui_impl_glfw.cpp
|
||||
imgui_impl_opengl3.h / imgui_impl_opengl3.cpp
|
||||
imgui_draw.cpp / imgui_tables.cpp / imgui_widgets.cpp
|
||||
|
||||
shaders/
|
||||
phosphor.vert / phosphor.frag — parameterized for P1 and P7 via uniforms
|
||||
graticule.vert / graticule.frag
|
||||
text.vert / text.frag
|
||||
sweep.vert / sweep.frag
|
||||
bloom.vert / bloom.frag — two-pass bloom: render to FBO, Gaussian
|
||||
blur bright spots, blend back; used for
|
||||
target blooming from radar equation output
|
||||
```
|
||||
|
||||
---
|
||||
@@ -342,3 +354,51 @@ No raw `new` or `delete` anywhere in the codebase. No `malloc`/`free`.
|
||||
are blocked during the animation. The new range value is latched when the
|
||||
key is pressed but not applied to the scope state until SLIDING_IN completes.
|
||||
Animation duration is approximately 0.5 seconds per slide (out and in).
|
||||
|
||||
12. **All dimensions are stored and computed in meters** throughout the system.
|
||||
Any incoming data from Raspberry Pi receivers or the simulator that arrives in
|
||||
feet (e.g., altitude from ADS-B in feet, antenna heights) is converted to
|
||||
meters at the boundary in `RPiReceiver::parseFrame()` or `Simulator::poll()`
|
||||
before the value enters any shared data structure. No feet values appear
|
||||
anywhere inside the system after the conversion point.
|
||||
Conversion: 1 foot = 0.3048 meters exactly.
|
||||
|
||||
13. **Default target dimensions** used when a target is first seen with no
|
||||
database record. All values in meters. `need_update` is set TRUE for all
|
||||
defaults so the operator knows to fill in real data.
|
||||
|
||||
| Category | Length (m) | Fuselage/Beam width (m) | Material |
|
||||
|---|---|---|---|
|
||||
| GA aircraft | 4.0 | 1.0 | aluminum |
|
||||
| Commercial a/c| 30.0 | 5.0 | aluminum |
|
||||
| AIS vessel | 20.0 | 5.0 | steel |
|
||||
| Simulator boat| 6.0 | 2.0 | fiberglass |
|
||||
|
||||
AIS-sourced vessels default to steel (legally required commercial traffic).
|
||||
Simulator-sourced boats default to fiberglass (small pleasure craft).
|
||||
Aircraft source type does not disambiguate GA vs. commercial — the system
|
||||
defaults to GA and lets the operator correct it.
|
||||
|
||||
14. **Bloom post-processing** uses a dedicated `bloom.vert` / `bloom.frag` shader
|
||||
pair. The pipeline is: render targets to an offscreen FBO at full computed
|
||||
brightness (from radar equation output), apply a two-pass Gaussian blur to
|
||||
pixels above a luminance threshold, then additively blend the blurred result
|
||||
back onto the main framebuffer. Bloom threshold and blur radius are
|
||||
`constexpr` constants in `settings.h`.
|
||||
|
||||
15. **Dear ImGui** is used for the database management panel, activated by the
|
||||
`--database` command-line flag. In that mode no radar rendering occurs —
|
||||
main.cpp skips the scope/shader initialization path entirely and starts the
|
||||
ImGui loop instead. ImGui source files live under `src/imgui/` and are
|
||||
compiled directly into the project (no separate install step). The panel
|
||||
provides: a scrollable target table with `need_update` highlighted, inline
|
||||
edit fields for length/width/height/material, a dropdown for target type,
|
||||
and a Save button that writes to PostgreSQL via libpq.
|
||||
|
||||
16. **Chain Home RCS resonance** is modelled with a multiplier constant
|
||||
`CHAIN_HOME_RCS_RESONANCE_FACTOR` in `settings.h`. At 30 MHz (λ ≈ 10 m),
|
||||
aircraft with wingspans of 10–30 m are in the Mie/resonant scattering
|
||||
region; RCS can be 2–5× the geometric cross section. The default value is
|
||||
3.0 (a mid-range estimate). This is applied in the radar equation computation
|
||||
for Chain Home targets only, before the result is passed to the bloom/
|
||||
brightness pipeline.
|
||||
|
||||
Reference in New Issue
Block a user