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
dipla_contract.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/** @file dipla_contract.h
19 * @brief Fixed model geometry and C/C++ local transport units, not runtime settings. */
20#ifndef SENSORAIA_DIPLA_CONTRACT_H
21#define SENSORAIA_DIPLA_CONTRACT_H
22#include <stdint.h>
23
24/** Supported model grid side; generic numerical grids remain independent. */
25#define DIPLA_GRID_SIDE 51U
26/** Supported square field extent in metres. */
27#define DIPLA_FIELD_EXTENT_M 100.0
28/** Uniform production lattice spacing in metres. */
29#define DIPLA_GRID_STEP_M (DIPLA_FIELD_EXTENT_M / (DIPLA_GRID_SIDE - 1U))
30/** Ordered route slots; changing this requires a new model and transport contract. */
31#define DIPLA_WAYPOINT_COUNT 8U
32/** XYZ coordinate count, independent of map channels. */
33#define DIPLA_COORDINATE_COUNT 3U
34/** Mean, variance and position-marker map channels. */
35#define DIPLA_MAP_CHANNEL_COUNT 3U
36/** Complete reverse-diffusion step count for the supported export. */
37#define DIPLA_DIFFUSION_STEPS 20U
38/** Training-time altitude normalization lower bound in metres. */
39#define DIPLA_MODEL_Z_MIN_M 10.0
40/** Training-time altitude normalization upper bound in metres. */
41#define DIPLA_MODEL_Z_MAX_M 40.0
42/** Fixed mission experiment height; not the model altitude normalization. */
43#define DIPLA_DEMO_HEIGHT_MM 2000
44#define DIPLA_FLIGHT_HEIGHT_MIN_MM 200
45#define DIPLA_FLIGHT_HEIGHT_MAX_MM 40000
46/** Accepted deviation from the fixed experiment height in metres. */
47#define DIPLA_HEIGHT_TOLERANCE_M 0.75
48/** Millimetres per metre. */
49#define DIPLA_MM_PER_M 1000.0
50/** Geographic integer units per degree. */
51#define DIPLA_GEO_UNITS_PER_DEGREE 10000000.0
52/** Q8 AGL integer units per metre. */
53#define DIPLA_AGL_UNITS_PER_M 256.0
54/** Maximum absolute latitude in geographic integer units. */
55#define DIPLA_LATITUDE_LIMIT 900000000
56/** Maximum absolute longitude in geographic integer units. */
57#define DIPLA_LONGITUDE_LIMIT 1800000000
58/** Low bits reserved for a legacy reply's zero-based route slot. */
59#define DIPLA_SLOT_BITS 3U
60/** Legacy metric slot mask. */
61#define DIPLA_SLOT_MASK (DIPLA_WAYPOINT_COUNT - 1U)
62/** Largest generation that preserves a nonnegative signed metric. */
63#define DIPLA_MAX_GENERATION ((uint32_t)INT32_MAX >> DIPLA_SLOT_BITS)
64
65#ifdef __cplusplus
66static_assert(DIPLA_WAYPOINT_COUNT == (1U << DIPLA_SLOT_BITS), "Diplacam slot encoding changed");
67#else
68_Static_assert(DIPLA_WAYPOINT_COUNT == (1U << DIPLA_SLOT_BITS), "Diplacam slot encoding changed");
69#endif
70#endif
#define DIPLA_WAYPOINT_COUNT
#define DIPLA_SLOT_BITS