Start on target handling procecures

This commit is contained in:
2026-05-26 11:01:32 -07:00
parent 5900e10807
commit ba25ed4248

View File

@@ -144,11 +144,20 @@ struct target_data_to_shader_structure {
float target_y; // Pre-converted local Cartesian offset Y (meters relative to radar) float target_y; // Pre-converted local Cartesian offset Y (meters relative to radar)
float length; // Vessel length bounds (meters) float length; // Vessel length bounds (meters)
float beam; // Vessel beam bounds (meters) float beam; // Vessel beam bounds (meters)
float height; // height of vessel (important for radar equation)
float course; // Course over ground vector (radians relative to True North) float course; // Course over ground vector (radians relative to True North)
float altitude; // Target altitude profile (meters) float altitude; // Target altitude profile (meters)
time_t timestamp; // Data aging tracking identifier time_t timestamp; // Data aging tracking identifier
enum material; // Target material (metal, wood, etc)
binary police_boat // this indicates that the target is for the roaming police boat.
}; };
Here is the enumeration for the target material (this is important for the radar equation)
1. Metal
2. Wood
3. Fiberglass
The segment handling asynchronous target ingestion is called traffic_cop. The segment handling asynchronous target ingestion is called traffic_cop.
The traffic_cop runs on a dedicated background execution thread separate from the rendering loop. The traffic_cop runs on a dedicated background execution thread separate from the rendering loop.
Data synchronization between threads must be managed explicitly using std::mutex blocks. Data synchronization between threads must be managed explicitly using std::mutex blocks.
@@ -985,6 +994,68 @@ PPI Radar Equiation
============================================================= =============================================================
RADAR DATA HANDLING AND PROCAESSING
PLease note that this final topic covers several pieces, including
the postgres database table data, the complete operation of the Traff Cop software,
and the operation of the Simulator.
Please also not that this will not inlude the software to handle target being received
from the AIS and ADS(b) data, which will be received on AirSpy software defined radios
and formatted by raspberry pi's. This will not be used for the initial demonstarion
of this project. We will leave these out for now, and judging from the size of this
current CLAUDE.md file; that may be a separate as yet non existant CLAUDE.md file.
Here is the data items for the table in the Postgres database:
1. float length
2. float beam
3. float height
4. enum material
6. time_t timestamp
7. binary may_need_update (this if a randome value is applied to any part of the target
and that the user may want to update the database. This
will not force the user to do the update, a later
database editing program will use this.
8. int vessel_type (AIS type code or aircraft type)
9. uint32_t mmsi (unique identification for boat or ICAL for aircraft
10. binary police_boat (this indicates that this is for the police boat
Please also not that the handling for the police boat's cruising around Bellingham Bay
will also be part of the job of the simulator. This is achieved by having an indicator
in the target data, labeled police_boat, which is a binary value. True means that this
target is for the police boat. If the target is the police boat, the police boat radar
will not show the target as a target, but the direction and speed of the police boat
will be taken from the target information of the police boat. This means that the police
boat radar graticulel will be adjuste appropriately and that the location will need to be
used to update the ppi display so that the center of the display will reflect the location
indicated in the target data for this target. All other radars will treat this just as regular
target.
Now, first thing is discussion of the threads. There will be four threads:
Thread 1 = Operation of setting up the system; ie; initializeing Opengl,
compiling, building, and loading all of the shaders. It also handles
the keyboard operation of the radar controls as those are callbacks from
the OpenGL. Accepting target traffic from the Traffic Cop will be performed,
however, the Traffic Cop will need to assert a mutex in order to write any
target data to this Thread 1.
Thread 2 = Traffic Cop. The Traffic Cop will accept Target Data from the Simulator (which
will be discussed here) ; and the AIS and ADS(b) data from the raspberry pis. At
this time, we need to provide only a stub withing the traffic cop to access the Raspberry pis.
The traffic cop will need to set a mutes before handing radar traffic to the Thread 1 software
which will send the radar data on to the shaders. Note that the traffic cop needs to do
the following processing with target data:
1. Convert the GPS longitude information to the local coordinates for each radar.
2. Check and discard targets that are outside the range of the radar that is
currently being used.
3. Discard targets that I have not moved for 1 hour.
===============================================================
Sections still to be worked on: Sections still to be worked on:
Details of the Traffic Cop and the PostGres database. These Details of the Traffic Cop and the PostGres database. These