Bounded direction-to-target policy, independent of inference and FC transport. More...
#include <stdbool.h>#include <stdint.h>

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
| enum 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
| enum 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
-
config Writable 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
-
config Valid policy limits. position Vehicle east/north relative to HOME, metres. direction Earth-frame east/north components; magnitude is not distance. confidence Finite model confidence in 0..1. target Written 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
-
state Caller state; random seed zero selects a deterministic seed. config Valid policy limits. sequence Strictly increasing observation number. target Simulated 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
-
state Exclusive caller state; not shared between sorties. config Valid policy limits. sequence Strictly increasing positive observation number. candidate Proposed point within the HOME radius. target Smoothed 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
-
frame Declared model coordinate system. first North or forward component. second East or right component. yaw_deg Aircraft heading, clockwise from north, degrees. direction Written 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
-
frame Declared model coordinate system. first North or forward component. second East or right component. roll_deg Aircraft roll, right wing down positive, degrees. pitch_deg Aircraft pitch, nose up positive, degrees. yaw_deg Aircraft magnetometer heading, clockwise from north, degrees. max_tilt_deg Maximum allowed absolute roll or pitch in degrees. direction Written only for finite supported coordinates within tilt limits.
Definition at line 86 of file loom_return.c.