Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
lwir_spotter.h
Go to the documentation of this file.
1/*
2 * Copyright 2026 OpenUAS
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef USHER_LWIR_SPOTTER_H
19#define USHER_LWIR_SPOTTER_H
20
21/** @file
22 * @brief Serialized saved-LWIR object analysis with immutable frame and exposure evidence.
23 */
24
25#include <signal.h>
26#include "capture_timing.h"
27
28/**
29 * @brief Select a separate ONNX detector assignment.
30 * @param settings Borrowed settings path; keep it valid while analysis is enabled.
31 * @return True if the path was accepted; false for an empty path or a live worker.
32 * @details Store the selection without starting a worker. The first analysis
33 * request loads the assignment.
34 */
35bool lwir_spotter_settings(const char *settings);
36/**
37 * @brief Load a native LWIR intrinsics and mount profile.
38 * @param profile Path of the camera profile to read.
39 * @return True if an LWIR profile with 256 by 192 calibration was loaded.
40 * @details Validate a candidate before replacing the current profile. A profile
41 * cannot be replaced while the analysis worker is live.
42 */
43bool lwir_spotter_profile(const char *profile);
44/**
45 * @brief Set the timing and pose uncertainty limits for projection.
46 * @param limits Comma-separated maximum exposure interval in microseconds
47 * and maximum pose uncertainty in metres.
48 * @return True if both positive bounds were accepted.
49 * @details Apply both limits together after parsing, before the worker starts.
50 * They constrain geographic estimates, not pixel-space detection.
51 */
52bool lwir_spotter_limits(const char *limits);
53/**
54 * @brief Test whether saved-LWIR analysis was explicitly selected.
55 * @return True if a settings path has been selected.
56 * @details This reports configuration, not worker readiness or model validity.
57 */
58bool lwir_spotter_enabled(void);
59/** @brief Analyse one immutable image with copied capture evidence; no camera is acquired.
60 * @details Caller serializes calls. Geographic results require qualified exposure
61 * timing and pose; an unavailable position never invalidates a good image result.
62 * @param filename Path to the published LWIR JPEG with embedded thermal evidence.
63 * @param shot Capture trigger carrying the photo number.
64 * @param timing Frame delivery and optional exposure/pose evidence for this image.
65 * @param running Cancellation flag passed to the subprocess wrapper.
66 * @return Zero for disabled or successful analysis, minus one on failure.
67 */
68int lwir_spotter_analyze(const char *filename, const union dc_shot_union *shot,
69 const struct capture_timing *timing, const volatile sig_atomic_t *running);
70/**
71 * @brief Stop the exclusively owned model worker.
72 * @details Call after the analysis owner has joined. Stopping the process
73 * does not clear the selected settings.
74 */
75void lwir_spotter_stop(void);
76
77#endif
Sensor observation times, aligned poses, and optional frame-arrival evidence.
static const volatile sig_atomic_t * running
static struct usher_camera_profile profile
void lwir_spotter_stop(void)
Stop the exclusively owned model worker.
bool lwir_spotter_profile(const char *profile)
Load a native LWIR intrinsics and mount profile.
int lwir_spotter_analyze(const char *filename, const union dc_shot_union *shot, const struct capture_timing *timing, const volatile sig_atomic_t *running)
Analyse one immutable image with copied capture evidence; no camera is acquired.
bool lwir_spotter_enabled(void)
Test whether saved-LWIR analysis was explicitly selected.
bool lwir_spotter_settings(const char *settings)
Select a separate ONNX detector assignment.
bool lwir_spotter_limits(const char *limits)
Set the timing and pose uncertainty limits for projection.
Shared observation evidence with optional LWIR request/frame-delivery timing.
union dc_shot_union shot
Definition usher.c:534