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 File Reference

Local-simulation JPEG attitude transform API. More...

#include <stddef.h>
#include "usher_protocol.h"
Include dependency graph for image_mock_transform.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IMAGE_MOCK_TRANSFORM_APPLIED   0
 Successful result: the JPEG was rewritten with the simulated attitude transform.
#define IMAGE_MOCK_TRANSFORM_SKIPPED   1
 Successful result: transform was intentionally skipped for a near-horizon attitude.

Functions

int image_mock_transform (const char *filename, const union dc_shot_union *shot)
 Rewrite a local test JPEG to simulate the shot attitude.
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.

Detailed Description

Local-simulation JPEG attitude transform API.

Definition in file image_mock_transform.h.

Macro Definition Documentation

◆ IMAGE_MOCK_TRANSFORM_APPLIED

#define IMAGE_MOCK_TRANSFORM_APPLIED   0

Successful result: the JPEG was rewritten with the simulated attitude transform.

Definition at line 28 of file image_mock_transform.h.

◆ IMAGE_MOCK_TRANSFORM_SKIPPED

#define IMAGE_MOCK_TRANSFORM_SKIPPED   1

Successful result: transform was intentionally skipped for a near-horizon attitude.

Definition at line 30 of file image_mock_transform.h.

Function Documentation

◆ image_mock_map()

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.

Parameters
filenameDestination JPEG path.
cache_directoryLocal map tile cache root.
shotTrigger containing position, attitude and AGL.
widthOutput columns.
heightOutput rows.
horizontal_fov_degHorizontal field of view in degrees.
vertical_fov_degVertical field of view in degrees.
Returns
Zero on publication, or -1 on lock, geometry, cache, or I/O failure.

Serialize rendering with fixture transforms because both reuse the same codec and pixel workspace.

Definition at line 186 of file image_mock_transform.c.

◆ image_mock_transform()

int image_mock_transform ( const char * filename,
const union dc_shot_union * shot )

Rewrite a local test JPEG to simulate the shot attitude.

Parameters
filenameWritable path to the JPEG to transform in place.
shotFlight pose containing fixed-point roll, pitch, yaw, and position fields.
Returns
IMAGE_MOCK_TRANSFORM_APPLIED, IMAGE_MOCK_TRANSFORM_SKIPPED, or -1 on failure.

The transform uses a perspective projection and an atomic temporary-file rename so consumers never observe a partial JPEG. Near-horizon frames are skipped or synthesized by configured policy because planar image projection becomes numerically untrustworthy there.

Warning
This is simulation evidence only; it does not model a calibrated physical camera.

Definition at line 346 of file image_mock_transform.c.