Files
updated-radar/additions

229 lines
11 KiB
Plaintext

==================================================================
ADDITION: BOAT RADAR — BELLINGHAM POLICE PATROL BOAT
==================================================================
I want to add a radar scope showing the view from a marine radar
mounted on a Bellingham Police Department patrol boat. The boat
is on a continuous back-and-forth patrol of the working waterfront.
PATROL ROUTE:
Police boats do patrol inside Squalicum Marina (theft, vandalism,
welfare checks) and inside Whatcom Waterway (commercial port
security). They do not rely on seeing over the breakwater --
the concrete breakwater shadows the inner basin.
Speed varies by zone:
Open waterfront: 10 knots
Whatcom Waterway: 3-5 knots (narrow, industrial)
Inside marina: 3-4 knots (displacement speed, no wake)
Proposed full route (continuous, reversing at each end):
Whatcom Waterway entrance
-> slow to 4 knots, transit Whatcom Waterway
-> exit to bay, accelerate to 10 knots
-> Squalicum Marina outer breakwater entrance
-> slow to 3-4 knots, tour inner marina basin
-> exit marina, accelerate to 10 knots
-> west along waterfront
-> Boulevard Park
-> Taylor Dock
-> Community Boating Center
-> reverse and repeat
INSIDE MARINA -- RADAR CLUTTER NOTE:
At 2-3 m antenna height inside a marina full of sailboat masts,
the radar picture will be heavily cluttered with mast returns,
appearing as a dense ring around the boat. This is realistic and
is a good exhibit teaching moment -- visitors can use the sea/wave
clutter filter (already designed) to try to suppress it. The boat
radar's wide beamwidth (4-6 deg) makes the clutter worse than the
big coastal radar would show.
PATROL SPEED:
Approximately 10 knots.
10 knots is reasonable -- typical working-waterfront patrol speed
is 8-12 knots, fast enough to respond quickly but slow enough to
observe traffic and avoid wake damage near the docks.
WHAT THIS MEANS FOR THE DISPLAY:
Unlike all the other radars in this exhibit, the radar origin is
not fixed. It moves with the boat along the patrol route. The
radar antenna is on the boat, so the PPI scope center tracks the
boat's position.
The boat also changes heading as it follows the shoreline, which
means the bearing offset (already implemented as the k/j keys on
the marine PPI) will be continuously updated by the simulator as
the boat turns -- the operator does not manually drive the boat.
The boat's heading at any point along the route determines the
antenna offset so that True North stays at the top of the scope.
SIMULATOR ARCHITECTURE:
The patrol boat position is the radar PLATFORM, not a target.
It should be managed by the existing Simulator (Thread 4) as a
special PatrolPlatform object alongside the target list -- NOT a
separate simulator thread, and NOT built into the scope/rendering
code (Thread 1).
The TrafficCop (Thread 2) already polls the Simulator each sweep.
It will also retrieve the current platform lat/lon and heading at
the same poll and write them to SharedRenderState under Mutex A.
Thread 1 reads platform position and heading to set the PPI scope
center point and bearing offset before rendering each frame.
The patrol route is a sequence of lat/lon waypoints with speed
per segment. The Simulator interpolates position between waypoints
using elapsed time and the segment speed.
DECISIONS:
1. SCOPE CLASS: New BoatPPIScope, a subclass of PPIScope directly
(not a subclass of MarinePPIScope). Same controls as MarinePPIScope.
Moving origin is specific to this class.
2. WAYPOINTS: JSON data file, e.g. data/patrol_route.json.
Loaded at startup by the Simulator. Each entry has lat/lon and
speed for that segment. settings.h stays as tunable constants only.
3. LEFT PANEL: Both -- a plain text zone description (e.g.
"Currently: Open waterfront, heading west") AND a numeric
lat/lon readout below it. Visitor-friendly text plus precise data.
4. SIMULATED SMALL TARGETS: Both scripted and random.
- Scripted: a paddleboarder drifts slowly across the ferry lane
on a fixed loop (dramatic, repeatable, good for exhibit)
- Random: additional kayakers/small boats wander within a defined
zone near the ferry terminal and harbor mouth
- These small targets also appear on the fixed MARINE PPI scope
(same Bellingham Bay coverage area, same target pipeline)
5. SCOPE ORDER: Boat PPI goes immediately after Marine PPI.
New sequence: Intro -> Marine A -> Chain Home A -> Marine PPI
-> Boat PPI -> ATC PPI -> PAR -> (back to Intro)
6. MARINA AND WHATCOM WATERWAY: Deferred. The patrol route for v1
stays in open water only. The boat does NOT enter Squalicum Marina
or Whatcom Waterway in the first implementation. Those can be
added in a later version once the shoreline geometry problem
is solved (see LIDAR/CHART NOTE below).
LIDAR AND SHORELINE GEOMETRY NOTE:
The marina, breakwater, Whatcom Waterway, and Georgia Pacific site
all require accurate geometry to simulate correctly -- both as radar
return sources and as shadow-casters.
TWO DATA SOURCES:
1. NOAA Electronic Navigational Chart 18424 (Bellingham Bay)
Free vector download from charts.noaa.gov (ENC format).
Already clean vector polygons: breakwater, piers, channel edges,
ferry terminal, dock outlines. Best starting point -- no point
cloud processing required.
2. Washington State LIDAR Portal (lidarportal.dnr.wa.gov)
Free LIDAR point cloud downloads for Whatcom County.
0.5-1 meter horizontal resolution. Captures individual pilings,
building edges, breakwater detail, Georgia Pacific site remnants.
Use this when finer detail is needed (inside marina, Whatcom
Waterway structures). Requires offline processing to extract
obstruction polygons before use in the simulation.
GEORGIA PACIFIC SITE:
Most of the old GP pulp mill has been demolished. The area is
now the Bellingham Waterfront District (partially built). LIDAR
or ENC data will show whatever was on-site at survey time. For
the exhibit this is acceptable -- it is a patrol scenario,
not a live chart.
HOW GEOMETRY FEEDS INTO THE SIMULATION:
Shoreline and obstruction data is processed ONCE offline into
a set of vector polygons representing hard radar-reflective
features. These are loaded at Thread 1 startup as a static VBO.
Read-only after load -- no mutex required (already noted in
the design). The radar sweep computes returns from these
polygons the same way it handles vessel targets.
RADAR SHADOW ZONES:
The breakwater does not just produce a return -- it shadows
everything behind it. To simulate this correctly, the sweep
must raycast from the current radar position, find the first
intersection with each obstruction polygon, and mark everything
beyond that intersection as shadowed (no return). This is a
per-sweep raycast operation, implementable CPU-side each sweep
or in a compute shader. Shadow simulation is required even for
the v1 open-water-only route, because the breakwater shadow
is clearly visible from outside.
V1 GEOMETRY SCOPE (open water only -- marina deferred):
Only these features are needed for the first version:
- Outer shoreline of Bellingham Bay (simple polygon)
- Squalicum Harbor breakwater (solid obstruction, shadow-caster)
- Ferry terminal structure
- Taylor Dock pier outline (weak return -- wood, but pilings show)
- Boulevard Park shoreline
NOAA ENC 18424 provides all of these in vector form.
Internal marina dock fingers and Whatcom Waterway structures
are deferred until the boat patrol route enters those areas.
4. The radar hardware spec for the boat radar is DIFFERENT from
the fixed coastal marine radar. Typical police/patrol boat radar:
Frequency: 9.3 - 9.5 GHz (X-band, same band, slightly
different frequency -- treat as same for exhibit)
Peak power: 2 kW to 4 kW (NOT the 30 kW of the fixed
coastal radar -- this is a small-vessel unit)
Antenna type: Radome (enclosed dome, ~60 cm diameter) --
more rugged and lower wind resistance than
an open array, typical for patrol boats
Horizontal beamwidth: 4 to 6 degrees (vs 0.5 deg for the big
coastal radar -- targets will appear as
noticeably fatter blips; good exhibit contrast)
Antenna height: 2 to 3 meters above waterline (radar arch
or short mast on a 25-35 foot patrol vessel)
RADAR HORIZON at 2.5 m antenna height:
horizon = 2.23 x sqrt(2.5) = approx 3.5 nautical miles
(~4 statute miles) to a sea-level target.
Compare: fixed coastal radar at 15 m sees ~8.6 nautical miles.
MAX RANGE DECISION: 2 miles maximum.
The patrol boat's job is close-in situational awareness, not
long-range surveillance (the fixed coastal radar handles that).
2 miles puts the entire inner harbor on screen at once.
RANGE STEPS: 0.5 / 1 / 2 miles.
Tighter steps than the fixed marine scopes (2/4/6) because the
officer needs a close-in zoom for marina and waterway work:
0.5 mi -- tight quarters, marina basin, Whatcom Waterway
1.0 mi -- inner harbor, near-shore patrol
2.0 mi -- full harbor picture, ferry lane monitoring
SMALL TARGET DETECTION NOTE (important for exhibit realism):
A paddleboard or kayak is a marginal radar target at any range.
Very small RCS, almost no freeboard. At 2-4 kW with 4-6 degree
beamwidth, a paddleboarder may show as a faint intermittent blip
or may wash into the noise floor entirely -- especially in chop.
A kayak carrying a small aluminum radar reflector shows much
better. This is realistic and worth simulating: the exhibit
shows visitors that radar does not see everything, and that
small non-metallic targets are genuinely hard to detect.
FERRY LANE SCENARIO:
The Bellingham terminal serves the Alaska Marine Highway System
(state ferries up to 400 feet). A paddleboarder or kayaker
drifting into the departure lane is a real hazard the patrol
officer watches for. Simulated small targets (paddleboards,
kayaks) near the ferry lane would make a compelling exhibit
moment -- visitor tries to spot them on the radar before the
ferry moves.
5. Should the left panel description explain that this is a moving
platform, and show the current boat position (lat/lon or a
simple text description of where on the route the boat is)?
6. I do not care about the size or material of the police boat
itself since it is the platform the radar is mounted on, not
a target.