diff --git a/CLAUDE.md b/CLAUDE.md index 3786fcb..02f0091 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -612,9 +612,6 @@ Individual scope informations brightness will no longer increase, but there will be a slight blooming of the target. - This is suggested example psudeo code for the target shader - for both the radar equation as well as the blooming - Note that values will change depending on the scope being used (traffic control or boat) ------------------------------------------------------------------- @@ -783,20 +780,90 @@ PPI Radar Equiation GROUND TERRAIN AND LIDAR DATA PROCESSING - Note: Do not do this for the Chain Home Radar. Theu user will heve enough - of a challenging dealing with the targets and noise alone. - Note that the following files already exist in the project directory in the following: map - map/lidar_raw - map/lidar_raw/wa2016_west_dem_J1364939.zip - map/lidar_raw/wa2022_nooksack_dem_J1364940.zip + map/lidar_processed map/charts_enc map/charts_enc/US5WA45M.000 map/charts_enc/n48_w123_1arc_v3.tif - + map/lidar_raw + map/lidar_raw/wa2022_nooksack_dem_J1364940.zip + map/lidar_raw/wa2016_west_dem_J1364939.zip + map/gebco_for_chain_home + map/gebco_for_chain_home/gebco_2026_n52.866_s46.397_w-3.93_e2.784_jpg_hs.jpg + + For Chain Home only: + + New file added - + map/gebco_for_chain_home/gebco_2026_n52.866_s46.397_w-3.93_e2.784_jpg_hs.jpg + + The file map/gebco_for_chain_home/gebco_2026_n52.866_s46.397_w-3.93_e2.784_jpg_hs.jpg + is a GEBCO hillshaded JPEG. The _hs suffix means "hillshade" — a directional-lighting + visual render of the terrain. It is NOT raw elevation data. Pixel color values cannot + be directly converted to meters above sea level. + + Bounding box (from filename): + North: 52.866 N + South: 46.397 N + West: -3.930 E (3.930 W) + East: 2.784 E + + RAF Ventnor (50.600 N, -1.183 E) maps to approximately pixel (659, 544) + in a 1611x1553 image (top-left origin, Y increases downward). + + UV coordinate formula for a given lat/lon in the shader: + u = (longitude - LON_W) / (LON_E - LON_W) + v = (LAT_N - latitude) / (LAT_N - LAT_S) // v=0 at top + + LAND vs. WATER DISCRIMINATION + Since this is a hillshade image without elevation values, land and water must be + distinguished by color hue in the fragment shader. Convert the RGB texture sample + to HSV and apply these thresholds: + Ocean (no echo): HSV hue approximately 170 to 220 degrees + Land (echo): HSV hue approximately 50 to 170 degrees + These are defined in settings.h as GEBCO_OCEAN_HUE_MIN_DEG and GEBCO_OCEAN_HUE_MAX_DEG + so they can be tuned without rewriting shader code. + + Because JPEG compression blurs color at coastline boundaries, apply a small + soft transition zone (GEBCO_COAST_BLEND_UV_WIDTH in settings.h) to avoid + a hard pixel-boundary artifact at the shoreline. + + COVERAGE NOTE + The 200nm range circle from Ventnor extends beyond the image to the north, east, + and west. Any radar sample point whose lat/lon falls outside the bounding box + should be treated as open ocean (zero land echo). The primary threat axis + (English Channel, French coast, Belgian coast) is fully within the image. + + ELEVATION LIMITATION + This file provides land/water masking only, not actual terrain height. All land + returns use a single fixed amplitude defined in settings.h as + CHAIN_HOME_LAND_ECHO_AMPLITUDE. There is no line-of-sight terrain shadowing + for Chain Home; the 150 degree floodlight beam and 12m wavelength make + fine terrain masking historically irrelevant for this simulation. + + OPTIONAL UPGRADE PATH + If higher fidelity is later needed, replace with the raw GEBCO NetCDF grid + (GEBCO_2024.nc, freely downloadable from gebco.net). That file provides actual + elevation in meters on a 15 arc-second grid and can be loaded as a GL_R32F + texture giving real line-of-sight capability. + + SETTINGS.H ENTRIES FOR CHAIN HOME TERRAIN + #define CHAIN_HOME_MAP_LAT_N 52.866f + #define CHAIN_HOME_MAP_LAT_S 46.397f + #define CHAIN_HOME_MAP_LON_W -3.930f + #define CHAIN_HOME_MAP_LON_E 2.784f + #define CHAIN_HOME_LAND_ECHO_AMPLITUDE 0.6f // fraction of max A-scope deflection + #define GEBCO_OCEAN_HUE_MIN_DEG 170.0f + #define GEBCO_OCEAN_HUE_MAX_DEG 220.0f + #define GEBCO_COAST_BLEND_UV_WIDTH 0.003f // ~1-2 pixels at this resolution + #define ENABLE_CHAIN_HOME_TERRAIN 1 // set 0 to suppress land clutter + + + + For all except for Chain Home: + This needs to be processed into a fragment shader via ray casting. Details on files: @@ -916,6 +983,17 @@ PPI Radar Equiation coverage boundaries when compositing the height-map. */ #define DEBUG_SHOW_LIDAR_COVERAGE 0 +============================================================= + +Sections still to be worked on: + +Details of the Traffic Cop and the PostGres database. These +two subjects are interrelated and will be discussed later + +Details on the simulator will be discussed later. + +Details on the relationship between the simulator and the movement of the +police boat will be discussed later. ================================== @@ -923,8 +1001,3 @@ End of discussion ================================== -settings.h file suggestions: - -The settings.h file needs to improve variables that the developer may need -to change for facilitate troubleshooting. Need ability to change amplifier gain, -radar beam width, antenna, gain, and so on. diff --git a/map/gebco_for_chain_home/gebco_2026_n52.866_s46.397_w-3.93_e2.784_jpg_hs.jpg b/map/gebco_for_chain_home/gebco_2026_n52.866_s46.397_w-3.93_e2.784_jpg_hs.jpg new file mode 100644 index 0000000..ca95703 Binary files /dev/null and b/map/gebco_for_chain_home/gebco_2026_n52.866_s46.397_w-3.93_e2.784_jpg_hs.jpg differ