Fixed minor errors in controls

This commit is contained in:
2026-04-02 00:11:26 -07:00
parent e88a95e7f9
commit 3c497924e1

View File

@@ -21,7 +21,7 @@ boating center in Bellingham, Washington.
Location is 48.72° N Latitude and -122.51° W Longitude Location is 48.72° N Latitude and -122.51° W Longitude
The proposed maximum range is 15 miles. The proposed maximum range is 15 miles.
Selectable ranges sould be 2, 5, 10, and 15 miles Selectable ranges should be 2, 5, 10, and 15 miles
The project will be implemented on on a Geekom A8 Max The project will be implemented on on a Geekom A8 Max
with AMD AI chip R9-8945HS with 32 GB ram with AMD AI chip R9-8945HS with 32 GB ram
@@ -62,7 +62,7 @@ Here is the directory structure with files already installed:
./src ./src
./src/CLAUDE.md ./src/CLAUDE.md
The followng classes would be needed: The following classes would be needed:
1. Operation of display; set up of display and any operation 1. Operation of display; set up of display and any operation
that feeds data to the display. This should be in the main that feeds data to the display. This should be in the main
@@ -71,21 +71,21 @@ The followng classes would be needed:
2. Operator controls. These feed to control data input to the 2. Operator controls. These feed to control data input to the
display class using appropriate mutexes. This would also display class using appropriate mutexes. This would also
include updating graticules sor changing range on the PPI include updating graticules for changing range on the PPI
scope and changing range and bearing for the a scope scope and changing range and bearing for the a scope
3. Radar targets from receivers AIS, ADS-B, and UAT 3. Radar targets from receivers AIS, ADS-B, and UAT
4. Simulated (fake) radar targets 4. Simulated (fake) radar targets
5. Any code needed to process topographical data for the shorline 5. Any code needed to process topographical data for the shoreline
Each of these can run as its own thread, but they all have to use Each of these can run as its own thread, but they all have to use
mutexes in order to send anything to the display. Perhaps they could mutexes in order to send anything to the display. Perhaps they could
be polled by a dispatcher that will tell each one its turn to send be polled by a dispatcher that will tell each one its turn to send
data to the display. data to the display.
The simulator will use ads-b and ais and uat received on airspy The simulator will use ads-b and ais and uat received on airspy
SDR radios communicating wiht Raspberry pi 4 single board computers SDR radios communicating with Raspberry pi 4 single board computers
running linux. running linux.
I plan to have a variety of phony targets simulated in addition to I plan to have a variety of phony targets simulated in addition to
@@ -98,15 +98,15 @@ Note that shoreline data is from noaa maps
Bellingham Bay and surrounding waters.) Bellingham Bay and surrounding waters.)
I prefer to have separate shader sets for each major function to facilitate I prefer to have separate shader sets for each major function to facilitate
troubleshootng troubleshooting
Major functions: Major functions:
1. A scope radar 1. A scope radar
2. A scope graticule operation 2. A scope graticule operation
3. PPI scope active targets 3. PPI scope active targets
4. PPI scope graticule Bearing marks 4. PPI scope graticule Bearing marks
5. PPI scope graticule range rings 5. PPI scope graticule range rings
6. PPI scope handling of the shorline using some sort of topographical map 6. PPI scope handling of the shoreline using some sort of topographical map
7. PPI scope persistance phosphor 7. PPI scope persistence phosphor
8. Rain scatter 8. Rain scatter
9. wave scatter 9. wave scatter
@@ -115,7 +115,7 @@ Display colors:
2. A Scope graticule is incandescent color 2. A Scope graticule is incandescent color
3. PPI scope active targets including scatters, graticule range rings, shoreline, 3. PPI scope active targets including scatters, graticule range rings, shoreline,
all p7 phosphor (active white blue) all p7 phosphor (active white blue)
4. All persistance (also p7 greenish yellow persistance) for PPI scope active targets including 4. All persistence (also p7 greenish yellow persistence) for PPI scope active targets including
scatters, graticule range rings, shoreline scatters, graticule range rings, shoreline
5. PPI scope bearing ring and ticks is incandescent color. 5. PPI scope bearing ring and ticks is incandescent color.
@@ -130,20 +130,20 @@ is 15 miles from the center.
Signal strength: Signal strength:
Need to have following fixed singnal strength: Need to have following fixed signal strength:
1. large ship would be bright and blooming 1. large ship would be bright and blooming
2. yachts would be bright but not blooming 2. yachts would be bright but not blooming
3. sailboats would be medium bright and not blooming 3. sailboats would be medium bright and not blooming
4. kayaks and roaboats would be small and dim 4. kayaks and rowboats would be small and dim
5. May consider fading small boats like kayaks 5. May consider fading small boats like kayaks
and sail bots above 3 miles and sailboats above 3 miles
Details of each feature: Details of each feature:
A scope: A scope:
1. Displays range, does not rotate. You must use control to set bearing. 1. Displays range, does not rotate. You must use control to set bearing.
Range is horizontal axis and strength of signal is verical axis. Range is horizontal axis and strength of signal is vertical axis.
Needs can use range the same way as ppi scope.
2. Graticule is tricky. In the day, the operator would have a stack of 2. Graticule is tricky. In the day, the operator would have a stack of
graticules for each range setting. To fake this out, We could have the graticules for each range setting. To fake this out, We could have the
@@ -152,7 +152,7 @@ A scope:
scope and inserts the replacement through the same slot. All these graticules scope and inserts the replacement through the same slot. All these graticules
are lighted with incandescent colors. are lighted with incandescent colors.
Note on screen update vs pulse repition frequency. We need to be careful Note on screen update vs pulse repetition frequency. We need to be careful
since we have no control of the display update frequency and need since we have no control of the display update frequency and need
to do whatever is needed to reduce aliasing or flickering to do whatever is needed to reduce aliasing or flickering
@@ -166,8 +166,8 @@ PPI Scope range rings
PPI Scope cursor (In the day, this was a moveable plastic PPI Scope cursor (In the day, this was a moveable plastic
overlay on scope, back lit by incandescent lamp. We need to overlay on scope, back lit by incandescent lamp. We need to
simulate this. Movement of this is viy the Range and Bearing controls simulate this. Movement of this is via the Range and Bearing controls
cursor consistes of flat line for range and box for bearing. cursor consists of flat line for range and box for bearing.
PPI Scope Bearing ticks and ring PPI Scope Bearing ticks and ring
@@ -187,8 +187,7 @@ Here are the controls that I am proposing
4. Range selection (for both a scope and ppi scope) 4. Range selection (for both a scope and ppi scope)
5. Sensitivity 5. Sensitivity
6. Sensitivity time control STC / sea clutter 6. Sensitivity time control STC / sea clutter
7. There is some sort of control having to do with the magnetron 7. removed (not needed)
but I don't know what its called and what it does.
8. Bearing (only for a scope) which in the old days uses a servo motor to 8. Bearing (only for a scope) which in the old days uses a servo motor to
rotate the antenna. I don't know what form of feedback (text on the rotate the antenna. I don't know what form of feedback (text on the
screen or mechanical numbers on a dial) screen or mechanical numbers on a dial)
@@ -196,23 +195,23 @@ Here are the controls that I am proposing
10. FTC / Rain Clutter 10. FTC / Rain Clutter
11. Will not need heading (this will be a fixed radar location for 11. Will not need heading (this will be a fixed radar location for
the harbor master or lifeguard the harbor master or lifeguard
12. Off-centering 12. Off-centering (two controls; one for each axis)
13. Graticule brilliance 13. Graticule brilliance
14. Reset (in case kids really mess things up) 14. Reset (in case kids really mess things up)
15. Pulse length selection (short pulse for better range resolution, 15. Pulse length selection (short pulse for better range resolution,
long pulse for better sensitivity at distance; operator selectable) long pulse for better sensitivity at distance; operator selectable)
16. Pulse repition frequency 16. Pulse repetition frequency
(Please suggest other controls I may have missed.) (Please suggest other controls I may have missed.)
Now, for controls, the tentative approach is to use encoders (that do not Now, for controls, the tentative approach is to use encoders (that do not
have end stops so they cannot be broken by visitors at the museum) I will have end stops so they cannot be broken by visitors at the museum) I will
need help on how to impliment them. I am guessing a few raspberry pies to need help on how to implement them. I am guessing a few Raspberry Pis to
handle the encoders. I am thinking of encoders have one common terminal and handle the encoders. I am thinking of encoders have one common terminal and
a clockwise pulse terminal and a counter clockwise pulse terminal. a clockwise pulse terminal and a counter clockwise pulse terminal.
Let do this like this. The control handling will be a different class and run Let's do this like this. The control handling will be a different class and run
as a separate thread from the display. Each control function will have a parameter as a separate thread from the display. Each control function will have a parameter
for how many pulses received and in what direction. That would be permanent. for how many pulses received and in what direction. That would be permanent.
@@ -232,8 +231,6 @@ TTF font file; render characters as textured quads in the shader.
Communication: Communication:
Communication:
All I know now is that I plan to use a combination of raspberry pi 4 and a Airspy All I know now is that I plan to use a combination of raspberry pi 4 and a Airspy
SDR for each of ais, ads-b, and uat. UAT (978 MHz) and ADS-B (1090 MHz) are different SDR for each of ais, ads-b, and uat. UAT (978 MHz) and ADS-B (1090 MHz) are different
frequencies and require separate SDRs, but a single Raspberry Pi 4 is powerful enough frequencies and require separate SDRs, but a single Raspberry Pi 4 is powerful enough
@@ -253,7 +250,7 @@ Those classes will use a common target data structure:
6. float beam_meters 6. float beam_meters
7. int vessel_type (AIS type code; aircraft type for ADS-B/UAT) 7. int vessel_type (AIS type code; aircraft type for ADS-B/UAT)
8. uint32_t mmsi (AIS unique identifier; ICAO hex address for aircraft) 8. uint32_t mmsi (AIS unique identifier; ICAO hex address for aircraft)
9. float course (course over ground, degrees) 9. float course (course over ground, degrees based on true north)
10. float speed (speed over ground, knots) 10. float speed (speed over ground, knots)
11. time_t timestamp (time of last fix; used to age out stale targets) 11. time_t timestamp (time of last fix; used to age out stale targets)
12. float altitude (meters; 0 for surface vessels) 12. float altitude (meters; 0 for surface vessels)
@@ -275,17 +272,17 @@ a different toolchain and dependencies. Do not mix it into this repository hiera
Order of testing features. Order of testing features.
1. Generational initialization and set up basic boundaries of the two scopes 1. General initialization and set up basic boundaries of the two scopes
on the screen. Now features on each scope yet. on the screen. No features on each scope yet.
2. Edge graticule on ppi scope (Bearing ticks and numbers) 2. Edge graticule on ppi scope (Bearing ticks and numbers)
3. Replaceable graticule on A Scope. Have it update for each different range 3. Replaceable graticule on A Scope. Have it update for each different range
and hold for 5 seconds for each range and hold for 5 seconds for each range
4. PPI scope range rings; both active display and persistance display - test 4. PPI scope range rings; both active display and persistance display - test
for each range settings; hold for 5 seconds each for each range settings; hold for 5 seconds each
5. PPI scope cursor - test by slowing changing range and bearing 5. PPI scope cursor - test by slowly changing range and bearing
6. PPI scope weather noise - test by changing noise level slowly 6. PPI scope weather noise - test by changing noise level slowly
7. PPI scope waves noise - test by changing noise level slowly 7. PPI scope waves noise - test by changing noise level slowly
8. PPI scope handling of shorline - test by running for a few seconds 8. PPI scope handling of shoreline - test by running for a few seconds
======================================================== ========================================================