Remove more code
This commit is contained in:
150
CLAUDE.md
150
CLAUDE.md
@@ -631,53 +631,6 @@ Individual scope informations
|
|||||||
6 nm range
|
6 nm range
|
||||||
|
|
||||||
|
|
||||||
// Suggested Fragment Shader snippet for a single radar return
|
|
||||||
// Please note that this is for the frag shader for each of
|
|
||||||
// the ppi radars
|
|
||||||
uniform float user_gain; // 0.0 to 1.0
|
|
||||||
uniform float selected_range; // e.g., 6.0 Nautical Miles
|
|
||||||
|
|
||||||
// Target attributes passed in or looked up from a texture/buffer
|
|
||||||
struct RadarTarget {
|
|
||||||
float range; // Distance from radar center
|
|
||||||
float azimuth; // Angle in radians
|
|
||||||
float RCS; // Radar Cross Section
|
|
||||||
};
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
// Current fragment coordinates in Polar space
|
|
||||||
float frag_range = current_fragment_range();
|
|
||||||
float frag_azimuth = current_fragment_azimuth();
|
|
||||||
|
|
||||||
// 1. Calculate raw received power via Radar Equation
|
|
||||||
float R4 = pow(RadarTarget.range, 4.0);
|
|
||||||
float P_r = (Pt * G_squared * lambda_squared * RadarTarget.RCS) / (pow(4.0 * 3.14159, 3.0) * R4 * L);
|
|
||||||
|
|
||||||
// 2. Apply the 1960s Logarithmic IF Amplifier compression
|
|
||||||
float V_echo = log(1.0 + P_r * 1000.0);
|
|
||||||
float V_total = user_gain * V_echo;
|
|
||||||
|
|
||||||
// 3. Dynamic Blooming Coefficients
|
|
||||||
// As V_total exceeds 1.0 (saturation), expand the search/paint radius
|
|
||||||
float saturation = max(0.0, V_total - 1.0);
|
|
||||||
|
|
||||||
float dynamic_range_width = baseline_pulse_width + (0.05 * saturation);
|
|
||||||
float dynamic_azimuth_width = baseline_beamwidth + (0.02 * pow(saturation, 2.0));
|
|
||||||
|
|
||||||
// 4. Compute Distance from current fragment to the true target center
|
|
||||||
float d_range = abs(frag_range - RadarTarget.range);
|
|
||||||
float d_azimuth = abs(frag_azimuth - RadarTarget.azimuth);
|
|
||||||
|
|
||||||
// 5. Evaluate a Gaussian blur shape using the bloomed dimensions
|
|
||||||
float radial_paint = exp(-pow(d_range / dynamic_range_width, 2.0));
|
|
||||||
float azimuth_paint = exp(-pow(d_azimuth / dynamic_azimuth_width, 2.0));
|
|
||||||
|
|
||||||
float final_intensity = V_total * radial_paint * azimuth_paint;
|
|
||||||
|
|
||||||
// Clamp to CRT max brightness
|
|
||||||
gl_FragColor = vec4(final_intensity * phosphor_color, 1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------
|
||||||
|
|
||||||
=====================================================================================
|
=====================================================================================
|
||||||
@@ -780,103 +733,6 @@ End of discussion
|
|||||||
|
|
||||||
settings.h file suggestions:
|
settings.h file suggestions:
|
||||||
|
|
||||||
/*
|
The settings.h file needs to improve variables that the developer may need
|
||||||
* MIT License
|
to change for facilitate troubleshooting. Need ability to change amplifier gain,
|
||||||
* * Copyright (c) 2026 Mark Allyn
|
radar beam width, antenna, gain, and so on.
|
||||||
* * Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
* * The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
* * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
* * Author: Mark Allyn
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
/* =========================================================================
|
|
||||||
DEBUGGING AND SIMULATION SWITCHES
|
|
||||||
========================================================================= */
|
|
||||||
#define DEBUG_DISABLE_P7_PERSISTENCE 0 /* 1 = Bypass long persistence tracking for raw debugging */
|
|
||||||
#define DEBUG_DISABLE_TERRAIN 0 /* 1 = Hide landMASS rendering to isolate target processing */
|
|
||||||
#define GL_DEBUG_OUTPUT_ENABLED 1 /* 1 = Attach robust driver-level diagnostic callbacks */
|
|
||||||
|
|
||||||
/* =========================================================================
|
|
||||||
HISTORICAL COLOR PALETTES (HEX EMBEDDINGS)
|
|
||||||
========================================================================= */
|
|
||||||
/* A-Scope Graticule Backlights & Incandescent Pilot Bulbs */
|
|
||||||
#define HEX_COLOR_PILOT_LAMP 0xFFB347 /* #FFB347 - Warm Incandescent Glow */
|
|
||||||
|
|
||||||
/* A-Scope Mono-Phosphor Trace Colors */
|
|
||||||
#define HEX_COLOR_ASCOPE_EXCITATION 0x39FF14 /* #39FF14 - Vibrant Phosphor Flash */
|
|
||||||
#define HEX_COLOR_ASCOPE_AFTERGLOW 0x004400 /* #004400 - Darker Green Decay Base */
|
|
||||||
|
|
||||||
/* P7 Phosphor Color Pipeline States for PPI Radars */
|
|
||||||
#define HEX_COLOR_P7_EXCITATION 0xA0CFFF /* #A0CFFF - Bright Blue Active Beam Flash */
|
|
||||||
#define HEX_COLOR_P7_IMMEDIATE_BLUE 0x1010FF /* #1010FF - Post-Beam 1ms Decay Core */
|
|
||||||
#define HEX_COLOR_P7_SHORT_TERM_YG 0xE2FF80 /* #E2FF80 - Yellow Green 1s Persistent State */
|
|
||||||
#define HEX_COLOR_P7_LONG_TERM_AMBER 0xFFA040 /* #FFA040 - Amber 10s Deep Remembrance */
|
|
||||||
#define HEX_COLOR_P7_EXPIRATION 0x050700 /* #050700 - Near-Black Expiration Threshold */
|
|
||||||
|
|
||||||
/* GUI Core Color Specifications */
|
|
||||||
#define HEX_COLOR_TEXT_WHITE 0xFFFFFF
|
|
||||||
#define HEX_COLOR_TEXT_RED 0xFF0000
|
|
||||||
#define HEX_COLOR_TEXT_PINK 0xFFC0CB
|
|
||||||
#define HEX_COLOR_TEXT_YELLOW 0xFFFF00
|
|
||||||
|
|
||||||
/* =========================================================================
|
|
||||||
HARDWARE ENVIRONMENT MATRICES
|
|
||||||
========================================================================= */
|
|
||||||
namespace ChainHome {
|
|
||||||
const float PEAK_POWER = 500000.0f; /* 500 KW */
|
|
||||||
const float WAVELENGTH = 12.0f; /* 12 Meters */
|
|
||||||
const float ANTENNA_GAIN = 3.16f; /* 5 dB expressed as linear gain */
|
|
||||||
const float PULSE_WIDTH = 0.000020f; /* 20 microseconds */
|
|
||||||
const float BEAM_WIDTH = 150.0f; /* floodlight sector in degrees */
|
|
||||||
const float PRF = 25.0f; /* Pulse Repetition Frequency (Hz) */
|
|
||||||
const float MAX_RANGE_METERS = 321868.0f; /* Fixed 200 Miles */
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace MarineAScope {
|
|
||||||
const float PEAK_POWER = 500000.0f; /* 500 KW */
|
|
||||||
const float WAVELENGTH = 0.10f; /* 10 cm */
|
|
||||||
const float ANTENNA_GAIN = 1000.0f; /* 30 dB linear gain conversion */
|
|
||||||
const float PRF = 500.0f; /* 500 Hz pulse repetition */
|
|
||||||
const float HORIZONTAL_BEAMWIDTH = 2.5f; /* degrees */
|
|
||||||
const float SYSTEM_TEMPERATURE = 290.0f; /* Kelvins (Ts) */
|
|
||||||
const float NOISE_FIGURE = 20.0f; /* Early receiver noise figure in dB */
|
|
||||||
const float BOLTZMANN_CONSTANT = 1.38e-23f; /* (k) Joules/Kelvin */
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace MarineTrafficPPI {
|
|
||||||
const float PEAK_POWER = 25000.0f; /* 25.0 KW */
|
|
||||||
const float FREQUENCY_HZ = 9.375e9f; /* 9.375 GHz */
|
|
||||||
const float WAVELENGTH = 0.032f; /* 0.032 meters (3.2 cm X-Band) */
|
|
||||||
const float NOISE_FIGURE = 11.0f; /* 11 dB */
|
|
||||||
const float SYSTEM_LOSSES = 8.0f; /* 8 dB */
|
|
||||||
const float HORIZONTAL_BEAMWIDTH = 0.7f; /* 0.7 degrees razor-sharp */
|
|
||||||
const float PULSE_WIDTH = 0.1e-6f; /* 0.1 microseconds */
|
|
||||||
const float ANTENNA_RPM = 15.0f; /* 15 RPM mechanical rotation rate */
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace MarineBoatPPI {
|
|
||||||
const float PEAK_POWER = 15000.0f; /* 15.0 KW tactical marine */
|
|
||||||
const float FREQUENCY_HZ = 9.375e9f; /* 9.375 GHz */
|
|
||||||
const float WAVELENGTH = 0.032f; /* 0.032 meters (3.2 cm X-Band) */
|
|
||||||
const float NOISE_FIGURE = 11.0f; /* 11 dB */
|
|
||||||
const float SYSTEM_LOSSES = 8.0f; /* 8 dB */
|
|
||||||
const float HORIZONTAL_BEAMWIDTH = 1.2f; /* 1.2 degrees */
|
|
||||||
const float PULSE_WIDTH = 0.1e-6f; /* 0.1 microseconds */
|
|
||||||
const float ANTENNA_RPM = 25.0f; /* 25 RPM high-frequency sweep */
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user