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
loom_return.h File Reference

Bounded direction-to-target policy, independent of inference and FC transport. More...

#include <stdbool.h>
#include <stdint.h>
Include dependency graph for loom_return.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  loom_return_point
 Local ground point in metres east/north of the reference origin. More...
struct  loom_return_config
 Limits applied before a neural direction may become a target. More...
struct  loom_return_state
 Caller-owned sequence and smoothing state; first observation seeds target. More...
struct  loom_return_options
 Module-owned inference settings, separate from universal runtime settings. More...

Enumerations

enum  loom_return_metric { LOOM_METRIC_NONE = 0 , LOOM_METRIC_STEERING = 1 , LOOM_METRIC_ARRIVED = 2 , LOOM_METRIC_BARO_MAGNETO = 3 }
 Wire metric values distinguishing active vector steering from arrival. More...
enum  loom_return_frame { LOOM_RETURN_NONE , LOOM_RETURN_NORTH_EAST , LOOM_RETURN_BODY_FORWARD_RIGHT , LOOM_RETURN_SIMULATED }
 Explicit model-vector coordinates; embeddings are never guessed to be bearings. More...

Functions

void loom_return_options_init (struct loom_return_options *options)
 Initialize return limits with feature-only semantics by default.
bool loom_return_setting (void *context, const char *key, const char *value)
 Parse one LOOM-owned settings field, rejecting duplicates and unknown keys.
bool loom_return_options_valid (const struct loom_return_options *options)
 Check that optional destination coordinates are either both present or both omitted.
bool loom_return_vector_attitude (enum loom_return_frame frame, double first, double second, double roll_deg, double pitch_deg, double yaw_deg, double max_tilt_deg, struct loom_return_point *direction)
 Convert a declared two-component vector to earth-frame east/north with attitude gating.
bool loom_return_vector (enum loom_return_frame frame, double first, double second, double yaw_deg, struct loom_return_point *direction)
 Convert a level declared two-component vector to earth-frame east/north.
void loom_return_simulated_vector (uint64_t seed, struct loom_return_point position, double yaw_deg, float vector[3])
 Generate a slightly noisy body-frame simulated homing vector seeded by neural feature output.
void loom_return_defaults (struct loom_return_config *config)
 Conservative return-policy defaults, not aircraft flight settings.
bool loom_return_config_valid (const struct loom_return_config *config)
 Validate finite limits and their cross-field relationships.
bool loom_return_direction (const struct loom_return_config *config, struct loom_return_point position, struct loom_return_point direction, double confidence, struct loom_return_point *target)
 Convert an earth-frame direction into a HOME-bounded target.
bool loom_return_update (struct loom_return_state *state, const struct loom_return_config *config, uint32_t sequence, struct loom_return_point candidate, struct loom_return_point *target)
 Admit a fresh bounded target and limit its movement.
bool loom_return_simulate (struct loom_return_state *state, const struct loom_return_config *config, uint32_t sequence, struct loom_return_point *target)
 Produce small mean-reverting target fluctuations for explicit PC simulation.

Detailed Description

Bounded direction-to-target policy, independent of inference and FC transport.

Definition in file loom_return.h.

Enumeration Type Documentation

◆ loom_return_frame

Explicit model-vector coordinates; embeddings are never guessed to be bearings.

Enumerator
LOOM_RETURN_NONE 
LOOM_RETURN_NORTH_EAST 
LOOM_RETURN_BODY_FORWARD_RIGHT 
LOOM_RETURN_SIMULATED 

Definition at line 57 of file loom_return.h.

◆ loom_return_metric

Wire metric values distinguishing active vector steering from arrival.

Enumerator
LOOM_METRIC_NONE 
LOOM_METRIC_STEERING 
LOOM_METRIC_ARRIVED 
LOOM_METRIC_BARO_MAGNETO 

Definition at line 34 of file loom_return.h.

Function Documentation

◆ loom_return_config_valid()

bool loom_return_config_valid ( const struct loom_return_config * config)

Validate finite limits and their cross-field relationships.

Definition at line 26 of file loom_return.c.

◆ loom_return_defaults()

void loom_return_defaults ( struct loom_return_config * config)

Conservative return-policy defaults, not aircraft flight settings.

Parameters
configWritable destination.

Definition at line 35 of file loom_return.c.

◆ loom_return_direction()

bool loom_return_direction ( const struct loom_return_config * config,
struct loom_return_point position,
struct loom_return_point direction,
double confidence,
struct loom_return_point * target )

Convert an earth-frame direction into a HOME-bounded target.

Parameters
configValid policy limits.
positionVehicle east/north relative to HOME, metres.
directionEarth-frame east/north components; magnitude is not distance.
confidenceFinite model confidence in 0..1.
targetWritten only for an accepted, nonzero direction toward HOME.
Returns
False for invalid, away-facing or inconsistent geometry.

Definition at line 138 of file loom_return.c.

◆ loom_return_options_init()

void loom_return_options_init ( struct loom_return_options * options)

Initialize return limits with feature-only semantics by default.

Definition at line 40 of file loom_return.c.

◆ loom_return_options_valid()

bool loom_return_options_valid ( const struct loom_return_options * options)

Check that optional destination coordinates are either both present or both omitted.

Definition at line 47 of file loom_return.c.

◆ loom_return_setting()

bool loom_return_setting ( void * context,
const char * key,
const char * value )

Parse one LOOM-owned settings field, rejecting duplicates and unknown keys.

Definition at line 55 of file loom_return.c.

◆ loom_return_simulate()

bool loom_return_simulate ( struct loom_return_state * state,
const struct loom_return_config * config,
uint32_t sequence,
struct loom_return_point * target )

Produce small mean-reverting target fluctuations for explicit PC simulation.

Parameters
stateCaller state; random seed zero selects a deterministic seed.
configValid policy limits.
sequenceStrictly increasing observation number.
targetSimulated point, never represented as a neural observation.
Returns
True only for a fresh bounded update.

Definition at line 191 of file loom_return.c.

◆ loom_return_simulated_vector()

void loom_return_simulated_vector ( uint64_t seed,
struct loom_return_point position,
double yaw_deg,
float vector[3] )

Generate a slightly noisy body-frame simulated homing vector seeded by neural feature output.

Definition at line 109 of file loom_return.c.

◆ loom_return_update()

bool loom_return_update ( struct loom_return_state * state,
const struct loom_return_config * config,
uint32_t sequence,
struct loom_return_point candidate,
struct loom_return_point * target )

Admit a fresh bounded target and limit its movement.

Parameters
stateExclusive caller state; not shared between sorties.
configValid policy limits.
sequenceStrictly increasing positive observation number.
candidateProposed point within the HOME radius.
targetSmoothed accepted point, unchanged on rejection.
Returns
True only when the state advances. Transport owners must commit a copied state only after their waypoint transaction succeeds.

Definition at line 171 of file loom_return.c.

◆ loom_return_vector()

bool loom_return_vector ( enum loom_return_frame frame,
double first,
double second,
double yaw_deg,
struct loom_return_point * direction )

Convert a level declared two-component vector to earth-frame east/north.

Parameters
frameDeclared model coordinate system.
firstNorth or forward component.
secondEast or right component.
yaw_degAircraft heading, clockwise from north, degrees.
directionWritten only for finite supported coordinates.

Definition at line 132 of file loom_return.c.

◆ loom_return_vector_attitude()

bool loom_return_vector_attitude ( enum loom_return_frame frame,
double first,
double second,
double roll_deg,
double pitch_deg,
double yaw_deg,
double max_tilt_deg,
struct loom_return_point * direction )

Convert a declared two-component vector to earth-frame east/north with attitude gating.

Parameters
frameDeclared model coordinate system.
firstNorth or forward component.
secondEast or right component.
roll_degAircraft roll, right wing down positive, degrees.
pitch_degAircraft pitch, nose up positive, degrees.
yaw_degAircraft magnetometer heading, clockwise from north, degrees.
max_tilt_degMaximum allowed absolute roll or pitch in degrees.
directionWritten only for finite supported coordinates within tilt limits.

Definition at line 86 of file loom_return.c.