more updates
This commit is contained in:
82
CLAUDE.md
82
CLAUDE.md
@@ -36,7 +36,7 @@ Classes:
|
|||||||
1. Anything to do with sending anything to the display. Needs to be on the
|
1. Anything to do with sending anything to the display. Needs to be on the
|
||||||
same thread as the main function
|
same thread as the main function
|
||||||
|
|
||||||
2. Communications with outside sources; ais and ads-bl for targets
|
2. Communications with outside sources; ais and ads-b for targets
|
||||||
|
|
||||||
3. Operator controls
|
3. Operator controls
|
||||||
|
|
||||||
@@ -56,18 +56,27 @@ for the a scope. The ppi scope
|
|||||||
will be on the right side of the screen and the a scope will be on the left
|
will be on the right side of the screen and the a scope will be on the left
|
||||||
hand side of the screen.
|
hand side of the screen.
|
||||||
|
|
||||||
Suggest one window with viewports. Lets have window the entire screen. For develpment
|
Use one window with viewports covering the entire screen. For development,
|
||||||
I would need some sort of escape the esscape the full screen and go back to the
|
F11 toggles fullscreen, Escape exits the program entirely.
|
||||||
desktop.
|
|
||||||
|
|
||||||
Suggest that the radar itself is at the location of the Community Boating
|
The radar is fixed at the Community Boating Center dock in Bellingham,
|
||||||
Center dock in Bellingham, Washington, That should be 0,0 in local cartesian
|
Washington. That location is 0,0 in local Cartesian coordinates. North on
|
||||||
coordinates or 0 in range for vectoring. North on radar needs to be north in
|
the radar display is true north.
|
||||||
reality.
|
|
||||||
|
|
||||||
GPS for tagets should be converted to local cartesian reference to this
|
GPS coordinates from targets are converted to local Cartesian coordinates
|
||||||
location. I don't know if I have to be concerned with vector data. Please
|
referenced to this origin using a flat-earth equirectangular projection,
|
||||||
comment.
|
which is accurate enough for harbor radar ranges (0-24 nautical miles):
|
||||||
|
|
||||||
|
x = (lon - origin_lon) * cos(origin_lat) * R
|
||||||
|
y = (lat - origin_lat) * R
|
||||||
|
|
||||||
|
Where R is Earth's radius (6,371,000 m). Result is in meters from the origin.
|
||||||
|
No need to be concerned with spherical or vector geometry at these ranges.
|
||||||
|
|
||||||
|
Coordinate conversion belongs in the main application, not in the Raspberry Pi
|
||||||
|
communication class. The RPi class delivers raw lat/lon; the main app converts
|
||||||
|
to local Cartesian. This keeps the RPi code simple and means a change to the
|
||||||
|
radar origin only requires changing one place.
|
||||||
|
|
||||||
Notes for controls the user can play with
|
Notes for controls the user can play with
|
||||||
|
|
||||||
@@ -110,7 +119,7 @@ for how many pulses received and in what direction. That would be permanent.
|
|||||||
Temporary code necessary for changing control selection and value via the
|
Temporary code necessary for changing control selection and value via the
|
||||||
keyboard until I get the necessary hardware for the controls.
|
keyboard until I get the necessary hardware for the controls.
|
||||||
|
|
||||||
Also please note that thill will need to be flexible as encoders can
|
Also please note that this will need to be flexible as encoders can
|
||||||
be expensive, especially robust ones that kids cannot break.
|
be expensive, especially robust ones that kids cannot break.
|
||||||
|
|
||||||
Shaders:
|
Shaders:
|
||||||
@@ -172,11 +181,13 @@ The PPI display will need shaders for the following:
|
|||||||
4. facility to include shore lines. This will change with range settings. If possible, can
|
4. facility to include shore lines. This will change with range settings. If possible, can
|
||||||
we include docks and tall buildings? Immediate is blue white same as targets.
|
we include docks and tall buildings? Immediate is blue white same as targets.
|
||||||
|
|
||||||
5. Persistance (green yellow) for targets, clutter, and shore lines. Persistance should
|
5. Persistence (green yellow) for targets, clutter, and shore lines. Persistence uses
|
||||||
be ping pong. Lets suggest for persistance to be about 3 seconds.
|
ping-pong framebuffers with a decay multiplier each frame. Target persistence is
|
||||||
|
approximately 3 seconds, matching the P7 phosphor decay to 10% brightness.
|
||||||
|
|
||||||
6. The pulse repitition time should be the same as a multiple of the screen update rate
|
6. The pulse repetition frequency (PRF) is a simulation parameter. At 24 RPM antenna
|
||||||
so that we would have no aliasing.
|
rotation, one full sweep takes 2.5 seconds and produces ~150 frames at 60 fps —
|
||||||
|
smooth with no aliasing concern.
|
||||||
|
|
||||||
Communication:
|
Communication:
|
||||||
|
|
||||||
@@ -188,33 +199,30 @@ ports. AIS requires a separate Raspberry Pi with its own SDR tuned to VHF 161/16
|
|||||||
|
|
||||||
Each Raspberry Pi will act as a server fielding requests from this program.
|
Each Raspberry Pi will act as a server fielding requests from this program.
|
||||||
|
|
||||||
Lets try to have each raspberry pi as a separate instantiation of a class
|
Each Raspberry Pi is a separate instantiation of a class called RemoteTargetSource.
|
||||||
called raspberry pi. Those classes will use a common data structure:
|
Those classes will use a common target data structure:
|
||||||
|
|
||||||
1. double longitude
|
1. double longitude
|
||||||
2. double latitude
|
2. double latitude
|
||||||
3. std::string *vessel_name
|
3. std::string vessel_name
|
||||||
4. std::string *registration
|
4. std::string registration
|
||||||
5. float *vessel_size
|
5. float length_meters
|
||||||
6. float course
|
6. float beam_meters
|
||||||
7. float speed
|
7. int vessel_type (AIS type code; aircraft type for ADS-B/UAT)
|
||||||
8. time_t timestame
|
8. uint32_t mmsi (AIS unique identifier; ICAO hex address for aircraft)
|
||||||
9. float altitude (0 for boats)
|
9. float course (course over ground, degrees)
|
||||||
10. Target type
|
10. float speed (speed over ground, knots)
|
||||||
|
11. time_t timestamp (time of last fix; used to age out stale targets)
|
||||||
|
12. float altitude (meters; 0 for surface vessels)
|
||||||
|
13. TargetType type (enum: vessel, aircraft, etc.)
|
||||||
|
|
||||||
Looking for suggesions
|
The RPi communication thread blocks on a socket read until data arrives, then
|
||||||
|
writes to a shared target queue protected by a mutex and signals a condition
|
||||||
Each of these raspberry pis will called by a main function (running as its own thread)
|
variable. The main application consumes from that queue.
|
||||||
to gather this data structure if there are any targets received since the last
|
|
||||||
call.
|
|
||||||
|
|
||||||
The Raspberry Pi code will live in a separate git repository with its own CLAUDE.md
|
The Raspberry Pi code will live in a separate git repository with its own CLAUDE.md
|
||||||
and its own CMakeLists.txt, since it targets a different architecture (ARM) and has
|
and its own CMakeLists.txt, since it targets a different architecture (ARM) and has
|
||||||
a different toolchain and dependencies. Do not mix it into this repository hierarchy.
|
a different toolchain and dependencies. Do not mix it into this repository hierarchy.
|
||||||
The code will work on a blocking basis to block until something becomes available
|
|
||||||
|
|
||||||
It should be up to this piece to convert the global latitude and longitude to
|
Right now, I just want to make sure that the structure is okay and that the
|
||||||
cartesian coordinates for the display. Unless you suggest otherwise
|
CMakeLists.txt looks okay. I am not ready to ask you to create any code
|
||||||
|
|
||||||
Right now, I just want to make sure that the structure is okay and that the CMakeFile.txt
|
|
||||||
looks okay. I am not ready to ask you to create any code
|
|
||||||
|
|||||||
Reference in New Issue
Block a user