Fix max range, range cursor, and stc range control readouts
This commit is contained in:
@@ -86,47 +86,85 @@
|
||||
* Component: Chain Home scope (1940s, World War 2)
|
||||
* ============================================================ */
|
||||
|
||||
// Fixed maximum range in km; the max_range control has no effect for this scope
|
||||
#define CHAIN_HOME_MAX_RANGE_KM 200.0f
|
||||
// Fixed maximum range in nautical miles; the o/p range control has no effect for this scope
|
||||
#define CHAIN_HOME_MAX_RANGE_NM 200.0f
|
||||
|
||||
/* ============================================================
|
||||
* MARINE A-SCOPE
|
||||
* Component: 1940s marine A-scope (pre-PPI)
|
||||
* ============================================================ */
|
||||
|
||||
// Selectable maximum range steps in nautical miles (o/p keys cycle through these)
|
||||
#define MARINE_A_SCOPE_NUM_RANGES 4
|
||||
// Selectable maximum range steps in nautical miles (o/p keys step through these)
|
||||
#define MARINE_A_SCOPE_NUM_RANGES 4
|
||||
#define MARINE_A_SCOPE_RANGE_STEP_1 3.0f
|
||||
#define MARINE_A_SCOPE_RANGE_STEP_2 6.0f
|
||||
#define MARINE_A_SCOPE_RANGE_STEP_3 12.0f
|
||||
#define MARINE_A_SCOPE_RANGE_STEP_4 24.0f
|
||||
|
||||
// Pip spacing on the A-scope sweep (nm between range pips), one value per range step
|
||||
#define MARINE_A_SCOPE_PIP_STEP_1 0.5f /* 3 nm range — pip every 0.5 nm */
|
||||
#define MARINE_A_SCOPE_PIP_STEP_2 1.0f /* 6 nm range — pip every 1.0 nm */
|
||||
#define MARINE_A_SCOPE_PIP_STEP_3 2.0f /* 12 nm range — pip every 2.0 nm */
|
||||
#define MARINE_A_SCOPE_PIP_STEP_4 4.0f /* 24 nm range — pip every 4.0 nm */
|
||||
|
||||
/* ============================================================
|
||||
* PPI SCOPE - MARINE TRAFFIC CONTROL
|
||||
* Component: PPI scope, marine traffic control station
|
||||
* ============================================================ */
|
||||
|
||||
// Selectable maximum range steps in nautical miles
|
||||
#define PPI_MTC_NUM_RANGES 5
|
||||
#define PPI_MTC_NUM_RANGES 5
|
||||
#define PPI_MTC_RANGE_STEP_1 3.0f
|
||||
#define PPI_MTC_RANGE_STEP_2 6.0f
|
||||
#define PPI_MTC_RANGE_STEP_3 12.0f
|
||||
#define PPI_MTC_RANGE_STEP_4 24.0f
|
||||
#define PPI_MTC_RANGE_STEP_5 48.0f
|
||||
|
||||
/*
|
||||
* Range ring positions (nm from centre) per range step.
|
||||
* Two rings per step, placed at 1/3 and 2/3 of the maximum range.
|
||||
* No ring at the maximum range itself — that is the scope edge / graticule boundary.
|
||||
*/
|
||||
#define PPI_MTC_RING1_STEP_1 1.0f /* 3 nm — inner ring */
|
||||
#define PPI_MTC_RING2_STEP_1 2.0f /* 3 nm — outer ring */
|
||||
#define PPI_MTC_RING1_STEP_2 2.0f /* 6 nm */
|
||||
#define PPI_MTC_RING2_STEP_2 4.0f
|
||||
#define PPI_MTC_RING1_STEP_3 4.0f /* 12 nm */
|
||||
#define PPI_MTC_RING2_STEP_3 8.0f
|
||||
#define PPI_MTC_RING1_STEP_4 8.0f /* 24 nm */
|
||||
#define PPI_MTC_RING2_STEP_4 16.0f
|
||||
#define PPI_MTC_RING1_STEP_5 16.0f /* 48 nm */
|
||||
#define PPI_MTC_RING2_STEP_5 32.0f
|
||||
|
||||
/* ============================================================
|
||||
* PPI SCOPE - ON-BOARD BOAT
|
||||
* Component: PPI scope, on-board boat view
|
||||
* ============================================================ */
|
||||
|
||||
// Selectable maximum range steps in nautical miles
|
||||
#define PPI_BOAT_NUM_RANGES 5
|
||||
#define PPI_BOAT_NUM_RANGES 5
|
||||
#define PPI_BOAT_RANGE_STEP_1 1.5f
|
||||
#define PPI_BOAT_RANGE_STEP_2 3.0f
|
||||
#define PPI_BOAT_RANGE_STEP_3 6.0f
|
||||
#define PPI_BOAT_RANGE_STEP_4 12.0f
|
||||
#define PPI_BOAT_RANGE_STEP_5 24.0f
|
||||
|
||||
/*
|
||||
* Range ring positions (nm from centre) per range step.
|
||||
* Two rings per step, placed at 1/3 and 2/3 of the maximum range.
|
||||
* No ring at the maximum range itself — that is the scope edge / graticule boundary.
|
||||
*/
|
||||
#define PPI_BOAT_RING1_STEP_1 0.5f /* 1.5 nm — inner ring */
|
||||
#define PPI_BOAT_RING2_STEP_1 1.0f /* 1.5 nm — outer ring */
|
||||
#define PPI_BOAT_RING1_STEP_2 1.0f /* 3 nm */
|
||||
#define PPI_BOAT_RING2_STEP_2 2.0f
|
||||
#define PPI_BOAT_RING1_STEP_3 2.0f /* 6 nm */
|
||||
#define PPI_BOAT_RING2_STEP_3 4.0f
|
||||
#define PPI_BOAT_RING1_STEP_4 4.0f /* 12 nm */
|
||||
#define PPI_BOAT_RING2_STEP_4 8.0f
|
||||
#define PPI_BOAT_RING1_STEP_5 8.0f /* 24 nm */
|
||||
#define PPI_BOAT_RING2_STEP_5 16.0f
|
||||
|
||||
/* ============================================================
|
||||
* WINDOW AND PANEL LAYOUT
|
||||
* Component: Thread 1 (main.cpp), 01_classes, 02_text_description
|
||||
@@ -198,7 +236,7 @@
|
||||
#define BEARING_CURSOR_STEP 1.0f
|
||||
#define RANGE_CURSOR_STEP 0.02f
|
||||
#define MARINE_A_BEARING_STEP 1.0f
|
||||
#define MAX_RANGE_STEP 0.1f
|
||||
// Max range is now step-indexed (see MARINE_A_SCOPE_*, PPI_MTC_*, PPI_BOAT_* tables above)
|
||||
|
||||
/* ============================================================
|
||||
* KEYBOARD CONTROL LIMITS
|
||||
@@ -217,5 +255,4 @@
|
||||
#define NOISE_FILTER_MAX 1.0f
|
||||
#define RANGE_CURSOR_MIN 0.0f
|
||||
#define RANGE_CURSOR_MAX 1.0f
|
||||
#define MAX_RANGE_MIN 0.1f
|
||||
#define MAX_RANGE_MAX 1.0f
|
||||
// Max range limits removed — range is now step-indexed, clamped by table size
|
||||
|
||||
Reference in New Issue
Block a user