Commit Graph

163 Commits

Author SHA1 Message Date
Peter Bochmann df11808d78
Aim the Mantas at 30 %: at 35 the sky was still too bright
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:59:50 +02:00
Peter Bochmann 7332c47d6d
Judge the keep rule against the camera's own target, and aim Mantas at 35 %
configureSettle() read the camera's auto-exposure target, tolerance and
limits before the camera was opened, so it got none of them and judged every
frame against its 50 +- 5 % default until the first profile switch - on
every tower. It now runs again once the camera is open. On the Alviums this
brings their own IntensityControllerTolerance and, at night, the at-limit
verdict from their chunk data into play.

The gige recipe aims at 35 % instead of 50: at 50 the sky over the horizon
burnt out at noon on rietschen, where smoke would rise. The old program ran
these cameras at 23-25. Tests 542/542 (mock).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:40:44 +02:00
Peter Bochmann c62d8270b3
Let a Manta aim at the frame mean the keep rule waits for
Rietschen's RGB camera came with ExposureAutoAlg = FitRange and a 10 %
tolerance. FitRange fits the histogram wherever the mean lands, and the
camera stopped adjusting 10 % off its target, so the keep rule's 50 +- 5 %
band was never reached: at a 3 s interval every waypoint ran into its 2 s
frame_timeout (2026-10-21). The gige recipe now sets Mean and 5 %, as the
NIR camera already had. By day the exposure floor goes from 200 to 20 us:
at noon the camera sat at 200-600 us with no room to darken a bright view,
and without chunk data the host cannot tell a camera at its limit from one
still settling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:03:08 +02:00
Peter Bochmann fdb3c50b68
Run a Manta at its frame-rate limit, and wait for a DHT11's first reading
A free-running Manta runs at AcquisitionFrameRateAbs, not at its limit:
rietschen's RGB camera came set to 0.955 fps and delivered 5 frames in 5.2 s.
The gige recipe now writes a short fixed exposure and then the rate, clamped
to the camera's maximum (4.7 fps at 60 MB/s), before auto-exposure goes back
on. The export summary shows the rate set, not the limit, which had read
4.71 fps for a camera running at 0.96.

test hardware env asked for a DHT11 reading at once, but the firmware reads
it every 10 s, the first time 2 s after it starts. install-tower --verify
failed on rietschen 1.4 s into its run, 36 s after the same test had passed.
It now waits one read period for the first reading. Tests 542/542 (mock).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:52 +02:00
Peter Bochmann 8850337250
Support the older GigE cameras (Manta) on rietschen
Rietschen has three Manta G-1236 on one GbE port, whose firmware predates the
names the program uses. A feature missing by its SFNC name is now looked up by
the older one (ExposureTimeAbs, AcquisitionFrameRateAbs, ExposureAutoTarget,
ExposureAutoAdjustTol), so test camera, the telemetry and the keep rule's
reads work. export_camera_profile.py picks a gige recipe for such a camera:
frame trigger off, BayerRG8 or Mono8, 60 MB/s, auto-exposure target 50 %.
At the cameras' old target of 25 every waypoint ran into frame_timeout_ms.

The camera probe now lists every camera. With several, the hardware.ini kit
writes CHOOSE_ONE, install-tower asks which is the colour one, and the profile
export is given that id - the first one the SDK lists was the NIR camera.
install-tower names the unit that holds the motor port instead of assuming
start_gimbal.service.

Tested on rietschen's NIR camera with the motor mocked, beside the running old
program: test camera PASS, a snapshot as a 3008x4112 grey JXL, a scan keeping
a picture every 5 s. Tests 542/542 (mock build). The colour camera is not yet
tested; the old program has it open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:13:04 +02:00
Peter Bochmann ed72f97fe5
Merge taking a thermal picture beside the colour one at every waypoint
A TarisIR mini (driver = taris) as a second camera source: the colour and the
thermal picture of each waypoint, the thermal counts saved 16-bit lossless,
the CamEvent extended by cal, missed, tmax, tmed, hotx and hoty. The program
runs the camera's NUC while the gimbal moves and holds its frame rate on the
wire; scripts/fgc-setcap gives the binary cap_net_raw.

Built and tested in an Ubuntu 22.04 container (mock and Vimba+MQTT, 542/542)
and running on tower 111 since 2026-10-14; from 2026-10-15 20:19 on, 15 h and
then 2.6 days of scanning without a missing thermal picture. Not yet tested:
pulling the camera's cable during a scan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:16:41 +02:00
Peter Bochmann a326a758c4
Make the thermal camera's frame rate hold on the wire
Setting Framerate_Hz while grabbing only thinned out what the SDK handed over;
the camera went on sending 10 fps (and 50 from power-up). Set while the grab
is stopped, once the stream has run, it holds. So the grab is restarted with
the rate set when the first frame is in, and the packet rate of the camera's
port is counted: if it still carries more than 1.5x the rate's frames, the
restart is repeated (up to three times). On tower 111: 5.3 fps, 2 224 packets
a second instead of 22 234, on the second attempt; system load 18 % down from
about 29 %.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 20:21:49 +02:00
Peter Bochmann 0076e623d0
Set the thermal camera's frame rate once it is grabbing
Set before the first startgrab after connecting, Framerate_Hz answers ok and
changes nothing: the camera went on sending its power-up 50 fps, 31 MB/s and
22 000 packets a second on tower 111, which kept all four cores clocked up for
pictures taken one every 5 s. Set after startgrab it holds (5 Hz: 2 100
packets a second).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 20:10:08 +02:00
Peter Bochmann fc507f7407
Give the thermal picture the time its own frame arrived
Both frames of a waypoint used to take the colour frame's time, which made
the thermal one look taken at a moment it was not: it is the newest frame the
camera had, up to max_frame_age_ms old. Each file and CamEvent now has the
time its own frame reached the host; the two of one waypoint share hdg/pit and
are at most that age apart. The docs say to pair them by that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:42:32 +02:00
Peter Bochmann ff89643a4f
Run the thermal camera's NUC while the gimbal moves
The camera recalibrated against its shutter every 30 s and sent no frame for
about 0.7 s meanwhile: a picture falling into that had no thermal image (0.8 %
on tower 111, the 30 s rhythm shown by the new gap logging). The program now
switches the camera's timer off and runs the NUC itself (NUC_Perform, which
returns when it is done) when a move starts and nuc_interval_s (30) has passed,
or after twice that with no move. The scheduler tells the cameras of every move
(ICameraSource::moving), and a picture waits up to 1 s for a camera between
frames (frameReady) rather than go without it. The camera's own timer goes
back on exit; nuc_interval_s = 0 leaves it alone.

Measured on tower 111 before writing it: NUC_Interval = 0 gave 70 s without a
gap; NUC_Perform ran three NUCs of 657-677 ms; NUC_INPROGRESS never changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:02:20 +02:00
Peter Bochmann 1c2f0a0506
Log why a picture got no thermal frame
Every miss now says how old the newest frame was and whether a NUC was
running; every pause over 500 ms in the frame stream is logged with the
camera's own clock, the polls and getdata answers in it, and NUC_INPROGRESS,
which is watched on every poll; a summary of the stream goes out every ten
minutes, and the NUC configuration at connect. Adds the SDK's NUC parameters
(410-415), for running the NUC on purpose later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 17:59:49 +02:00
Peter Bochmann 28ff027950
Note what the thermal camera's SDK costs in CPU on tower 111
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:13:55 +02:00
Peter Bochmann 474e3cac8a
Fix what the thermal camera's first run on tower 111 showed
- The thermal frame was numbered camera 0 - label RGB, and the colour file of
  the same time overwritten - because Vimba counts no camera before open().
  The composite now takes each source's configured camera count, and two
  enabled cameras may no longer share a label.
- The SDK switches LC_NUMERIC to de_DE when loaded, which made "hotx":0,4336.
  Its calls now run under a guard that restores the locale, and the JSON's
  numbers no longer go through printf.
- The camera's frame counter is always 0: new frames are told by their time,
  so the stream no longer stops after the first one.
- The LUT is empty for the first frame: it is asked again on later ones.
- The SDK is libirbgrab_x86_64-linux.so in the ld cache.
- The null channel traces the CamEvent payload it would have sent.

Tested on tower 111 with the TarisIR mini, the motors mocked: cap_net_raw is
enough, RGB/TIR pairs with one timestamp, the TIR file decodes to the counts
its CamEvent describes, profile switches 0-1-0. 536/536 in the 22.04 container.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:01:33 +02:00
Peter Bochmann 3d90af8490
Take a thermal picture beside the colour one at every waypoint
A TarisIR mini (driver = taris) is a second camera source behind a
CompositeCameraSource: the colour camera is asked first, then the thermal one
for its newest frame, and both frames carry the colour frame's timestamp.
Counts are saved 16-bit lossless under TIR/, and the CamEvent gains cal,
missed, tmax, tmed, hotx and hoty (docs/mqtt-api.md). The SDK is declared in
IrbgrabApi.h and loaded with dlopen, so no SDK file is in the repository; a
missing or unreachable camera stays offline (Health cams_offline) while the
scan goes on. scripts/fgc-setcap gives the binary cap_net_raw after a build.

Built and tested in an Ubuntu 22.04 container (mock, MQTT, Vimba+MQTT,
534/534), plus a mock run with RGB/TIR pairs. Not yet run against the camera.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 20:37:25 +02:00
Peter Bochmann a03da2d8f4
Merge slowing down, then pausing, the scan when the tower computer runs hot or cannot keep up
Built and tested in an Ubuntu 22.04 container (mock and Vimba+MQTT, 494/494)
and running on tower 111 since 2026-10-14.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 19:30:21 +02:00
pgdalmeida e1f63108f2
Merge stopping the gimbal where it is when switching from a scan to manual 2026-10-09 14:26:21 +02:00
pgdalmeida 2737811e2e
Stop the gimbal where it is when switching from a scan to manual 2026-10-09 14:25:51 +02:00
pgdalmeida 6fa43f1e08
Slow down, then pause, the scan when the tower computer runs hot or cannot keep up 2026-10-08 17:21:58 +02:00
pgdalmeida f9b6cfe871
Merge deploying only the files git knows about 2026-10-07 15:42:53 +02:00
pgdalmeida ded1eb7464
Deploy only the files git knows about, so ignored folders no longer reach the tower 2026-10-07 15:42:34 +02:00
pgdalmeida cba8856c85
Merge setting a short exposure before the frame rate when exporting a camera profile 2026-10-07 14:54:06 +02:00
pgdalmeida 77d9093097
Merge the homing cancel, the per-tower config folder and the 12-bit report updates from dev 2026-10-07 14:54:06 +02:00
pgdalmeida 7609207e30
Set a short exposure before the frame rate when exporting a camera profile, so the camera allows its full frame rate 2026-10-07 14:52:03 +02:00
Peter Bochmann ae53f52131
Remove the Staeffelsberg scan grid from the repo
A tower's scan grid belongs to that tower, not to the repo: the copy here
had already drifted from the one Staeffelsberg actually uses.

Before the next deploy to Staeffelsberg, move its grid out of the project
folder (scripts/tower-config move) - deploy.sh syncs with --delete and
would otherwise remove the file its config.ini points at.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 14:44:57 +02:00
Peter Bochmann 4fb8507160
Remove the Staeffelsberg scan grid from the repo
A tower's scan grid belongs to that tower, not to the repo: the copy here
had already drifted from the one Staeffelsberg actually uses.

Before the next deploy to Staeffelsberg, move its grid out of the project
folder (scripts/tower-config move) - deploy.sh syncs with --delete and
would otherwise remove the file its config.ini points at.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 14:44:57 +02:00
pgdalmeida 1edca07293
Compare today's RGB8 file with the 12-bit file at the same quality setting in the 12-bit report 2026-10-07 14:09:33 +02:00
pgdalmeida a723646928
Compare 8-bit and 12-bit pictures on a dark forest scene from the Stäffelsberg tower in the 12-bit report 2026-10-07 12:25:04 +02:00
pgdalmeida 19c5873df6
Merge cancelling homing and shutting down cleanly when the program is stopped during homing 2026-10-06 19:49:15 +02:00
pgdalmeida 032355e8fb
Merge keeping each tower's config, scan grid and camera profiles out of a deploy's reach 2026-10-06 19:49:12 +02:00
pgdalmeida eb91f470dd
Cancel homing and shut down cleanly when the program is stopped during homing 2026-10-06 19:41:19 +02:00
pgdalmeida ce6ef3f79a
Keep each tower's config, scan grid and camera profiles in ~/.config/fire_gimbal_control, out of a deploy's reach 2026-10-05 22:02:49 +02:00
Peter Bochmann b153bdbb8a
Merge branch 'main' of git.ggs-solutions.eu:GGS/fwt_software 2026-10-05 13:44:10 +02:00
Peter Bochmann f056d69d15
using correct pattern for Staeffelsberg 2026-10-05 13:43:50 +02:00
pgdalmeida 9f02b70dae
List every module in the module reference, including the self-test, config-editing and remote-command ones 2026-10-05 13:12:09 +02:00
pgdalmeida 70a30132bf
Merge counting the picture interval from the last picture and waiting for a slow camera's next frame 2026-10-05 13:02:13 +02:00
pgdalmeida 2e6609eb1d
Explain in the 12-bit report why the brightness rule picks the right picture, and add a background file for discussing the report with Claude 2026-10-05 12:25:05 +02:00
pgdalmeida 4e8413bda6
Explain in the 12-bit report where the extra bits make a real difference and where they do not 2026-10-05 12:05:33 +02:00
pgdalmeida 4abfd7cbb2
Explain the raw mosaic and planes layouts in the 12-bit report, and spell out every term in its figure and table captions 2026-10-05 11:39:31 +02:00
pgdalmeida 1fc87bf1ee
Rewrite the 12-bit camera test report as a numbered paper with an abstract, figure and table captions, and units 2026-10-05 11:28:52 +02:00
pgdalmeida cfd8ba9978
Save raw 12-bit camera frames as 12-bit colour images, keep a waypoint's picture once the image has settled, and hold the scan when saving falls behind 2026-10-05 10:14:53 +02:00
pgdalmeida d5b037a241
Add camera and image-saving test results for towers 121 and 111, the test tools, and a plan for saving 12-bit images 2026-10-05 08:47:34 +02:00
pgdalmeida 62131d8083
Wait for a slow camera's next frame instead of restarting the stream, and read integer camera features for the exposure check 2026-10-04 16:12:44 +02:00
pgdalmeida fb0f5117df
Count the picture interval from the last picture, and let a settle wait of 0 wait for the exposure to settle 2026-10-02 18:28:40 +02:00
pgdalmeida 4488a2181d
Set in config.ini whether the tower homes and which mode it starts in, instead of the --init and --start flags 2026-09-30 16:42:48 +02:00
pgdalmeida f2c61e030e
Let a yaw-only tower aim with gimbal move, and stop it publishing a made-up pitch 2026-09-29 19:50:39 +02:00
pgdalmeida 895c2f22fd
Add a command to keep taking pictures where the gimbal points, drop unused camera commands, and fit the help on one page 2026-09-29 15:48:07 +02:00
pgdalmeida a21be0d4e8
Take the scan waypoints only from the CSV file, never generate them 2026-09-29 15:02:19 +02:00
pgdalmeida ab9fa3dbb0
Let a tower set its encoder scale, and send no speed after a failed homing 2026-09-28 18:21:37 +02:00
pgdalmeida 049c0c5f0e
Turn the camera's frame trigger off in both profiles, so a legacy tower's camera sends pictures 2026-09-28 17:45:32 +02:00
pgdalmeida dd1764dc99
Show the build's progress during an install, and drop the centre-count note where it does not apply 2026-09-28 17:34:15 +02:00