re arrange classes

This commit is contained in:
2026-06-15 10:32:16 -07:00
parent 0d95fac945
commit fe417fe743
3 changed files with 59 additions and 0 deletions

52
01_classes Normal file
View File

@@ -0,0 +1,52 @@
This components discusses the c++ classes suggested for this project.
The radar class
This pertains to the radars, including controls, shaders, target data, text description,
and status text.
This class shall consist of both a base class and subordinate classes for each radar.
The functions in this class shall be performed in thread 1 as they will directly
interact with the shaders and the keyboard, which are all in thread 1.
Examples of data and functions for this class and it subordinates:
1. Shaders - functions that can be called by the initialization function that will compile,
link, and load the shaders for each radar. The subordinates for each radar would have
the specific shaders that are used for that radar. If a shader is to be used by more than
one radar, that shader should be compiled, linked, and loaded by the base class before the
shader loading functions for each of the subordinate classes' shader loading functions.
Initially, I will have separate shaders for each radar to facilitate debugging and then
(maybe) later, work on combining them.
2. Left hand panel text. Functions that display the description for each radar on the left hand
panel. In addition, the control names and Keyboard Keys shall be displayed at the bottom
of the left hand panel. Please note that in the future, this left hand panel may be moved
to a second physical monitor.
3. Text status panel to be located below the radar scope panel. This will display the current
control settings for the controls and the range and bearing and description of
targets that are on or near the bearing and range cursor. The text status panel shall manage
the hit-test. The hit test shall determine which (if any) targets are either directly the same
rand and the same bearing as the cursor or close to it. The closeness shall be determined
by a configuration variable. Since the cursor information as well as the target information
is already in thread 1, this operatoin shall be performed by the CPU as the CPU will have
all information on the target, including the name and description.
4. Target data. This will handle the target data that is presented by both the simulator
and the raspberry pi data. All that data will be in the format of the
struct target_data_to_thread_1_structure. The expectation is that the target's local
cartesian offsets in meters relative to the radar. Note that this will be different
for each radar and will dynamically change based on the police boat's radar position.
I am expecting that the target data input functions may be common for all target data
will all be the same for all radars and could be handled by the base class.
Note that there will be a difference in handling the target data that is exclusive
for the police boat will be the police boat's location and heading. This affects the
radar display for the police boat. Perhaps I can suggest that the these three values
should be furnished as uniforms to the shaders for the police boat: 1. int police_boat;
1 is police boat and 0 is not, 2. flost police_location; in local coordinate space,
and 3. float police_boat heading.
5. Run. This should be handled by only as a base class. It is triggered every 30th of a
second to tell the shaders to execute.

View File

@@ -14,3 +14,7 @@ Note: if the operator invokes no parameters, then all the radars are to be made
When the application is started, it will be in a state where no radar is in use. The visitor When the application is started, it will be in a state where no radar is in use. The visitor
will use the selector to select a radar to operate. will use the selector to select a radar to operate.
======================================================================

View File

@@ -107,6 +107,9 @@ As a component is built and tested, I wil add a statement at the end of it's
Please note that each component shall have it's own c++ file; its own .h file; Please note that each component shall have it's own c++ file; its own .h file;
and it's own sets for shaders. Full independance. and it's own sets for shaders. Full independance.
The name of each component shall have a number, then an undeline, then the name
of the component, for example 01_classes, 02_management, 03_chain_Home, and so on.
================================================================== ==================================================================
TEMPORARY TESTING FILES TEMPORARY TESTING FILES