space-data-module-sdk 0.8.14 → 0.8.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/space-data-module.js +91 -0
- package/docs/_shell/consumer-assets.html +5 -0
- package/docs/browser-wasmedge-isomorphic.html +261 -0
- package/docs/byo-wasm-quickstart.html +226 -0
- package/docs/byo-wasm-quickstart.md +204 -0
- package/docs/conformance.html +156 -0
- package/docs/conformance.md +92 -0
- package/docs/emception-shared-memory-verdict.md +209 -0
- package/docs/events-abi.html +313 -0
- package/docs/events-abi.md +530 -0
- package/docs/families/analytics.html +178 -0
- package/docs/families/analytics.md +104 -0
- package/docs/families/attitude.html +157 -0
- package/docs/families/attitude.md +36 -0
- package/docs/families/behavior.html +157 -0
- package/docs/families/behavior.md +36 -0
- package/docs/families/breakup.html +157 -0
- package/docs/families/breakup.md +36 -0
- package/docs/families/conjunction.html +186 -0
- package/docs/families/conjunction.md +121 -0
- package/docs/families/data-source.html +318 -0
- package/docs/families/effects.html +157 -0
- package/docs/families/effects.md +36 -0
- package/docs/families/environment.html +170 -0
- package/docs/families/environment.md +73 -0
- package/docs/families/estimation.html +190 -0
- package/docs/families/estimation.md +128 -0
- package/docs/families/gnc.html +157 -0
- package/docs/families/gnc.md +36 -0
- package/docs/families/maneuver.html +209 -0
- package/docs/families/maneuver.md +206 -0
- package/docs/families/obstruction.html +191 -0
- package/docs/families/obstruction.md +96 -0
- package/docs/families/propagator.html +333 -0
- package/docs/families/propulsion.html +157 -0
- package/docs/families/propulsion.md +36 -0
- package/docs/families/reentry.html +157 -0
- package/docs/families/reentry.md +36 -0
- package/docs/families/rf.html +193 -0
- package/docs/families/rf.md +136 -0
- package/docs/families/scheduler.html +157 -0
- package/docs/families/scheduler.md +36 -0
- package/docs/families/sensor.html +157 -0
- package/docs/families/sensor.md +36 -0
- package/docs/families/signature.html +157 -0
- package/docs/families/signature.md +36 -0
- package/docs/flatsql-host-contract.html +176 -0
- package/docs/flatsql-streaming-standard.html +375 -0
- package/docs/gpu-module-abi.html +233 -0
- package/docs/harness-family-matrix.md +135 -0
- package/docs/index.html +216 -85
- package/docs/isomorphic-pthreads.html +228 -0
- package/docs/isomorphic-pthreads.md +84 -0
- package/docs/isomorphic-sdn-runtime-plan.html +274 -0
- package/docs/language-runtime-matrix.html +182 -0
- package/docs/llms.txt +86 -0
- package/docs/module-bundle-runtime-plan.html +146 -0
- package/docs/module-publication-standard.html +503 -0
- package/docs/node-red-default-node-parity.html +201 -0
- package/docs/propagator-abi.md +73 -21
- package/docs/protect-and-sign.html +181 -0
- package/docs/protect-and-sign.md +120 -0
- package/docs/protocol-installation.html +296 -0
- package/docs/publication-submission.html +158 -0
- package/docs/publication-submission.md +78 -0
- package/docs/secrets-capability.html +206 -0
- package/docs/styles.css +860 -167
- package/docs/testing-harness.html +408 -0
- package/docs/tri-runtime-parity-gate.html +182 -0
- package/docs/tri-runtime-parity.html +203 -0
- package/include/orbpro/orbpro_event_runner.h +951 -0
- package/include/orbpro/orbpro_events_abi.h +565 -0
- package/include/orbpro/orbpro_propagator_abi.h +17 -0
- package/package.json +15 -5
- package/schemas/orbpro/Events.fbs +501 -0
- package/schemas/orbpro/Propagator.fbs +72 -9
- package/schemas/orbpro/reference-frame-crosswalk.json +108 -0
- package/schemas/orbpro/reference-frame.lock.json +98 -0
- package/src/browser.js +13 -0
- package/src/conformance/abiDriver.js +225 -0
- package/src/conformance/index.js +151 -0
- package/src/conformance/propagatorSuite.js +526 -0
- package/src/conformance/selfTest.js +275 -0
- package/src/conformance/selfTestCorpus.js +68 -0
- package/src/conformance/twoBodyReference.js +132 -0
- package/src/generated/orbpro/events-abi.js +206 -0
- package/src/generated/orbpro/events-abi.ts +319 -0
- package/src/generated/orbpro/propagator/reference-frame.js +17 -0
- package/src/generated/orbpro/propagator/reference-frame.ts +91 -1
- package/src/generated/orbpro/propagator-abi.js +17 -0
- package/src/generated/orbpro/propagator-abi.ts +17 -0
- package/src/generated/spacedatastandards/plg/CCT.d.ts +94 -0
- package/src/generated/spacedatastandards/plg/CCT.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/CCT.js +208 -0
- package/src/generated/spacedatastandards/plg/CCT.ts +281 -0
- package/src/generated/spacedatastandards/plg/CCTCategory.d.ts +98 -0
- package/src/generated/spacedatastandards/plg/CCTCategory.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/CCTCategory.js +177 -0
- package/src/generated/spacedatastandards/plg/CCTCategory.ts +269 -0
- package/src/generated/spacedatastandards/plg/CCTCategoryRollup.d.ts +54 -0
- package/src/generated/spacedatastandards/plg/CCTCategoryRollup.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/CCTCategoryRollup.js +106 -0
- package/src/generated/spacedatastandards/plg/CCTCategoryRollup.ts +144 -0
- package/src/generated/spacedatastandards/plg/PLG.d.ts +46 -2
- package/src/generated/spacedatastandards/plg/PLG.d.ts.map +1 -1
- package/src/generated/spacedatastandards/plg/PLG.js +78 -5
- package/src/generated/spacedatastandards/plg/PLG.ts +90 -5
- package/src/generated/spacedatastandards/plg/capabilityClass.d.ts +181 -0
- package/src/generated/spacedatastandards/plg/capabilityClass.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/capabilityClass.js +183 -0
- package/src/generated/spacedatastandards/plg/capabilityClass.ts +208 -0
- package/src/generated/spacedatastandards/plg/main.d.ts +4 -0
- package/src/generated/spacedatastandards/plg/main.d.ts.map +1 -1
- package/src/generated/spacedatastandards/plg/main.js +4 -0
- package/src/generated/spacedatastandards/plg/main.ts +4 -0
- package/src/generated/spacedatastandards/plg/pluginCategory.d.ts +40 -2
- package/src/generated/spacedatastandards/plg/pluginCategory.d.ts.map +1 -1
- package/src/generated/spacedatastandards/plg/pluginCategory.js +40 -2
- package/src/generated/spacedatastandards/plg/pluginCategory.ts +40 -2
- package/src/host/browserModuleHarness.js +8 -0
- package/src/host/wasiThreadHost.js +189 -14
- package/src/index.d.ts +18 -1
- package/src/testing/isomorphicHarness.js +233 -0
- package/src/transport/index.js +16 -0
- package/src/transport/records.js +1015 -3
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
/* ===========================================================================
|
|
2
|
+
* GENERATED FILE — DO NOT EDIT.
|
|
3
|
+
*
|
|
4
|
+
* Source of truth : schemas/orbpro/Events.fbs
|
|
5
|
+
* Generator : scripts/generate-events-abi.mjs
|
|
6
|
+
* Drift gate : scripts/check-events-abi.mjs (runs in `npm test`)
|
|
7
|
+
* Contract : docs/events-abi.md
|
|
8
|
+
*
|
|
9
|
+
* Edit the .fbs and regenerate. A hand edit here is erased by the next run and
|
|
10
|
+
* failed by the gate in between — which is the point: this file existing in
|
|
11
|
+
* five hand-maintained copies is the drift that
|
|
12
|
+
* graph/findings/official-harness-shapes.md §3 forbids.
|
|
13
|
+
* ===========================================================================
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
#ifndef ORBPRO_EVENTS_ABI_H
|
|
17
|
+
#define ORBPRO_EVENTS_ABI_H
|
|
18
|
+
|
|
19
|
+
#include <stdint.h>
|
|
20
|
+
#include <stddef.h> /* offsetof */
|
|
21
|
+
#include "orbpro/orbpro_propagator_abi.h"
|
|
22
|
+
|
|
23
|
+
/* The ABI locks below must compile in both C and C++ — a locator's event
|
|
24
|
+
* function is usually C++ while the runner
|
|
25
|
+
* (include/orbpro/orbpro_event_runner.h) and its examples are C. */
|
|
26
|
+
#if defined(__cplusplus)
|
|
27
|
+
#define ORBPRO_ABI_STATIC_ASSERT(cond, msg) static_assert(cond, msg)
|
|
28
|
+
#else
|
|
29
|
+
#define ORBPRO_ABI_STATIC_ASSERT(cond, msg) _Static_assert(cond, msg)
|
|
30
|
+
#endif
|
|
31
|
+
|
|
32
|
+
#ifdef __cplusplus
|
|
33
|
+
extern "C" {
|
|
34
|
+
#endif
|
|
35
|
+
|
|
36
|
+
/* ========================================================================= */
|
|
37
|
+
/* RootMethod */
|
|
38
|
+
/* ========================================================================= */
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The refinement algorithm the runner uses on a bracketed root. All three are
|
|
42
|
+
* bracketing methods: a root that is bracketed stays bracketed, so a locator
|
|
43
|
+
* can never report a root outside the interval that produced it.
|
|
44
|
+
*/
|
|
45
|
+
typedef enum {
|
|
46
|
+
ORBPRO_ROOT_BRENT = 0, /**< Brent's method (inverse quadratic interpolation with bisection fallback). The default: superlinear on smooth g, and it cannot diverge. */
|
|
47
|
+
ORBPRO_ROOT_BISECTION = 1, /**< Plain bisection. Slower, and chosen only when g is known to be noisy or piecewise — it is the one method whose iteration count is a function of the bracket width alone, which makes it the reproducibility fallback. */
|
|
48
|
+
ORBPRO_ROOT_ILLINOIS = 2, /**< Illinois (modified regula falsi). Retained because it is the method the legacy JavaScript eclipse scan used, so a like-for-like comparison against the pre-module answer is possible without changing the method. */
|
|
49
|
+
} OrbProRootMethod;
|
|
50
|
+
|
|
51
|
+
/* ========================================================================= */
|
|
52
|
+
/* CrossingDirection */
|
|
53
|
+
/* ========================================================================= */
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Which way g crosses zero. SIGNED on purpose: a crossing qualifies when
|
|
57
|
+
* `direction * (g_after - g_before) > 0`, so the filter is arithmetic rather
|
|
58
|
+
* than a branch table, and ANY = 0 falls out of the same expression.
|
|
59
|
+
*/
|
|
60
|
+
typedef enum {
|
|
61
|
+
ORBPRO_CROSSING_FALLING = -1, /**< g decreasing through zero — an interval OPENS for the usual "g > 0 means outside" convention (eclipse entry, AOS, FOV entry). */
|
|
62
|
+
ORBPRO_CROSSING_ANY = 0, /**< Either direction. */
|
|
63
|
+
ORBPRO_CROSSING_RISING = 1, /**< g increasing through zero — an interval CLOSES (eclipse exit, LOS). */
|
|
64
|
+
} OrbProCrossingDirection;
|
|
65
|
+
|
|
66
|
+
/* ========================================================================= */
|
|
67
|
+
/* RootStatus */
|
|
68
|
+
/* ========================================================================= */
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* How a refinement ended. NEVER folded into the returned root: a root that
|
|
72
|
+
* stopped on the iteration cap and a root that converged are different
|
|
73
|
+
* answers, and a consumer that cannot tell them apart will publish the first
|
|
74
|
+
* as if it were the second.
|
|
75
|
+
*/
|
|
76
|
+
typedef enum {
|
|
77
|
+
ORBPRO_ROOT_STATUS_CONVERGED = 0, /**< |g| <= value_tolerance, or the bracket narrowed below epoch_tolerance. */
|
|
78
|
+
ORBPRO_ROOT_STATUS_MAX_ITERATIONS = 1, /**< The iteration cap was reached with the bracket still wider than the tolerance. The returned epoch is the best bracket midpoint. */
|
|
79
|
+
ORBPRO_ROOT_STATUS_FLAT_BRACKET = 2, /**< g did not change sign across a bracket that the scan said it did — the state source returned inconsistent values for the same epoch, or g is not a function of epoch alone. */
|
|
80
|
+
ORBPRO_ROOT_STATUS_DISCONTINUOUS = 3, /**< g jumped across zero without passing through it within the epoch tolerance: a discontinuity, not a root. Reported, never refined away. */
|
|
81
|
+
ORBPRO_ROOT_STATUS_TRUNCATED = 4, /**< The scan hit `EventInterval.max_events` or `max_evaluations` and stopped early. Everything reported is real; the list is not complete. */
|
|
82
|
+
ORBPRO_ROOT_STATUS_EPOCH_RESOLUTION_LIMITED = 5, /**< The bracket narrowed to the state source's declared epoch resolution before it reached `epoch_tolerance_seconds`. The root is correct to that resolution and NO FINER, and this is how the ABI says so instead of reporting the tolerance it was asked for. */
|
|
83
|
+
} OrbProRootStatus;
|
|
84
|
+
|
|
85
|
+
/* ========================================================================= */
|
|
86
|
+
/* Sign */
|
|
87
|
+
/* ========================================================================= */
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The sign of a scalar at an interval endpoint. Its only job is to make an
|
|
91
|
+
* interval that is ALREADY OPEN at the scan start representable: a
|
|
92
|
+
* crossing-only report loses that interval entirely, which is the classic
|
|
93
|
+
* event-scan defect (the pass you were already inside when the scan began).
|
|
94
|
+
*/
|
|
95
|
+
typedef enum {
|
|
96
|
+
ORBPRO_SIGN_NEGATIVE = -1,
|
|
97
|
+
ORBPRO_SIGN_ZERO = 0,
|
|
98
|
+
ORBPRO_SIGN_POSITIVE = 1,
|
|
99
|
+
} OrbProSign;
|
|
100
|
+
|
|
101
|
+
/* ========================================================================= */
|
|
102
|
+
/* EventFlags */
|
|
103
|
+
/* ========================================================================= */
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* EventHit.flags and EventInterval.flags are BITFIELDS carrying any
|
|
107
|
+
* OR-combination of these, so both are declared `uint` on their structs
|
|
108
|
+
* rather than typed to this enum. The C enumerators are generated from here
|
|
109
|
+
* anyway — they are the contract.
|
|
110
|
+
*/
|
|
111
|
+
typedef enum {
|
|
112
|
+
ORBPRO_EVENT_NONE = 0,
|
|
113
|
+
ORBPRO_EVENT_INTERVAL_OPEN_AT_START = 1, /**< The component's interval was already open at the interval start, so this hit is a CLOSING crossing whose opening epoch is before the scan. */
|
|
114
|
+
ORBPRO_EVENT_INTERVAL_OPEN_AT_END = 2, /**< The component's interval is still open at the interval end. */
|
|
115
|
+
ORBPRO_EVENT_TANGENTIAL = 4, /**< g touched zero and returned on the same side — a grazing event. Reported as a hit with this flag rather than silently dropped, because a grazing eclipse and no eclipse are different answers. */
|
|
116
|
+
ORBPRO_EVENT_ON_SCAN_BOUNDARY = 8, /**< The root sits within one epoch tolerance of an interval endpoint, so the bracket is one-sided and the consumer should widen the interval to confirm it. */
|
|
117
|
+
ORBPRO_EVENT_BACKWARD = 16, /**< The scan ran backward in time (`stop` earlier than `start`). Hits are still reported in SCAN order, which is decreasing epoch. */
|
|
118
|
+
ORBPRO_EVENT_STOP_CONDITION = 32, /**< This hit satisfied a component declared `isStopCondition` — it is the propagate-to-condition answer, not merely an observed crossing. */
|
|
119
|
+
} OrbProEventFlags;
|
|
120
|
+
|
|
121
|
+
/* ========================================================================= */
|
|
122
|
+
/* EventError */
|
|
123
|
+
/* ========================================================================= */
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Named negative return codes for every export in this family. A locator that
|
|
127
|
+
* answers -1 for everything is unconformable: the consumer cannot place the
|
|
128
|
+
* failure on the degradation ladder, so it cannot decide between retrying,
|
|
129
|
+
* widening the interval, and refusing. Codes -1..-6 are deliberately the SAME
|
|
130
|
+
* numbers and the same meanings as the propagator family's
|
|
131
|
+
* (docs/propagator-abi.md §Error codes); the events-specific codes start at
|
|
132
|
+
* -20 so no consumer can confuse the two tables by value.
|
|
133
|
+
*/
|
|
134
|
+
typedef enum {
|
|
135
|
+
ORBPRO_EVENT_E_INTERNAL = -25, /**< The runner asked for a phase that does not exist. Internal; never returned by a conformant locator. */
|
|
136
|
+
ORBPRO_EVENT_E_SUPPLY_COUNT_MISMATCH = -24, /**< `plugin_event_supply` was called with a count that is not `epoch_count * object_count` from the last `plugin_event_next`. */
|
|
137
|
+
ORBPRO_EVENT_E_PROTOCOL_ORDER = -23, /**< `plugin_event_supply` was called when no request was outstanding, or `plugin_event_next` twice without an intervening supply. */
|
|
138
|
+
ORBPRO_EVENT_E_BUFFER_TOO_SMALL = -22, /**< A caller buffer was too small for the answer. The required element count is available from the matching `*_count` export; nothing is truncated silently. */
|
|
139
|
+
ORBPRO_EVENT_E_UNKNOWN_COMPONENT = -21, /**< The configuration named a component, parameter or object this locator does not implement. The name is reported through the description, never coerced to a neighbour. */
|
|
140
|
+
ORBPRO_EVENT_E_NOT_STARTED = -20, /**< `plugin_event_begin` has not been called, or the previous scan finished. */
|
|
141
|
+
ORBPRO_EVENT_E_UNPHYSICAL = -6, /**< A state, epoch or parameter is outside the domain where this locator's geometry is defined (a station below the surface, e < 0, a cone half-angle outside (0, pi)). */
|
|
142
|
+
ORBPRO_EVENT_E_NOT_CONVERGED = -5, /**< A refinement ended without converging AND the caller asked for strict convergence. Ordinarily non-convergence is reported per hit in `EventHit.status`, not as a call failure. */
|
|
143
|
+
ORBPRO_EVENT_E_BAD_INPUT = -4, /**< A pointer, count or policy value is malformed (NaN tolerance, zero scan step, `max_iterations` of 0). */
|
|
144
|
+
ORBPRO_EVENT_E_NULL_OUTPUT = -3, /**< A required output pointer was null. */
|
|
145
|
+
ORBPRO_EVENT_E_BAD_OBJECT_INDEX = -2, /**< An object index is outside `[0, object_count)`. */
|
|
146
|
+
ORBPRO_EVENT_E_NOT_CONFIGURED = -1, /**< `plugin_event_configure` has not been called, or it failed. */
|
|
147
|
+
ORBPRO_EVENT_E_OK = 0,
|
|
148
|
+
} OrbProEventError;
|
|
149
|
+
|
|
150
|
+
/* ========================================================================= */
|
|
151
|
+
/* ComponentContinuity */
|
|
152
|
+
/* ========================================================================= */
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Whether a component's g is safe to refine, and with which method. A locator
|
|
156
|
+
* that lies here produces roots that look converged and are not, which is why
|
|
157
|
+
* it is declared per component rather than assumed for the family.
|
|
158
|
+
*/
|
|
159
|
+
typedef enum {
|
|
160
|
+
ORBPRO_CONTINUITY_SMOOTH = 0, /**< g is C1 in epoch. Brent is valid. */
|
|
161
|
+
ORBPRO_CONTINUITY_PIECEWISE = 1, /**< g is continuous but its derivative jumps (a piecewise mask, a multi-body minimum). Bracketing methods are valid; interpolation is not guaranteed to help, and the runner falls back to bisection. */
|
|
162
|
+
ORBPRO_CONTINUITY_DISCRETE = 2, /**< g steps between levels and has no root in the analytic sense (a discrete count, an enumerated state). The runner reports the STEP epoch to within the scan step and marks it DISCONTINUOUS; it never refines it. */
|
|
163
|
+
} OrbProComponentContinuity;
|
|
164
|
+
|
|
165
|
+
/* ========================================================================= */
|
|
166
|
+
/* OrbProRootPolicy — 32 bytes, 8-byte aligned */
|
|
167
|
+
/* ========================================================================= */
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* The root-refinement policy — the SAME parameters for every locator, which
|
|
171
|
+
* is what makes two locators' epochs comparable. 32 bytes, 8-byte aligned.
|
|
172
|
+
*
|
|
173
|
+
* A zeroed policy is NOT a default: `orbpro_root_policy_init` zeroes it and
|
|
174
|
+
* `plugin_event_begin` refuses a zero `scan_step_seconds` with `BAD_INPUT`.
|
|
175
|
+
* A silent default step is how a scan misses every event shorter than it.
|
|
176
|
+
*
|
|
177
|
+
* Binary layout (derived from the IDL, not hand-written):
|
|
178
|
+
*
|
|
179
|
+
* Offset Size Field
|
|
180
|
+
* ------ ---- -----------------------------------------
|
|
181
|
+
* 0 8 scan_step_seconds
|
|
182
|
+
* 8 8 epoch_tolerance_seconds
|
|
183
|
+
* 16 8 value_tolerance
|
|
184
|
+
* 24 4 max_iterations
|
|
185
|
+
* 28 1 method
|
|
186
|
+
* 29 3 (alignment padding — MUST be written as zero)
|
|
187
|
+
*/
|
|
188
|
+
typedef struct {
|
|
189
|
+
double scan_step_seconds; /**< Coarse bracketing step, SECONDS, always positive. The runner applies the interval's direction. This is the ONLY thing that decides which events are found; the refinement decides only how precisely. */
|
|
190
|
+
double epoch_tolerance_seconds; /**< Convergence bar on the bracket width, SECONDS. Clamped up to the state source's declared epoch resolution — see `EPOCH_RESOLUTION_LIMITED`. */
|
|
191
|
+
double value_tolerance; /**< Convergence bar on |g|, in the component's own declared unit. 0 disables the value test and converges on the bracket alone. */
|
|
192
|
+
uint32_t max_iterations; /**< Hard cap on refinement iterations for ONE root. Reaching it is reported as `MAX_ITERATIONS`, never as a converged root. */
|
|
193
|
+
uint8_t method; /**< Refinement algorithm. */
|
|
194
|
+
uint8_t _reserved[3]; /**< Alignment padding at offset 29. MUST be 0. */
|
|
195
|
+
} OrbProRootPolicy;
|
|
196
|
+
|
|
197
|
+
ORBPRO_ABI_STATIC_ASSERT(sizeof(OrbProRootPolicy) == 32,
|
|
198
|
+
"OrbProRootPolicy must be 32 bytes");
|
|
199
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProRootPolicy, scan_step_seconds) == 0,
|
|
200
|
+
"OrbProRootPolicy.scan_step_seconds must be at offset 0");
|
|
201
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProRootPolicy, epoch_tolerance_seconds) == 8,
|
|
202
|
+
"OrbProRootPolicy.epoch_tolerance_seconds must be at offset 8");
|
|
203
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProRootPolicy, value_tolerance) == 16,
|
|
204
|
+
"OrbProRootPolicy.value_tolerance must be at offset 16");
|
|
205
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProRootPolicy, max_iterations) == 24,
|
|
206
|
+
"OrbProRootPolicy.max_iterations must be at offset 24");
|
|
207
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProRootPolicy, method) == 28,
|
|
208
|
+
"OrbProRootPolicy.method must be at offset 28");
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Zero an entire OrbProRootPolicy, INCLUDING its alignment padding.
|
|
212
|
+
* Start every write here — see the note above about scratch buffers.
|
|
213
|
+
*/
|
|
214
|
+
static inline void orbpro_root_policy_init(OrbProRootPolicy* value) {
|
|
215
|
+
for (size_t i = 0; i < sizeof(*value); ++i) {
|
|
216
|
+
((unsigned char*)value)[i] = 0;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Set OrbProRootPolicy.method AND clear the 3 padding byte(s)
|
|
222
|
+
* that follow it. USE THIS instead of assigning the field directly.
|
|
223
|
+
*/
|
|
224
|
+
static inline void orbpro_root_policy_set_method(OrbProRootPolicy* value, OrbProRootMethod v) {
|
|
225
|
+
value->method = (uint8_t)v;
|
|
226
|
+
((unsigned char*)value)[29] = 0;
|
|
227
|
+
((unsigned char*)value)[30] = 0;
|
|
228
|
+
((unsigned char*)value)[31] = 0;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/* ========================================================================= */
|
|
232
|
+
/* OrbProEventInterval — 56 bytes, 8-byte aligned */
|
|
233
|
+
/* ========================================================================= */
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* The interval to scan, and the filter applied to what is found. 56 bytes,
|
|
237
|
+
* 8-byte aligned.
|
|
238
|
+
*
|
|
239
|
+
* EPOCHS ARE SPLIT PAIRS: `*_jd_day` is an exactly-representable Julian day
|
|
240
|
+
* (an integer, or an integer + 0.5) and `*_seconds` is the offset from it in
|
|
241
|
+
* seconds. Do not collapse them into one double before comparing — that is
|
|
242
|
+
* the forty-microsecond quantization this pair exists to avoid.
|
|
243
|
+
*
|
|
244
|
+
* BACKWARD PROPAGATION IS NOT A MODE. It is `stop` earlier than `start`. The
|
|
245
|
+
* runner steps negatively, the consumer's propagator is asked for earlier
|
|
246
|
+
* epochs, and every hit carries `BACKWARD`. There is no second code path to
|
|
247
|
+
* keep in agreement with the first.
|
|
248
|
+
*
|
|
249
|
+
* Binary layout (derived from the IDL, not hand-written):
|
|
250
|
+
*
|
|
251
|
+
* Offset Size Field
|
|
252
|
+
* ------ ---- -----------------------------------------
|
|
253
|
+
* 0 8 start_jd_day
|
|
254
|
+
* 8 8 start_seconds
|
|
255
|
+
* 16 8 stop_jd_day
|
|
256
|
+
* 24 8 stop_seconds
|
|
257
|
+
* 32 4 max_events
|
|
258
|
+
* 36 4 max_evaluations
|
|
259
|
+
* 40 4 occurrence
|
|
260
|
+
* 44 4 component
|
|
261
|
+
* 48 4 flags
|
|
262
|
+
* 52 1 direction
|
|
263
|
+
* 53 3 (alignment padding — MUST be written as zero)
|
|
264
|
+
*/
|
|
265
|
+
typedef struct {
|
|
266
|
+
double start_jd_day; /**< Scan start: exactly-representable Julian day. */
|
|
267
|
+
double start_seconds; /**< Scan start: seconds from `start_jd_day`. */
|
|
268
|
+
double stop_jd_day; /**< Scan end: exactly-representable Julian day. May be EARLIER than the start — that is backward propagation. */
|
|
269
|
+
double stop_seconds; /**< Scan end: seconds from `stop_jd_day`. */
|
|
270
|
+
uint32_t max_events; /**< Stop after this many qualifying hits. 0 = unbounded (bounded only by the caller's hit buffer and by `max_evaluations`). */
|
|
271
|
+
uint32_t max_evaluations; /**< Hard cap on g evaluations for the whole scan, so a pathological configuration terminates with `TRUNCATED` instead of running forever. 0 = unbounded. */
|
|
272
|
+
uint32_t occurrence; /**< Report only the Nth qualifying crossing, 1-based. 0 = report all. This is GMAT's "which occurrence" on a stopping condition, and it counts crossings that pass the direction filter, not raw sign changes. */
|
|
273
|
+
uint32_t component; /**< Restrict the scan to one component index. 0xFFFFFFFF = every component. */
|
|
274
|
+
uint32_t flags; /**< EventFlags bitfield. Input flags are advisory; the runner ORs its own findings into each hit's flags. */
|
|
275
|
+
int8_t direction; /**< Crossing-direction filter applied to every component. */
|
|
276
|
+
uint8_t _reserved[3]; /**< Alignment padding at offset 53. MUST be 0. */
|
|
277
|
+
} OrbProEventInterval;
|
|
278
|
+
|
|
279
|
+
ORBPRO_ABI_STATIC_ASSERT(sizeof(OrbProEventInterval) == 56,
|
|
280
|
+
"OrbProEventInterval must be 56 bytes");
|
|
281
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventInterval, start_jd_day) == 0,
|
|
282
|
+
"OrbProEventInterval.start_jd_day must be at offset 0");
|
|
283
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventInterval, start_seconds) == 8,
|
|
284
|
+
"OrbProEventInterval.start_seconds must be at offset 8");
|
|
285
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventInterval, stop_jd_day) == 16,
|
|
286
|
+
"OrbProEventInterval.stop_jd_day must be at offset 16");
|
|
287
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventInterval, stop_seconds) == 24,
|
|
288
|
+
"OrbProEventInterval.stop_seconds must be at offset 24");
|
|
289
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventInterval, max_events) == 32,
|
|
290
|
+
"OrbProEventInterval.max_events must be at offset 32");
|
|
291
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventInterval, max_evaluations) == 36,
|
|
292
|
+
"OrbProEventInterval.max_evaluations must be at offset 36");
|
|
293
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventInterval, occurrence) == 40,
|
|
294
|
+
"OrbProEventInterval.occurrence must be at offset 40");
|
|
295
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventInterval, component) == 44,
|
|
296
|
+
"OrbProEventInterval.component must be at offset 44");
|
|
297
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventInterval, flags) == 48,
|
|
298
|
+
"OrbProEventInterval.flags must be at offset 48");
|
|
299
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventInterval, direction) == 52,
|
|
300
|
+
"OrbProEventInterval.direction must be at offset 52");
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Zero an entire OrbProEventInterval, INCLUDING its alignment padding.
|
|
304
|
+
* Start every write here — see the note above about scratch buffers.
|
|
305
|
+
*/
|
|
306
|
+
static inline void orbpro_event_interval_init(OrbProEventInterval* value) {
|
|
307
|
+
for (size_t i = 0; i < sizeof(*value); ++i) {
|
|
308
|
+
((unsigned char*)value)[i] = 0;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Set OrbProEventInterval.direction AND clear the 3 padding byte(s)
|
|
314
|
+
* that follow it. USE THIS instead of assigning the field directly.
|
|
315
|
+
*/
|
|
316
|
+
static inline void orbpro_event_interval_set_direction(OrbProEventInterval* value, OrbProCrossingDirection v) {
|
|
317
|
+
value->direction = (int8_t)v;
|
|
318
|
+
((unsigned char*)value)[53] = 0;
|
|
319
|
+
((unsigned char*)value)[54] = 0;
|
|
320
|
+
((unsigned char*)value)[55] = 0;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/* ========================================================================= */
|
|
324
|
+
/* OrbProEventHit — 48 bytes, 8-byte aligned */
|
|
325
|
+
/* ========================================================================= */
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* One refined crossing. 48 bytes, 8-byte aligned.
|
|
329
|
+
*
|
|
330
|
+
* A HIT IS A CROSSING, NOT AN INTERVAL. Apsides and node crossings are
|
|
331
|
+
* instants; eclipse and contact are intervals. Emitting crossings and pairing
|
|
332
|
+
* them by direction is total over both, whereas an interval-shaped hit puts a
|
|
333
|
+
* sentinel in half the family. Pairing is deterministic and is specified in
|
|
334
|
+
* docs/events-abi.md §Interval pairing; `EventScanSummary` carries the
|
|
335
|
+
* endpoint signs that make the pairing total.
|
|
336
|
+
*
|
|
337
|
+
* Binary layout (derived from the IDL, not hand-written):
|
|
338
|
+
*
|
|
339
|
+
* Offset Size Field
|
|
340
|
+
* ------ ---- -----------------------------------------
|
|
341
|
+
* 0 8 epoch_jd_day
|
|
342
|
+
* 8 8 epoch_seconds
|
|
343
|
+
* 16 8 value
|
|
344
|
+
* 24 4 component
|
|
345
|
+
* 28 4 iterations
|
|
346
|
+
* 32 4 evaluations
|
|
347
|
+
* 36 4 flags
|
|
348
|
+
* 40 1 direction
|
|
349
|
+
* 41 1 status
|
|
350
|
+
* 42 6 (alignment padding — MUST be written as zero)
|
|
351
|
+
*/
|
|
352
|
+
typedef struct {
|
|
353
|
+
double epoch_jd_day; /**< Refined root: exactly-representable Julian day. */
|
|
354
|
+
double epoch_seconds; /**< Refined root: seconds from `epoch_jd_day`. */
|
|
355
|
+
double value; /**< g at the reported root, in the component's declared unit. This is the RESIDUAL and it is evidence: a "converged" root with a residual far outside `value_tolerance` is a defect the consumer can see. */
|
|
356
|
+
uint32_t component; /**< Which component crossed. */
|
|
357
|
+
uint32_t iterations; /**< Refinement iterations actually taken. */
|
|
358
|
+
uint32_t evaluations; /**< g evaluations spent on this root, scan samples included. */
|
|
359
|
+
uint32_t flags; /**< EventFlags bitfield. */
|
|
360
|
+
int8_t direction; /**< The direction g crossed in. */
|
|
361
|
+
uint8_t status; /**< How the refinement ended. */
|
|
362
|
+
uint8_t _reserved[6]; /**< Alignment padding at offset 42. MUST be 0. */
|
|
363
|
+
} OrbProEventHit;
|
|
364
|
+
|
|
365
|
+
ORBPRO_ABI_STATIC_ASSERT(sizeof(OrbProEventHit) == 48,
|
|
366
|
+
"OrbProEventHit must be 48 bytes");
|
|
367
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventHit, epoch_jd_day) == 0,
|
|
368
|
+
"OrbProEventHit.epoch_jd_day must be at offset 0");
|
|
369
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventHit, epoch_seconds) == 8,
|
|
370
|
+
"OrbProEventHit.epoch_seconds must be at offset 8");
|
|
371
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventHit, value) == 16,
|
|
372
|
+
"OrbProEventHit.value must be at offset 16");
|
|
373
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventHit, component) == 24,
|
|
374
|
+
"OrbProEventHit.component must be at offset 24");
|
|
375
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventHit, iterations) == 28,
|
|
376
|
+
"OrbProEventHit.iterations must be at offset 28");
|
|
377
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventHit, evaluations) == 32,
|
|
378
|
+
"OrbProEventHit.evaluations must be at offset 32");
|
|
379
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventHit, flags) == 36,
|
|
380
|
+
"OrbProEventHit.flags must be at offset 36");
|
|
381
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventHit, direction) == 40,
|
|
382
|
+
"OrbProEventHit.direction must be at offset 40");
|
|
383
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventHit, status) == 41,
|
|
384
|
+
"OrbProEventHit.status must be at offset 41");
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Zero an entire OrbProEventHit, INCLUDING its alignment padding.
|
|
388
|
+
* Start every write here — see the note above about scratch buffers.
|
|
389
|
+
*/
|
|
390
|
+
static inline void orbpro_event_hit_init(OrbProEventHit* value) {
|
|
391
|
+
for (size_t i = 0; i < sizeof(*value); ++i) {
|
|
392
|
+
((unsigned char*)value)[i] = 0;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Set OrbProEventHit.direction AND clear the 0 padding byte(s)
|
|
398
|
+
* that follow it. USE THIS instead of assigning the field directly.
|
|
399
|
+
*/
|
|
400
|
+
static inline void orbpro_event_hit_set_direction(OrbProEventHit* value, OrbProCrossingDirection v) {
|
|
401
|
+
value->direction = (int8_t)v;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Set OrbProEventHit.status AND clear the 6 padding byte(s)
|
|
406
|
+
* that follow it. USE THIS instead of assigning the field directly.
|
|
407
|
+
*/
|
|
408
|
+
static inline void orbpro_event_hit_set_status(OrbProEventHit* value, OrbProRootStatus v) {
|
|
409
|
+
value->status = (uint8_t)v;
|
|
410
|
+
((unsigned char*)value)[42] = 0;
|
|
411
|
+
((unsigned char*)value)[43] = 0;
|
|
412
|
+
((unsigned char*)value)[44] = 0;
|
|
413
|
+
((unsigned char*)value)[45] = 0;
|
|
414
|
+
((unsigned char*)value)[46] = 0;
|
|
415
|
+
((unsigned char*)value)[47] = 0;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/* ========================================================================= */
|
|
419
|
+
/* OrbProEventScanSummary — 32 bytes, 8-byte aligned */
|
|
420
|
+
/* ========================================================================= */
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* What one component did across the whole interval. 32 bytes, 8-byte aligned.
|
|
424
|
+
*
|
|
425
|
+
* This is what makes a crossing list interpretable. Without the endpoint
|
|
426
|
+
* signs, "no hits" is ambiguous between "never in eclipse" and "in eclipse the
|
|
427
|
+
* entire time", and those are opposite answers.
|
|
428
|
+
*
|
|
429
|
+
* Binary layout (derived from the IDL, not hand-written):
|
|
430
|
+
*
|
|
431
|
+
* Offset Size Field
|
|
432
|
+
* ------ ---- -----------------------------------------
|
|
433
|
+
* 0 8 initial_value
|
|
434
|
+
* 8 8 final_value
|
|
435
|
+
* 16 4 component
|
|
436
|
+
* 20 4 crossing_count
|
|
437
|
+
* 24 4 evaluation_count
|
|
438
|
+
* 28 1 initial_sign
|
|
439
|
+
* 29 1 final_sign
|
|
440
|
+
* 30 2 (alignment padding — MUST be written as zero)
|
|
441
|
+
*/
|
|
442
|
+
typedef struct {
|
|
443
|
+
double initial_value; /**< g at the interval start, in the component's declared unit. */
|
|
444
|
+
double final_value; /**< g at the interval end. */
|
|
445
|
+
uint32_t component; /**< Which component this summarizes. */
|
|
446
|
+
uint32_t crossing_count; /**< Qualifying crossings found for this component. */
|
|
447
|
+
uint32_t evaluation_count; /**< g evaluations spent on this component. */
|
|
448
|
+
int8_t initial_sign; /**< Sign of g at the interval start. */
|
|
449
|
+
int8_t final_sign; /**< Sign of g at the interval end. */
|
|
450
|
+
uint8_t _reserved[2]; /**< Alignment padding at offset 30. MUST be 0. */
|
|
451
|
+
} OrbProEventScanSummary;
|
|
452
|
+
|
|
453
|
+
ORBPRO_ABI_STATIC_ASSERT(sizeof(OrbProEventScanSummary) == 32,
|
|
454
|
+
"OrbProEventScanSummary must be 32 bytes");
|
|
455
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventScanSummary, initial_value) == 0,
|
|
456
|
+
"OrbProEventScanSummary.initial_value must be at offset 0");
|
|
457
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventScanSummary, final_value) == 8,
|
|
458
|
+
"OrbProEventScanSummary.final_value must be at offset 8");
|
|
459
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventScanSummary, component) == 16,
|
|
460
|
+
"OrbProEventScanSummary.component must be at offset 16");
|
|
461
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventScanSummary, crossing_count) == 20,
|
|
462
|
+
"OrbProEventScanSummary.crossing_count must be at offset 20");
|
|
463
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventScanSummary, evaluation_count) == 24,
|
|
464
|
+
"OrbProEventScanSummary.evaluation_count must be at offset 24");
|
|
465
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventScanSummary, initial_sign) == 28,
|
|
466
|
+
"OrbProEventScanSummary.initial_sign must be at offset 28");
|
|
467
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventScanSummary, final_sign) == 29,
|
|
468
|
+
"OrbProEventScanSummary.final_sign must be at offset 29");
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Zero an entire OrbProEventScanSummary, INCLUDING its alignment padding.
|
|
472
|
+
* Start every write here — see the note above about scratch buffers.
|
|
473
|
+
*/
|
|
474
|
+
static inline void orbpro_event_scan_summary_init(OrbProEventScanSummary* value) {
|
|
475
|
+
for (size_t i = 0; i < sizeof(*value); ++i) {
|
|
476
|
+
((unsigned char*)value)[i] = 0;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Set OrbProEventScanSummary.initial_sign AND clear the 0 padding byte(s)
|
|
482
|
+
* that follow it. USE THIS instead of assigning the field directly.
|
|
483
|
+
*/
|
|
484
|
+
static inline void orbpro_event_scan_summary_set_initial_sign(OrbProEventScanSummary* value, OrbProSign v) {
|
|
485
|
+
value->initial_sign = (int8_t)v;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Set OrbProEventScanSummary.final_sign AND clear the 2 padding byte(s)
|
|
490
|
+
* that follow it. USE THIS instead of assigning the field directly.
|
|
491
|
+
*/
|
|
492
|
+
static inline void orbpro_event_scan_summary_set_final_sign(OrbProEventScanSummary* value, OrbProSign v) {
|
|
493
|
+
value->final_sign = (int8_t)v;
|
|
494
|
+
((unsigned char*)value)[30] = 0;
|
|
495
|
+
((unsigned char*)value)[31] = 0;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/* ========================================================================= */
|
|
499
|
+
/* OrbProEventStateRequest — 16 bytes, 4-byte aligned */
|
|
500
|
+
/* ========================================================================= */
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* What the locator wants evaluated next — the guest-to-consumer half of the
|
|
504
|
+
* pull protocol. 16 bytes, 4-byte aligned.
|
|
505
|
+
*
|
|
506
|
+
* The consumer reads this, propagates the requested epochs through whatever
|
|
507
|
+
* module is wired to the propagator port, and returns the states through
|
|
508
|
+
* `plugin_event_supply`. The consumer chooses NOTHING: not the epochs, not
|
|
509
|
+
* the order, not when the scan ends.
|
|
510
|
+
*
|
|
511
|
+
* Binary layout (derived from the IDL, not hand-written):
|
|
512
|
+
*
|
|
513
|
+
* Offset Size Field
|
|
514
|
+
* ------ ---- -----------------------------------------
|
|
515
|
+
* 0 4 epoch_count
|
|
516
|
+
* 4 4 object_count
|
|
517
|
+
* 8 1 reference_frame
|
|
518
|
+
* 9 3 (alignment padding — MUST be written as zero)
|
|
519
|
+
* 12 4 flags
|
|
520
|
+
*/
|
|
521
|
+
typedef struct {
|
|
522
|
+
uint32_t epoch_count; /**< How many epochs were written to the caller's epoch buffer. The buffer holds `2 * epoch_count` doubles: (jd_day, seconds) pairs, in scan order. */
|
|
523
|
+
uint32_t object_count; /**< How many objects each epoch must be evaluated for. Every configured object is evaluated at EVERY requested epoch — that is what makes a multi-spacecraft (Formation) stop synchronized by construction rather than by the consumer remembering to keep the epochs aligned. */
|
|
524
|
+
uint8_t reference_frame; /**< The frame the returned states must be expressed in. An `OrbProReferenceFrame` value; the consumer converts through the frames port if its propagator emits another frame, and a consumer that cannot must fail loudly rather than supply a differently-framed state. */
|
|
525
|
+
uint8_t _reserved[3]; /**< Alignment padding at offset 9. MUST be 0. */
|
|
526
|
+
uint32_t flags; /**< EventFlags bitfield describing the phase this request belongs to (a coarse scan batch versus a single refinement abscissa). */
|
|
527
|
+
} OrbProEventStateRequest;
|
|
528
|
+
|
|
529
|
+
ORBPRO_ABI_STATIC_ASSERT(sizeof(OrbProEventStateRequest) == 16,
|
|
530
|
+
"OrbProEventStateRequest must be 16 bytes");
|
|
531
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventStateRequest, epoch_count) == 0,
|
|
532
|
+
"OrbProEventStateRequest.epoch_count must be at offset 0");
|
|
533
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventStateRequest, object_count) == 4,
|
|
534
|
+
"OrbProEventStateRequest.object_count must be at offset 4");
|
|
535
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventStateRequest, reference_frame) == 8,
|
|
536
|
+
"OrbProEventStateRequest.reference_frame must be at offset 8");
|
|
537
|
+
ORBPRO_ABI_STATIC_ASSERT(offsetof(OrbProEventStateRequest, flags) == 12,
|
|
538
|
+
"OrbProEventStateRequest.flags must be at offset 12");
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Zero an entire OrbProEventStateRequest, INCLUDING its alignment padding.
|
|
542
|
+
* Start every write here — see the note above about scratch buffers.
|
|
543
|
+
*/
|
|
544
|
+
static inline void orbpro_event_state_request_init(OrbProEventStateRequest* value) {
|
|
545
|
+
for (size_t i = 0; i < sizeof(*value); ++i) {
|
|
546
|
+
((unsigned char*)value)[i] = 0;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Set OrbProEventStateRequest.reference_frame AND clear the 3 padding byte(s)
|
|
552
|
+
* that follow it. USE THIS instead of assigning the field directly.
|
|
553
|
+
*/
|
|
554
|
+
static inline void orbpro_event_state_request_set_reference_frame(OrbProEventStateRequest* value, uint8_t v) {
|
|
555
|
+
value->reference_frame = (uint8_t)v;
|
|
556
|
+
((unsigned char*)value)[9] = 0;
|
|
557
|
+
((unsigned char*)value)[10] = 0;
|
|
558
|
+
((unsigned char*)value)[11] = 0;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
#ifdef __cplusplus
|
|
562
|
+
} /* extern "C" */
|
|
563
|
+
#endif
|
|
564
|
+
|
|
565
|
+
#endif /* ORBPRO_EVENTS_ABI_H */
|
|
@@ -44,6 +44,23 @@ typedef enum {
|
|
|
44
44
|
ORBPRO_FRAME_ECEF = 3,
|
|
45
45
|
ORBPRO_FRAME_MCI = 4,
|
|
46
46
|
ORBPRO_FRAME_MCMF = 5,
|
|
47
|
+
ORBPRO_FRAME_MJ2000EC = 6, /**< Mean ecliptic and equinox of J2000. (The mean EQUATOR and equinox of J2000 is J2000 = 1 and is not repeated here.) */
|
|
48
|
+
ORBPRO_FRAME_MOD = 7, /**< Mean equator of date. */
|
|
49
|
+
ORBPRO_FRAME_TOD = 8, /**< True equator of date. */
|
|
50
|
+
ORBPRO_FRAME_MOE = 9, /**< Mean ecliptic of date. */
|
|
51
|
+
ORBPRO_FRAME_TOE = 10, /**< True ecliptic of date. */
|
|
52
|
+
ORBPRO_FRAME_BODY_FIXED = 11, /**< Axes rotating with a named body, per its published rotation elements. */
|
|
53
|
+
ORBPRO_FRAME_BODY_INERTIAL = 12, /**< Non-rotating axes on a named body's equator and prime meridian. */
|
|
54
|
+
ORBPRO_FRAME_OBJECT_REFERENCED = 13, /**< Axes built from the relative geometry of two named objects. The three live RTN triads — RIC, RSW and RTN — are THIS member with an axes spec, not three members; so are LVLH and VVLH. */
|
|
55
|
+
ORBPRO_FRAME_LOCAL_ALIGNED_CONSTRAINED = 14, /**< Axes built by aligning one vector and constraining a second. */
|
|
56
|
+
ORBPRO_FRAME_EQUATOR = 15, /**< A named body's equatorial plane at the epoch. */
|
|
57
|
+
ORBPRO_FRAME_GSE = 16, /**< Solar-ecliptic magnetospheric (GSE). */
|
|
58
|
+
ORBPRO_FRAME_GSM = 17, /**< Solar magnetospheric (GSM). */
|
|
59
|
+
ORBPRO_FRAME_TOPOCENTRIC = 18, /**< Local horizon axes at a surface site. */
|
|
60
|
+
ORBPRO_FRAME_BODY_SPIN_SUN = 19, /**< Axes fixed by a body's spin axis and its direction to the Sun. */
|
|
61
|
+
ORBPRO_FRAME_SPICE_DEFINED = 20, /**< Axes declared by a loaded ephemeris/orientation kernel. */
|
|
62
|
+
ORBPRO_FRAME_MOD_FK5 = 21, /**< LEGACY, retained and NAMED rather than left implicit: mean equator of date on the IAU-76/FK5 theory. Differs from MOD at the milliarcsecond level; the two are not interchangeable. */
|
|
63
|
+
ORBPRO_FRAME_TOD_FK5 = 22, /**< LEGACY, retained and NAMED: true equator of date on IAU-76/FK5. */
|
|
47
64
|
} OrbProReferenceFrame;
|
|
48
65
|
|
|
49
66
|
/* ========================================================================= */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "space-data-module-sdk",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.16",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Module SDK for building, validating, signing, and deploying WebAssembly modules on the Space Data Network.",
|
|
6
6
|
"type": "module",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"./include/*": "./include/*",
|
|
34
34
|
"./generated/propagator-abi": "./src/generated/orbpro/propagator-abi.js",
|
|
35
|
+
"./conformance": "./src/conformance/index.js",
|
|
35
36
|
"./compiler": "./src/compiler/index.js",
|
|
36
37
|
"./compiler/emception": "./src/compiler/emception.js",
|
|
37
38
|
"./bundle": "./src/bundle/index.js",
|
|
@@ -67,6 +68,7 @@
|
|
|
67
68
|
"default": "./src/host/moduleFlatbufferStreamPump.js"
|
|
68
69
|
},
|
|
69
70
|
"./testing": "./src/testing/index.js",
|
|
71
|
+
"./testing/isomorphic": "./src/testing/isomorphicHarness.js",
|
|
70
72
|
"./standards": {
|
|
71
73
|
"browser": "./src/standards/browser.js",
|
|
72
74
|
"default": "./src/standards/index.js"
|
|
@@ -94,18 +96,26 @@
|
|
|
94
96
|
"test:parity-gate-lanes": "SPACE_DATA_MODULE_SDK_ENABLE_PARITY_GATE=1 node --test test/parity-gate-lanes.test.js",
|
|
95
97
|
"gate:parity": "node ./bin/space-data-module.js parity-gate",
|
|
96
98
|
"gate:parity-negative-control": "node ./bin/space-data-module.js parity-gate --gate-manifest ./parity/negative-control.json --expect-fail",
|
|
99
|
+
"conformance:self-test": "node ./bin/space-data-module.js conformance propagator --self-test",
|
|
97
100
|
"test:stream-ingest": "node --test test/runtime-host-stream-ingest.test.js",
|
|
98
101
|
"test:module-stream": "node --test test/module-flatbuffer-stream-pump.test.js",
|
|
99
102
|
"benchmark:stream-1gib": "SPACE_DATA_MODULE_SDK_ENABLE_1GB_STREAM_TEST=1 node --test test/runtime-host-stream-ingest.test.js",
|
|
100
103
|
"benchmark:module-stream-1gib": "SPACE_DATA_MODULE_SDK_ENABLE_1GB_MODULE_STREAM_TEST=1 node --test test/module-flatbuffer-stream-pump.test.js",
|
|
101
104
|
"start:lab": "node ./lab/server.js",
|
|
102
|
-
"
|
|
105
|
+
"build:docs": "node scripts/build-docs.mjs",
|
|
106
|
+
"check:docs": "node scripts/build-docs.mjs --check && node scripts/check-docs-links.mjs",
|
|
107
|
+
"check:docs-links": "node scripts/check-docs-links.mjs",
|
|
108
|
+
"check:nav": "node scripts/check-sdn-stack-nav.mjs module-sdk docs/index.html docs/families/propagator.html docs/families/rf.html docs/byo-wasm-quickstart.html docs/conformance.html docs/protect-and-sign.html docs/publication-submission.html docs/styles.css",
|
|
103
109
|
"check:compliance": "node ./bin/space-data-module.js check --repo-root .",
|
|
104
110
|
"check:generated-bindings": "node scripts/check-generated-bindings.mjs",
|
|
105
111
|
"check:propagator-abi": "node scripts/check-propagator-abi.mjs",
|
|
112
|
+
"check:reference-frame": "node scripts/check-reference-frame-uniqueness.mjs",
|
|
106
113
|
"generate:propagator-abi": "node scripts/generate-propagator-abi.mjs",
|
|
107
114
|
"generate:vectors": "node ./examples/single-file-bundle/generate-vectors.mjs",
|
|
108
|
-
"prepublishOnly": "npm test && npm run check:compliance"
|
|
115
|
+
"prepublishOnly": "npm test && npm run check:compliance",
|
|
116
|
+
"playground:build": "node ./playground/build.mjs",
|
|
117
|
+
"playground:serve": "node ./playground/build.mjs && node ./playground/server.mjs",
|
|
118
|
+
"playground:gate": "node ./playground/build.mjs && node ./playground/test/browser-gate.mjs"
|
|
109
119
|
},
|
|
110
120
|
"dependencies": {
|
|
111
121
|
"flatbuffers": "^25.9.23",
|
|
@@ -113,7 +123,7 @@
|
|
|
113
123
|
"flatsql": "^2.0.0",
|
|
114
124
|
"hd-wallet-wasm": "2.0.28",
|
|
115
125
|
"sdn-emception": "1.0.0",
|
|
116
|
-
"spacedatastandards.org": "
|
|
126
|
+
"spacedatastandards.org": "1.200.0"
|
|
117
127
|
},
|
|
118
128
|
"devDependencies": {
|
|
119
129
|
"esbuild": "^0.28.0",
|
|
@@ -122,4 +132,4 @@
|
|
|
122
132
|
"engines": {
|
|
123
133
|
"node": ">=20.0.0"
|
|
124
134
|
}
|
|
125
|
-
}
|
|
135
|
+
}
|