complete land stuff
This commit is contained in:
83
CLAUDE.md
83
CLAUDE.md
@@ -720,7 +720,7 @@ PPI Radar Equiation
|
||||
latitude \(48^\circ 43' 25" \text{ N}\) and longitude \(122^\circ 34' 35" \text{ W}\)
|
||||
|
||||
PPI Police Boat ( starts as docked at the taylor street dock; but will be moving around
|
||||
48.735519° N latitude and -122.331931° W longitude.
|
||||
48.7253874° N latitude and -122.5077482° W longitude.
|
||||
|
||||
=====================================================================
|
||||
|
||||
@@ -783,6 +783,9 @@ 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:
|
||||
|
||||
@@ -803,6 +806,12 @@ PPI Radar Equiation
|
||||
area. It contains vector data for the shoreline, docks, piers,
|
||||
and water depths (bathymetry), as well as navigational aids.
|
||||
|
||||
Note that the US5WA45M.000 (ENC Chart) may not be needed at all. The
|
||||
n48_w123_1arc_v3.tif (DEM) and the LiDAR DEMs already define land vs. water
|
||||
by elevation — any cell above 0 meters is land and will return a radar echo.
|
||||
The ENC vector shoreline data would be redundant for this purpose.
|
||||
|
||||
|
||||
n48_w123_1arc_v3.tif (DEM): This is a USGS 1-arc-second Digital
|
||||
Elevation Model in GeoTIFF format. It provides a continuous grid of
|
||||
land elevation data for the area (roughly 30-meter resolution).
|
||||
@@ -832,8 +841,80 @@ PPI Radar Equiation
|
||||
coordinates $(u, v)$ represent latitude/longitude or local grid
|
||||
coordinates, and the pixel value represents the height above sea level.
|
||||
|
||||
Note that it may be better to do the conversion once and save the grid of 2d
|
||||
elevation data into a file. So, during the first invocation of the radar program,
|
||||
run the conversion once and put the final data into map/converted_data. If the file
|
||||
is already there, then do not perform the conversion.
|
||||
|
||||
The texture will need to be moved around for the police boat ppi radar, but it
|
||||
will be stationary for the vessel traffic control ppi radar.
|
||||
|
||||
Please note that we should have values defined in the settings.h file for the
|
||||
strengths of the DEM map information and the LiDAR information as well as the
|
||||
total strength of all of the shoreline information.
|
||||
|
||||
SETTINGS.H VALUES FOR LAND AND TERRAIN DATA
|
||||
|
||||
The following entries belong in settings.h so that terrain rendering behavior
|
||||
can be tuned or disabled without touching shader or pipeline code.
|
||||
|
||||
/* ------------------------------------------------------------------
|
||||
TERRAIN / LAND DATA — settings.h entries
|
||||
------------------------------------------------------------------ */
|
||||
|
||||
/* Master on/off switch for all terrain rendering.
|
||||
Set to 0 to suppress land echoes entirely; useful when you want to
|
||||
observe only live targets without any terrain clutter. */
|
||||
#define ENABLE_TERRAIN_RENDERING 1
|
||||
|
||||
/* Individual layer enable flags.
|
||||
Lets you isolate which elevation source is contributing echoes. */
|
||||
#define ENABLE_DEM_LAYER 1 // USGS 1-arc-second (~30 m) GeoTIFF
|
||||
#define ENABLE_LIDAR_LAYER 1 // High-res WA State LiDAR DEMs
|
||||
|
||||
/* Elevation threshold (meters) above which a cell is treated as land
|
||||
and returns a radar echo. 0.0 = sea level. Raise slightly (e.g.
|
||||
0.5) to suppress low-lying marshes that are technically above datum
|
||||
but unlikely to produce a real ship-hazard echo. */
|
||||
#define LAND_ELEVATION_THRESHOLD_M 0.0f
|
||||
|
||||
/* Echo amplitude scalars for each elevation source.
|
||||
These feed the fragment shader as uniforms so the DEM and LiDAR
|
||||
layers can be weighted independently.
|
||||
1.0 = nominal; raise to exaggerate; lower to soften. */
|
||||
#define DEM_ECHO_STRENGTH 1.0f
|
||||
#define LIDAR_ECHO_STRENGTH 1.2f // slightly stronger — LiDAR is more accurate
|
||||
|
||||
/* Overall terrain echo scale applied after the per-layer scalars.
|
||||
Acts as a master volume knob for all shoreline / land returns.
|
||||
Adjust this first before touching the per-layer values. */
|
||||
#define TERRAIN_ECHO_TOTAL_SCALE 1.0f
|
||||
|
||||
/* Raycasting step size (meters) used when marching each radar beam
|
||||
sample through the height-map texture. Smaller = more accurate
|
||||
shoreline but more GPU cost. 8.0 is a reasonable starting point
|
||||
for the ~30 m DEM; drop to 4.0 if LiDAR detail is being missed. */
|
||||
#define TERRAIN_RAY_STEP_M 8.0f
|
||||
|
||||
/* Maximum elevation (meters) used to normalize the GL_R32F texture
|
||||
values before they reach the shader. Should be >= the tallest
|
||||
terrain feature in the scene (Bellingham area peaks ~600 m). */
|
||||
#define TERRAIN_MAX_ELEVATION_M 700.0f
|
||||
|
||||
/* Height (meters) at which LiDAR data takes priority over the coarser
|
||||
USGS DEM when the two grids are composited during map/converted_data
|
||||
generation. Cells with LiDAR values >= this threshold replace the
|
||||
DEM value; cells below fall back to DEM. */
|
||||
#define LIDAR_PRIORITY_HEIGHT_M 0.5f
|
||||
|
||||
/* Debug: show only terrain echoes, suppress all moving targets.
|
||||
Set to 1 to isolate land-clutter rendering during development. */
|
||||
#define DEBUG_TERRAIN_ONLY 0
|
||||
|
||||
/* Debug: colour-code which elevation source is active for each pixel
|
||||
(blue = DEM only, green = LiDAR override). Set to 1 to visualise
|
||||
coverage boundaries when compositing the height-map. */
|
||||
#define DEBUG_SHOW_LIDAR_COVERAGE 0
|
||||
|
||||
|
||||
==================================
|
||||
|
||||
Reference in New Issue
Block a user