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
image_mock_transform.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/**
19 * @file image_mock_transform.h
20 * @brief Local-simulation JPEG attitude transform API. */
21#ifndef USHER_IMAGE_MOCK_TRANSFORM_H
22#define USHER_IMAGE_MOCK_TRANSFORM_H
23
24#include <stddef.h>
25#include "usher_protocol.h"
26
27/** @brief Successful result: the JPEG was rewritten with the simulated attitude transform. */
28#define IMAGE_MOCK_TRANSFORM_APPLIED 0
29/** @brief Successful result: transform was intentionally skipped for a near-horizon attitude. */
30#define IMAGE_MOCK_TRANSFORM_SKIPPED 1
31
32/**
33 * @brief Rewrite a local test JPEG to simulate the shot attitude.
34 * @param filename Writable path to the JPEG to transform in place.
35 * @param shot Flight pose containing fixed-point roll, pitch, yaw, and position fields.
36 * @return @c IMAGE_MOCK_TRANSFORM_APPLIED, @c IMAGE_MOCK_TRANSFORM_SKIPPED, or -1 on failure.
37 * @details The transform uses a perspective projection and an atomic temporary-file rename so
38 * consumers never observe a partial JPEG. Near-horizon frames are skipped or synthesized by
39 * configured policy because planar image projection becomes numerically untrustworthy there.
40 * @warning This is simulation evidence only; it does not model a calibrated physical camera.
41 */
42int image_mock_transform(const char *filename, const union dc_shot_union *shot);
43
44int image_mock_map(const char *filename, const char *cache_directory,
45 const union dc_shot_union *shot, size_t width, size_t height,
46 double horizontal_fov_deg, double vertical_fov_deg);
47
48#endif
int image_mock_map(const char *filename, const char *cache_directory, const union dc_shot_union *shot, size_t width, size_t height, double horizontal_fov_deg, double vertical_fov_deg)
Render a map-backed simulated exposure.
int image_mock_transform(const char *filename, const union dc_shot_union *shot)
Rewrite a local test JPEG to simulate the shot attitude.
union dc_shot_union shot
Definition usher.c:534
Shared FC/MORA byte-stream UART framing, messages and payload layouts.