@ksp-gonogo/sitrep-sdk 1.0.0-rc.45 → 1.0.0
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/README.md +48 -93
- package/dist/__generated__/command-map.d.ts +247 -2
- package/dist/__generated__/command-map.d.ts.map +1 -1
- package/dist/__generated__/command-map.js +91 -19
- package/dist/__generated__/command-map.js.map +1 -1
- package/dist/__generated__/contract.d.ts +3062 -352
- package/dist/__generated__/contract.d.ts.map +1 -1
- package/dist/__generated__/contract.js +187 -3
- package/dist/__generated__/contract.js.map +1 -1
- package/dist/__generated__/delay-roles.d.ts +2 -2
- package/dist/__generated__/delay-roles.d.ts.map +1 -1
- package/dist/__generated__/delay-roles.js +12 -0
- package/dist/__generated__/delay-roles.js.map +1 -1
- package/dist/__generated__/error-codes.d.ts +11 -11
- package/dist/__generated__/error-codes.d.ts.map +1 -1
- package/dist/__generated__/error-codes.js +12 -12
- package/dist/__generated__/error-codes.js.map +1 -1
- package/dist/__generated__/frames.d.ts +40 -4
- package/dist/__generated__/frames.d.ts.map +1 -1
- package/dist/__generated__/frames.js +20 -4
- package/dist/__generated__/frames.js.map +1 -1
- package/dist/__generated__/reckonability.d.ts +3 -1
- package/dist/__generated__/reckonability.d.ts.map +1 -1
- package/dist/__generated__/reckonability.js +1 -1
- package/dist/__generated__/reckonability.js.map +1 -1
- package/dist/__generated__/sample-kinds.d.ts +18 -2
- package/dist/__generated__/sample-kinds.d.ts.map +1 -1
- package/dist/__generated__/sample-kinds.js +18 -2
- package/dist/__generated__/sample-kinds.js.map +1 -1
- package/dist/__generated__/topic-map.d.ts +41 -17
- package/dist/__generated__/topic-map.d.ts.map +1 -1
- package/dist/__generated__/topic-map.js +16 -3
- package/dist/__generated__/topic-map.js.map +1 -1
- package/dist/__generated__/units.d.ts +247 -6
- package/dist/__generated__/units.d.ts.map +1 -1
- package/dist/__generated__/units.js +949 -76
- package/dist/__generated__/units.js.map +1 -1
- package/dist/api/command-rejection.d.ts +2 -2
- package/dist/api/command-rejection.js +1 -1
- package/dist/api/contribution-slots.d.ts +122 -21
- package/dist/api/contribution-slots.d.ts.map +1 -1
- package/dist/api/contribution-slots.js +4 -4
- package/dist/api/contribution-slots.js.map +1 -1
- package/dist/api/error-codes.d.ts +3 -2
- package/dist/api/error-codes.d.ts.map +1 -1
- package/dist/api/error-codes.js +3 -2
- package/dist/api/error-codes.js.map +1 -1
- package/dist/api/framework-reads.d.ts +2 -2
- package/dist/api/framework-reads.d.ts.map +1 -1
- package/dist/api/framework-reads.js +6 -1
- package/dist/api/framework-reads.js.map +1 -1
- package/dist/api/host.d.ts +14 -6
- package/dist/api/host.d.ts.map +1 -1
- package/dist/api/host.js.map +1 -1
- package/dist/api/index.d.ts +70 -60
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +66 -54
- package/dist/api/index.js.map +1 -1
- package/dist/api/logger-contract.d.ts +2 -1
- package/dist/api/logger-contract.d.ts.map +1 -1
- package/dist/api/logger.d.ts +6 -3
- package/dist/api/logger.d.ts.map +1 -1
- package/dist/api/logger.js +6 -3
- package/dist/api/logger.js.map +1 -1
- package/dist/api/part-panels.d.ts +143 -0
- package/dist/api/part-panels.d.ts.map +1 -0
- package/dist/api/part-panels.js +104 -0
- package/dist/api/part-panels.js.map +1 -0
- package/dist/api/plot-layers.d.ts +1 -1
- package/dist/api/plot-layers.js +1 -1
- package/dist/api/registry.d.ts +4 -2
- package/dist/api/registry.d.ts.map +1 -1
- package/dist/api/registry.js +4 -2
- package/dist/api/registry.js.map +1 -1
- package/dist/api/settings/store.d.ts +1 -1
- package/dist/api/settings/store.d.ts.map +1 -1
- package/dist/api/settings/store.js +7 -2
- package/dist/api/settings/store.js.map +1 -1
- package/dist/api/slots.d.ts +150 -70
- package/dist/api/slots.d.ts.map +1 -1
- package/dist/api/station-brokers.d.ts +24 -15
- package/dist/api/station-brokers.d.ts.map +1 -1
- package/dist/api/station-brokers.js +24 -15
- package/dist/api/station-brokers.js.map +1 -1
- package/dist/api/tiny-size.d.ts +2 -1
- package/dist/api/tiny-size.d.ts.map +1 -1
- package/dist/api/tiny-size.js +2 -1
- package/dist/api/tiny-size.js.map +1 -1
- package/dist/api/tone.d.ts +1 -1
- package/dist/api/transport.d.ts +9 -0
- package/dist/api/transport.d.ts.map +1 -1
- package/dist/api/types.d.ts +356 -68
- package/dist/api/types.d.ts.map +1 -1
- package/dist/api/uplink-banner.d.ts +113 -0
- package/dist/api/uplink-banner.d.ts.map +1 -0
- package/dist/api/uplink-banner.js +69 -0
- package/dist/api/uplink-banner.js.map +1 -0
- package/dist/api/uplink-handles.d.ts +2 -12
- package/dist/api/uplink-handles.d.ts.map +1 -1
- package/dist/api/uplink-handles.js +2 -1
- package/dist/api/uplink-handles.js.map +1 -1
- package/dist/binary-frame.d.ts +4 -4
- package/dist/binary-frame.js +2 -2
- package/dist/combine-readings.d.ts +4 -3
- package/dist/combine-readings.d.ts.map +1 -1
- package/dist/combine-readings.js +4 -3
- package/dist/combine-readings.js.map +1 -1
- package/dist/command-delay.d.ts +81 -2
- package/dist/command-delay.d.ts.map +1 -1
- package/dist/command-delay.js +51 -8
- package/dist/command-delay.js.map +1 -1
- package/dist/command-value.d.ts +98 -0
- package/dist/command-value.d.ts.map +1 -0
- package/dist/command-value.js +87 -0
- package/dist/command-value.js.map +1 -0
- package/dist/commands.d.ts +1 -1
- package/dist/commands.d.ts.map +1 -1
- package/dist/compat-versions.d.ts +1 -1
- package/dist/compat-versions.d.ts.map +1 -1
- package/dist/compat-versions.js +3 -3
- package/dist/compat-versions.js.map +1 -1
- package/dist/contract-enum-names.d.ts +2 -2
- package/dist/contract-enum-names.js +2 -2
- package/dist/contract-tags.d.ts +33 -2
- package/dist/contract-tags.d.ts.map +1 -1
- package/dist/contract-tags.js +54 -5
- package/dist/contract-tags.js.map +1 -1
- package/dist/data-rate.d.ts +84 -0
- package/dist/data-rate.d.ts.map +1 -0
- package/dist/data-rate.js +133 -0
- package/dist/data-rate.js.map +1 -0
- package/dist/delay-roles.d.ts +14 -1
- package/dist/delay-roles.d.ts.map +1 -1
- package/dist/delay-roles.js +5 -1
- package/dist/delay-roles.js.map +1 -1
- package/dist/dock-markers.d.ts +126 -0
- package/dist/dock-markers.d.ts.map +1 -0
- package/dist/dock-markers.js +100 -0
- package/dist/dock-markers.js.map +1 -0
- package/dist/envelope.d.ts +2 -2
- package/dist/envelope.d.ts.map +1 -1
- package/dist/flight/types.d.ts +31 -2
- package/dist/flight/types.d.ts.map +1 -1
- package/dist/flight/types.js.map +1 -1
- package/dist/frames/index.d.ts +1 -4
- package/dist/frames/index.d.ts.map +1 -1
- package/dist/frames/index.js +0 -3
- package/dist/frames/index.js.map +1 -1
- package/dist/go-no-go-countdown.d.ts +65 -0
- package/dist/go-no-go-countdown.d.ts.map +1 -0
- package/dist/go-no-go-countdown.js +71 -0
- package/dist/go-no-go-countdown.js.map +1 -0
- package/dist/index.d.ts +13 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/ksp-enum-names.d.ts +35 -4
- package/dist/ksp-enum-names.d.ts.map +1 -1
- package/dist/ksp-enum-names.js +31 -4
- package/dist/ksp-enum-names.js.map +1 -1
- package/dist/locked.d.ts +1 -1
- package/dist/locked.js +1 -1
- package/dist/media/delayed-playout-buffer.d.ts +29 -4
- package/dist/media/delayed-playout-buffer.d.ts.map +1 -1
- package/dist/media/delayed-playout-buffer.js +12 -5
- package/dist/media/delayed-playout-buffer.js.map +1 -1
- package/dist/media/encoded-frame-delay.d.ts +21 -16
- package/dist/media/encoded-frame-delay.d.ts.map +1 -1
- package/dist/media/encoded-frame-delay.js +21 -14
- package/dist/media/encoded-frame-delay.js.map +1 -1
- package/dist/media/frame-delay.d.ts +119 -5
- package/dist/media/frame-delay.d.ts.map +1 -1
- package/dist/media/frame-delay.js +201 -15
- package/dist/media/frame-delay.js.map +1 -1
- package/dist/media/frame-stamp-timeline.d.ts +119 -0
- package/dist/media/frame-stamp-timeline.d.ts.map +1 -0
- package/dist/media/frame-stamp-timeline.js +194 -0
- package/dist/media/frame-stamp-timeline.js.map +1 -0
- package/dist/media/index.d.ts +4 -3
- package/dist/media/index.d.ts.map +1 -1
- package/dist/media/index.js +1 -1
- package/dist/media/index.js.map +1 -1
- package/dist/media/radio-support.d.ts +8 -7
- package/dist/media/radio-support.d.ts.map +1 -1
- package/dist/media/radio-support.js +5 -6
- package/dist/media/radio-support.js.map +1 -1
- package/dist/media/worker/delay-worker-client.d.ts +27 -1
- package/dist/media/worker/delay-worker-client.d.ts.map +1 -1
- package/dist/media/worker/delay-worker-client.js +53 -5
- package/dist/media/worker/delay-worker-client.js.map +1 -1
- package/dist/media/worker/delay-worker.d.ts +45 -8
- package/dist/media/worker/delay-worker.d.ts.map +1 -1
- package/dist/media/worker/delay-worker.js +644 -56
- package/dist/media/worker/delay-worker.js.map +4 -4
- package/dist/media/worker/frame-delay-report.d.ts +25 -0
- package/dist/media/worker/frame-delay-report.d.ts.map +1 -0
- package/dist/media/worker/frame-delay-report.js +112 -0
- package/dist/media/worker/frame-delay-report.js.map +1 -0
- package/dist/media/worker/lead-limit-report.d.ts +13 -0
- package/dist/media/worker/lead-limit-report.d.ts.map +1 -0
- package/dist/media/worker/lead-limit-report.js +19 -0
- package/dist/media/worker/lead-limit-report.js.map +1 -0
- package/dist/media/worker/presentation-pacer.d.ts +70 -1
- package/dist/media/worker/presentation-pacer.d.ts.map +1 -1
- package/dist/media/worker/presentation-pacer.js +167 -9
- package/dist/media/worker/presentation-pacer.js.map +1 -1
- package/dist/media/worker/worker-delay-clock.d.ts +4 -5
- package/dist/media/worker/worker-delay-clock.d.ts.map +1 -1
- package/dist/media/worker/worker-delay-clock.js +6 -2
- package/dist/media/worker/worker-delay-clock.js.map +1 -1
- package/dist/perf/PerfBudget.d.ts +2 -2
- package/dist/perf/PerfBudget.js +2 -2
- package/dist/rail-tags.d.ts +7 -0
- package/dist/rail-tags.d.ts.map +1 -1
- package/dist/rail-tags.js.map +1 -1
- package/dist/raw-field-split.d.ts +1 -1
- package/dist/raw-field-split.js +1 -1
- package/dist/reading.d.ts +6 -6
- package/dist/reading.js +5 -5
- package/dist/reads-index.json +446 -37
- package/dist/resource-transfer.d.ts +177 -0
- package/dist/resource-transfer.d.ts.map +1 -0
- package/dist/resource-transfer.js +190 -0
- package/dist/resource-transfer.js.map +1 -0
- package/dist/runtime-topic-registry.d.ts +2 -2
- package/dist/runtime-topic-registry.d.ts.map +1 -1
- package/dist/runtime-topic-registry.js +23 -2
- package/dist/runtime-topic-registry.js.map +1 -1
- package/dist/sample-step-tracker.d.ts +17 -0
- package/dist/sample-step-tracker.d.ts.map +1 -0
- package/dist/sample-step-tracker.js +38 -0
- package/dist/sample-step-tracker.js.map +1 -0
- package/dist/sha256-fallback.d.ts +6 -0
- package/dist/sha256-fallback.d.ts.map +1 -0
- package/dist/sha256-fallback.js +68 -0
- package/dist/sha256-fallback.js.map +1 -0
- package/dist/spine/arrival-deadline.d.ts +7 -0
- package/dist/spine/arrival-deadline.d.ts.map +1 -1
- package/dist/spine/arrival-deadline.js +12 -0
- package/dist/spine/arrival-deadline.js.map +1 -1
- package/dist/spine/bound-command.d.ts +58 -0
- package/dist/spine/bound-command.d.ts.map +1 -0
- package/dist/spine/bound-command.js +162 -0
- package/dist/spine/bound-command.js.map +1 -0
- package/dist/spine/capability-lock.d.ts +6 -1
- package/dist/spine/capability-lock.d.ts.map +1 -1
- package/dist/spine/capability-lock.js +56 -5
- package/dist/spine/capability-lock.js.map +1 -1
- package/dist/spine/catalog-fallback.d.ts +28 -0
- package/dist/spine/catalog-fallback.d.ts.map +1 -0
- package/dist/spine/catalog-fallback.js +120 -0
- package/dist/spine/catalog-fallback.js.map +1 -0
- package/dist/spine/celestial-facts.d.ts.map +1 -1
- package/dist/spine/celestial-facts.js +5 -2
- package/dist/spine/celestial-facts.js.map +1 -1
- package/dist/spine/centre-commands.d.ts +84 -0
- package/dist/spine/centre-commands.d.ts.map +1 -0
- package/dist/spine/centre-commands.js +236 -0
- package/dist/spine/centre-commands.js.map +1 -0
- package/dist/spine/client-reading.js +1 -1
- package/dist/spine/client-timeline.d.ts +48 -1
- package/dist/spine/client-timeline.d.ts.map +1 -1
- package/dist/spine/client-timeline.js +151 -3
- package/dist/spine/client-timeline.js.map +1 -1
- package/dist/spine/client.d.ts +154 -4
- package/dist/spine/client.d.ts.map +1 -1
- package/dist/spine/client.js +530 -34
- package/dist/spine/client.js.map +1 -1
- package/dist/spine/command-gate.d.ts +8 -0
- package/dist/spine/command-gate.d.ts.map +1 -1
- package/dist/spine/command-gate.js +36 -3
- package/dist/spine/command-gate.js.map +1 -1
- package/dist/spine/command-outcomes.d.ts +60 -0
- package/dist/spine/command-outcomes.d.ts.map +1 -0
- package/dist/spine/command-outcomes.js +256 -0
- package/dist/spine/command-outcomes.js.map +1 -0
- package/dist/spine/connectivity-history.d.ts +5 -3
- package/dist/spine/connectivity-history.d.ts.map +1 -1
- package/dist/spine/connectivity-history.js.map +1 -1
- package/dist/spine/context.d.ts +62 -11
- package/dist/spine/context.d.ts.map +1 -1
- package/dist/spine/context.js +125 -39
- package/dist/spine/context.js.map +1 -1
- package/dist/spine/core-reckoners.d.ts.map +1 -1
- package/dist/spine/core-reckoners.js +16 -39
- package/dist/spine/core-reckoners.js.map +1 -1
- package/dist/spine/delay-authority-context.d.ts +5 -0
- package/dist/spine/delay-authority-context.d.ts.map +1 -0
- package/dist/spine/delay-authority-context.js +7 -0
- package/dist/spine/delay-authority-context.js.map +1 -0
- package/dist/spine/delay-authority.d.ts +76 -1
- package/dist/spine/delay-authority.d.ts.map +1 -1
- package/dist/spine/delay-authority.js +217 -3
- package/dist/spine/delay-authority.js.map +1 -1
- package/dist/spine/delay-estimate.d.ts +41 -0
- package/dist/spine/delay-estimate.d.ts.map +1 -0
- package/dist/spine/delay-estimate.js +70 -0
- package/dist/spine/delay-estimate.js.map +1 -0
- package/dist/spine/delta-v-budget.js +2 -2
- package/dist/spine/delta-v-budget.js.map +1 -1
- package/dist/spine/dv-stage-resources.d.ts +32 -17
- package/dist/spine/dv-stage-resources.d.ts.map +1 -1
- package/dist/spine/dv-stage-resources.js +44 -37
- package/dist/spine/dv-stage-resources.js.map +1 -1
- package/dist/spine/index.d.ts +7 -1
- package/dist/spine/index.d.ts.map +1 -1
- package/dist/spine/index.js +11 -5
- package/dist/spine/index.js.map +1 -1
- package/dist/spine/kepler-reckoning.d.ts +56 -0
- package/dist/spine/kepler-reckoning.d.ts.map +1 -1
- package/dist/spine/kepler-reckoning.js +179 -3
- package/dist/spine/kepler-reckoning.js.map +1 -1
- package/dist/spine/kepler.d.ts +1 -1
- package/dist/spine/kepler.js +1 -1
- package/dist/spine/known-holds.d.ts +8 -0
- package/dist/spine/known-holds.d.ts.map +1 -0
- package/dist/spine/known-holds.js +78 -0
- package/dist/spine/known-holds.js.map +1 -0
- package/dist/spine/lagrange.d.ts +9 -34
- package/dist/spine/lagrange.d.ts.map +1 -1
- package/dist/spine/lagrange.js +4 -24
- package/dist/spine/lagrange.js.map +1 -1
- package/dist/spine/lifecycle.d.ts +21 -0
- package/dist/spine/lifecycle.d.ts.map +1 -1
- package/dist/spine/lifecycle.js.map +1 -1
- package/dist/spine/lock-scope.d.ts +2 -2
- package/dist/spine/map-topic.d.ts +3 -3
- package/dist/spine/map-topic.js +3 -3
- package/dist/spine/never-reckonable.js +1 -1
- package/dist/spine/never-reckonable.js.map +1 -1
- package/dist/spine/orbit-patches.d.ts +6 -4
- package/dist/spine/orbit-patches.d.ts.map +1 -1
- package/dist/spine/orbit-patches.js +45 -10
- package/dist/spine/orbit-patches.js.map +1 -1
- package/dist/spine/orbital-solve.d.ts +1 -1
- package/dist/spine/orbital-solve.d.ts.map +1 -1
- package/dist/spine/orbital-solve.js +35 -0
- package/dist/spine/orbital-solve.js.map +1 -1
- package/dist/spine/powered-reckoning.d.ts +5 -0
- package/dist/spine/powered-reckoning.d.ts.map +1 -1
- package/dist/spine/powered-reckoning.js.map +1 -1
- package/dist/spine/processorEvaluator.d.ts +29 -0
- package/dist/spine/processorEvaluator.d.ts.map +1 -1
- package/dist/spine/processorEvaluator.js +94 -71
- package/dist/spine/processorEvaluator.js.map +1 -1
- package/dist/spine/processors.d.ts +56 -4
- package/dist/spine/processors.d.ts.map +1 -1
- package/dist/spine/processors.js +110 -0
- package/dist/spine/processors.js.map +1 -1
- package/dist/spine/rail-registry.d.ts +1 -1
- package/dist/spine/rail-registry.d.ts.map +1 -1
- package/dist/spine/reckoner-generation.d.ts +5 -0
- package/dist/spine/reckoner-generation.d.ts.map +1 -0
- package/dist/spine/reckoner-generation.js +10 -0
- package/dist/spine/reckoner-generation.js.map +1 -0
- package/dist/spine/reckoners.d.ts.map +1 -1
- package/dist/spine/reckoners.js +3 -0
- package/dist/spine/reckoners.js.map +1 -1
- package/dist/spine/replay-session-controller.d.ts +1 -1
- package/dist/spine/replay-session-controller.d.ts.map +1 -1
- package/dist/spine/replay-session-controller.js +4 -6
- package/dist/spine/replay-session-controller.js.map +1 -1
- package/dist/spine/resolve-tracked.d.ts +20 -2
- package/dist/spine/resolve-tracked.d.ts.map +1 -1
- package/dist/spine/resolve-tracked.js +32 -2
- package/dist/spine/resolve-tracked.js.map +1 -1
- package/dist/spine/send-status.d.ts +2 -0
- package/dist/spine/send-status.d.ts.map +1 -1
- package/dist/spine/send-status.js.map +1 -1
- package/dist/spine/settings-registry.d.ts +7 -0
- package/dist/spine/settings-registry.d.ts.map +1 -1
- package/dist/spine/settings-registry.js.map +1 -1
- package/dist/spine/slot-ids.d.ts +1 -1
- package/dist/spine/slot-ids.d.ts.map +1 -1
- package/dist/spine/slot-ids.js +6 -3
- package/dist/spine/slot-ids.js.map +1 -1
- package/dist/spine/space-center-state.d.ts +17 -9
- package/dist/spine/space-center-state.d.ts.map +1 -1
- package/dist/spine/space-center-state.js +14 -15
- package/dist/spine/space-center-state.js.map +1 -1
- package/dist/spine/stage-countdown-store.d.ts +38 -0
- package/dist/spine/stage-countdown-store.d.ts.map +1 -0
- package/dist/spine/stage-countdown-store.js +53 -0
- package/dist/spine/stage-countdown-store.js.map +1 -0
- package/dist/spine/stream-status.d.ts +3 -3
- package/dist/spine/stream-status.js +3 -3
- package/dist/spine/subscribe-read.d.ts +1 -1
- package/dist/spine/subscribe-read.js +2 -2
- package/dist/spine/system-state.d.ts +13 -13
- package/dist/spine/system-state.d.ts.map +1 -1
- package/dist/spine/system-state.js +18 -18
- package/dist/spine/system-state.js.map +1 -1
- package/dist/spine/timeline-store.d.ts +304 -113
- package/dist/spine/timeline-store.d.ts.map +1 -1
- package/dist/spine/timeline-store.js +921 -223
- package/dist/spine/timeline-store.js.map +1 -1
- package/dist/spine/uplink-clients.d.ts +32 -16
- package/dist/spine/uplink-clients.d.ts.map +1 -1
- package/dist/spine/uplink-clients.js +8 -4
- package/dist/spine/uplink-clients.js.map +1 -1
- package/dist/spine/uplink-delays.d.ts +31 -0
- package/dist/spine/uplink-delays.d.ts.map +1 -0
- package/dist/spine/uplink-delays.js +46 -0
- package/dist/spine/uplink-delays.js.map +1 -0
- package/dist/spine/uplink-health.d.ts +109 -14
- package/dist/spine/uplink-health.d.ts.map +1 -1
- package/dist/spine/uplink-health.js +21 -17
- package/dist/spine/uplink-health.js.map +1 -1
- package/dist/spine/use-action-input.d.ts.map +1 -1
- package/dist/spine/use-action-input.js +14 -9
- package/dist/spine/use-action-input.js.map +1 -1
- package/dist/spine/use-body-states.d.ts.map +1 -1
- package/dist/spine/use-body-states.js +3 -3
- package/dist/spine/use-body-states.js.map +1 -1
- package/dist/spine/use-command.d.ts +94 -31
- package/dist/spine/use-command.d.ts.map +1 -1
- package/dist/spine/use-command.js +409 -197
- package/dist/spine/use-command.js.map +1 -1
- package/dist/spine/use-last-known-path.d.ts +36 -0
- package/dist/spine/use-last-known-path.d.ts.map +1 -0
- package/dist/spine/use-last-known-path.js +46 -0
- package/dist/spine/use-last-known-path.js.map +1 -0
- package/dist/spine/use-observed-vantage.d.ts +13 -0
- package/dist/spine/use-observed-vantage.d.ts.map +1 -0
- package/dist/spine/use-observed-vantage.js +20 -0
- package/dist/spine/use-observed-vantage.js.map +1 -0
- package/dist/spine/use-orbit-trajectory.d.ts +1 -1
- package/dist/spine/use-orbit-trajectory.d.ts.map +1 -1
- package/dist/spine/use-orbit-trajectory.js +17 -3
- package/dist/spine/use-orbit-trajectory.js.map +1 -1
- package/dist/spine/use-stream-connected.d.ts +8 -0
- package/dist/spine/use-stream-connected.d.ts.map +1 -0
- package/dist/spine/use-stream-connected.js +16 -0
- package/dist/spine/use-stream-connected.js.map +1 -0
- package/dist/spine/use-stream-event.d.ts +6 -1
- package/dist/spine/use-stream-event.d.ts.map +1 -1
- package/dist/spine/use-stream-event.js +5 -1
- package/dist/spine/use-stream-event.js.map +1 -1
- package/dist/spine/use-stream.d.ts +5 -2
- package/dist/spine/use-stream.d.ts.map +1 -1
- package/dist/spine/use-stream.js +7 -4
- package/dist/spine/use-stream.js.map +1 -1
- package/dist/spine/use-telemetry.d.ts +5 -1
- package/dist/spine/use-telemetry.d.ts.map +1 -1
- package/dist/spine/use-telemetry.js.map +1 -1
- package/dist/spine/use-topic-clock.d.ts +54 -0
- package/dist/spine/use-topic-clock.d.ts.map +1 -0
- package/dist/spine/use-topic-clock.js +137 -0
- package/dist/spine/use-topic-clock.js.map +1 -0
- package/dist/spine/use-transmissions.d.ts.map +1 -1
- package/dist/spine/use-transmissions.js +9 -4
- package/dist/spine/use-transmissions.js.map +1 -1
- package/dist/spine/vantage.d.ts +6 -0
- package/dist/spine/vantage.d.ts.map +1 -1
- package/dist/spine/vantage.js +6 -0
- package/dist/spine/vantage.js.map +1 -1
- package/dist/spine/view-clock.d.ts +23 -3
- package/dist/spine/view-clock.d.ts.map +1 -1
- package/dist/spine/view-clock.js +80 -2
- package/dist/spine/view-clock.js.map +1 -1
- package/dist/testing/fake-command.d.ts +48 -0
- package/dist/testing/fake-command.d.ts.map +1 -0
- package/dist/testing/fake-command.js +63 -0
- package/dist/testing/fake-command.js.map +1 -0
- package/dist/testing/index.d.ts +5 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +6 -0
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/install-act-gate-stretch.d.ts +1 -2
- package/dist/testing/install-act-gate-stretch.d.ts.map +1 -1
- package/dist/testing/install-act-gate-stretch.js +1 -2
- package/dist/testing/install-act-gate-stretch.js.map +1 -1
- package/dist/testing/install-dom-stubs.d.ts +2 -5
- package/dist/testing/install-dom-stubs.d.ts.map +1 -1
- package/dist/testing/install-dom-stubs.js +2 -34
- package/dist/testing/install-dom-stubs.js.map +1 -1
- package/dist/testing/install-real-test-host.d.ts.map +1 -1
- package/dist/testing/install-real-test-host.js +7 -6
- package/dist/testing/install-real-test-host.js.map +1 -1
- package/dist/testing/recorded-uplink-banners.d.ts +49 -0
- package/dist/testing/recorded-uplink-banners.d.ts.map +1 -0
- package/dist/testing/recorded-uplink-banners.js +45 -0
- package/dist/testing/recorded-uplink-banners.js.map +1 -0
- package/dist/testing/render.d.ts +16 -3
- package/dist/testing/render.d.ts.map +1 -1
- package/dist/testing/render.js +16 -3
- package/dist/testing/render.js.map +1 -1
- package/dist/testing/stream-fixture.js +3 -3
- package/dist/testing/stream-fixture.js.map +1 -1
- package/dist/testing/stub-transport.d.ts +6 -0
- package/dist/testing/stub-transport.d.ts.map +1 -1
- package/dist/testing/stub-transport.js +3 -0
- package/dist/testing/stub-transport.js.map +1 -1
- package/dist/timeline.d.ts +2 -98
- package/dist/timeline.d.ts.map +1 -1
- package/dist/topics.d.ts +68 -28
- package/dist/topics.d.ts.map +1 -1
- package/dist/topics.js +21 -18
- package/dist/topics.js.map +1 -1
- package/dist/unit-system/index.d.ts +1 -1
- package/dist/unit-system/index.d.ts.map +1 -1
- package/dist/unit-system/index.js +1 -1
- package/dist/unit-system/index.js.map +1 -1
- package/dist/unit-system/value.d.ts +26 -5
- package/dist/unit-system/value.d.ts.map +1 -1
- package/dist/unit-system/value.js +41 -21
- package/dist/unit-system/value.js.map +1 -1
- package/dist/units.d.ts.map +1 -1
- package/dist/units.js +2 -1
- package/dist/units.js.map +1 -1
- package/dist/uplink-externals.d.ts +17 -7
- package/dist/uplink-externals.d.ts.map +1 -1
- package/dist/uplink-externals.js +17 -7
- package/dist/uplink-externals.js.map +1 -1
- package/dist/uplink-load.d.ts +3 -2
- package/dist/uplink-load.d.ts.map +1 -1
- package/dist/uplink-load.js +9 -6
- package/dist/uplink-load.js.map +1 -1
- package/dist/uplink-manifest.d.ts +8 -3
- package/dist/uplink-manifest.d.ts.map +1 -1
- package/dist/uplink-manifest.js +5 -1
- package/dist/uplink-manifest.js.map +1 -1
- package/dist/wrap-units.d.ts.map +1 -1
- package/dist/wrap-units.js +3 -2
- package/dist/wrap-units.js.map +1 -1
- package/package.json +1 -1
- package/src/__generated__/command-map.ts +215 -19
- package/src/__generated__/contract.ts +3102 -330
- package/src/__generated__/delay-roles.ts +12 -0
- package/src/__generated__/error-codes.ts +13 -13
- package/src/__generated__/frames.ts +20 -4
- package/src/__generated__/reckonability.ts +3 -1
- package/src/__generated__/sample-kinds.ts +18 -2
- package/src/__generated__/topic-map.ts +68 -19
- package/src/__generated__/units.json +958 -94
- package/src/__generated__/units.ts +949 -76
- package/src/api/command-rejection.ts +2 -2
- package/src/api/contribution-slots.ts +128 -25
- package/src/api/error-codes.ts +3 -2
- package/src/api/framework-reads.ts +6 -1
- package/src/api/host.ts +14 -6
- package/src/api/index.ts +127 -67
- package/src/api/logger-contract.ts +2 -1
- package/src/api/logger.ts +6 -3
- package/src/api/part-panels.ts +221 -0
- package/src/api/plot-layers.ts +1 -1
- package/src/api/registry.ts +4 -2
- package/src/api/settings/store.ts +7 -2
- package/src/api/slots.ts +153 -70
- package/src/api/station-brokers.ts +24 -15
- package/src/api/tiny-size.ts +2 -1
- package/src/api/tone.ts +1 -1
- package/src/api/transport.ts +13 -0
- package/src/api/types.ts +388 -68
- package/src/api/uplink-banner.ts +128 -0
- package/src/api/uplink-handles.ts +4 -1
- package/src/binary-frame.ts +4 -4
- package/src/combine-readings.ts +4 -3
- package/src/command-delay.ts +144 -11
- package/src/command-value.ts +181 -0
- package/src/compat-versions.ts +3 -3
- package/src/contract-enum-names.ts +2 -2
- package/src/contract-tags.ts +67 -5
- package/src/data-rate.ts +178 -0
- package/src/delay-roles.ts +19 -2
- package/src/dock-markers.ts +182 -0
- package/src/envelope.ts +4 -0
- package/src/flight/types.ts +31 -2
- package/src/frames/index.ts +0 -4
- package/src/go-no-go-countdown.ts +116 -0
- package/src/index.ts +64 -4
- package/src/ksp-enum-names.ts +48 -3
- package/src/locked.ts +1 -1
- package/src/media/__fixtures__/hull-after-revert.json +1506 -0
- package/src/media/delayed-playout-buffer.ts +41 -9
- package/src/media/encoded-frame-delay.ts +29 -17
- package/src/media/frame-delay.ts +328 -22
- package/src/media/frame-stamp-timeline.ts +270 -0
- package/src/media/index.ts +5 -0
- package/src/media/radio-support.ts +8 -7
- package/src/media/worker/delay-worker-client.ts +104 -6
- package/src/media/worker/delay-worker.ts +228 -27
- package/src/media/worker/frame-delay-report.ts +141 -0
- package/src/media/worker/lead-limit-report.ts +27 -0
- package/src/media/worker/presentation-pacer.ts +216 -9
- package/src/media/worker/worker-delay-clock.ts +9 -6
- package/src/perf/PerfBudget.ts +2 -2
- package/src/rail-tags.ts +8 -0
- package/src/raw-field-split.ts +1 -1
- package/src/reading.ts +6 -6
- package/src/resource-transfer.ts +352 -0
- package/src/runtime-topic-registry.ts +23 -2
- package/src/sample-step-tracker.ts +38 -0
- package/src/sha256-fallback.ts +69 -0
- package/src/spine/__fixtures__/crash/crash-eva.json +224 -0
- package/src/spine/__fixtures__/crash/crash-separated-pod-pod-root.json +144 -0
- package/src/spine/__fixtures__/crash/crash-separated-pod.json +111 -0
- package/src/spine/__fixtures__/switch/back-to-craft.jsonl +101 -0
- package/src/spine/__fixtures__/switch/late-sent-frame.jsonl +16 -0
- package/src/spine/__fixtures__/switch/linked-craft.jsonl +63 -0
- package/src/spine/__fixtures__/switch/station-trim.jsonl +229 -0
- package/src/spine/__fixtures__/switch/switch-with-scene.jsonl +110 -0
- package/src/spine/__fixtures__/switch/unlinked-craft.jsonl +46 -0
- package/src/spine/arrival-deadline.ts +15 -0
- package/src/spine/bound-command.ts +243 -0
- package/src/spine/capability-lock.ts +65 -6
- package/src/spine/catalog-fallback.ts +152 -0
- package/src/spine/celestial-facts.ts +4 -2
- package/src/spine/centre-commands.ts +314 -0
- package/src/spine/client-reading.ts +1 -1
- package/src/spine/client-timeline.ts +165 -4
- package/src/spine/client.ts +615 -32
- package/src/spine/command-gate.ts +44 -3
- package/src/spine/command-outcomes.ts +303 -0
- package/src/spine/connectivity-history.ts +5 -3
- package/src/spine/context.tsx +154 -50
- package/src/spine/core-reckoners.ts +31 -50
- package/src/spine/delay-authority-context.ts +9 -0
- package/src/spine/delay-authority.ts +227 -3
- package/src/spine/delay-estimate.ts +88 -0
- package/src/spine/delta-v-budget.ts +2 -2
- package/src/spine/dv-stage-resources.ts +55 -43
- package/src/spine/index.ts +11 -5
- package/src/spine/kepler-reckoning.ts +245 -3
- package/src/spine/kepler.ts +1 -1
- package/src/spine/known-holds.ts +96 -0
- package/src/spine/lagrange.ts +10 -46
- package/src/spine/lifecycle.ts +22 -0
- package/src/spine/lock-scope.ts +2 -2
- package/src/spine/map-topic.ts +3 -3
- package/src/spine/never-reckonable.ts +1 -1
- package/src/spine/orbit-patches.ts +54 -10
- package/src/spine/orbital-solve.ts +53 -1
- package/src/spine/powered-reckoning.ts +5 -1
- package/src/spine/processorEvaluator.ts +106 -72
- package/src/spine/processors.ts +144 -4
- package/src/spine/rail-registry.ts +1 -1
- package/src/spine/reckoner-generation.ts +11 -0
- package/src/spine/reckoners.ts +3 -0
- package/src/spine/replay-session-controller.ts +4 -6
- package/src/spine/resolve-tracked.ts +50 -1
- package/src/spine/send-status.ts +2 -0
- package/src/spine/settings-registry.ts +7 -0
- package/src/spine/slot-ids.ts +6 -3
- package/src/spine/space-center-state.ts +17 -20
- package/src/spine/stage-countdown-store.ts +76 -0
- package/src/spine/stream-status.ts +4 -4
- package/src/spine/subscribe-read.ts +2 -2
- package/src/spine/system-state.ts +19 -21
- package/src/spine/timeline-store.ts +1119 -247
- package/src/spine/uplink-clients.ts +44 -22
- package/src/spine/uplink-delays.ts +57 -0
- package/src/spine/uplink-health.ts +59 -27
- package/src/spine/use-action-input.ts +13 -9
- package/src/spine/use-body-states.ts +5 -4
- package/src/spine/use-command.ts +620 -239
- package/src/spine/use-last-known-path.ts +75 -0
- package/src/spine/use-observed-vantage.ts +24 -0
- package/src/spine/use-orbit-trajectory.ts +22 -3
- package/src/spine/use-stream-connected.ts +23 -0
- package/src/spine/use-stream-event.ts +6 -2
- package/src/spine/use-stream.ts +7 -4
- package/src/spine/use-telemetry.ts +5 -1
- package/src/spine/use-topic-clock.ts +196 -0
- package/src/spine/use-transmissions.ts +37 -18
- package/src/spine/vantage.ts +7 -0
- package/src/spine/view-clock.ts +89 -3
- package/src/testing/fake-command.ts +109 -0
- package/src/testing/index.ts +12 -1
- package/src/testing/install-act-gate-stretch.ts +1 -2
- package/src/testing/install-dom-stubs.ts +2 -38
- package/src/testing/install-real-test-host.ts +10 -6
- package/src/testing/recorded-uplink-banners.ts +71 -0
- package/src/testing/render.tsx +16 -3
- package/src/testing/stream-fixture.tsx +3 -3
- package/src/testing/stub-transport.ts +9 -0
- package/src/timeline.ts +2 -103
- package/src/topics.ts +87 -26
- package/src/unit-system/index.ts +2 -0
- package/src/unit-system/value.ts +61 -21
- package/src/units.ts +2 -1
- package/src/uplink-externals.ts +17 -7
- package/src/uplink-load.ts +9 -8
- package/src/uplink-manifest.ts +8 -3
- package/src/wrap-units.ts +3 -9
- package/dist/spine/contributed-channels.d.ts +0 -56
- package/dist/spine/contributed-channels.d.ts.map +0 -1
- package/dist/spine/contributed-channels.js +0 -108
- package/dist/spine/contributed-channels.js.map +0 -1
- package/src/spine/contributed-channels.ts +0 -134
package/src/spine/context.tsx
CHANGED
|
@@ -31,30 +31,32 @@ import {
|
|
|
31
31
|
LATE_ARRIVAL_ERROR_CODE,
|
|
32
32
|
} from "./arrival-deadline";
|
|
33
33
|
import type { TelemetryClient } from "./client";
|
|
34
|
-
import {
|
|
35
|
-
getContributedDerivedChannels,
|
|
36
|
-
onContributedChannelsChange,
|
|
37
|
-
} from "./contributed-channels";
|
|
38
34
|
import { noteUndeclaredRead } from "./contribution-scope";
|
|
39
35
|
import { registerCoreReckoners } from "./core-reckoners";
|
|
40
36
|
import { DelayAuthority } from "./delay-authority";
|
|
37
|
+
import { DelayAuthorityContext } from "./delay-authority-context";
|
|
41
38
|
import {
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
DV_CURRENT_STAGE_RESOURCE,
|
|
40
|
+
DV_CURRENT_STAGE_RESOURCE_MAX,
|
|
44
41
|
} from "./dv-stage-resources";
|
|
45
42
|
import { commandDelayed } from "./map-command";
|
|
46
43
|
import { DYNAMIC_WHOLE_TOPIC_PREFIXES, resolveValueTopic } from "./map-topic";
|
|
47
44
|
import { type OrbitalSolve, solveSelfOrbit } from "./orbital-solve";
|
|
48
45
|
import { OwnCraftDelayGate } from "./own-craft-vantage";
|
|
49
46
|
import { processorRuntimeFor } from "./processorEvaluator";
|
|
47
|
+
import {
|
|
48
|
+
getPublishedProcessors,
|
|
49
|
+
onPublishedProcessorsChange,
|
|
50
|
+
type PublishedProcessorDefinition,
|
|
51
|
+
publishedDefinitionOf,
|
|
52
|
+
} from "./processors";
|
|
50
53
|
import { StreamRecorder, type StreamRecorderOptions } from "./replay-recorder";
|
|
51
|
-
import {
|
|
54
|
+
import { SPACE_CENTER_STATE } from "./space-center-state";
|
|
52
55
|
import { type ReadTopicResolver, subscribeTopicRead } from "./subscribe-read";
|
|
53
|
-
import {
|
|
54
|
-
import type { DerivedChannelDefinition } from "./timeline-store";
|
|
56
|
+
import { SYSTEM_STATE } from "./system-state";
|
|
55
57
|
import { TimelineStore } from "./timeline-store";
|
|
56
58
|
import { installUnownedTopicWarning } from "./unowned-warning";
|
|
57
|
-
import {
|
|
59
|
+
import { SYSTEM_UPLINK_HEALTH } from "./uplink-health";
|
|
58
60
|
import { ViewClock, type ViewClockOptions } from "./view-clock";
|
|
59
61
|
|
|
60
62
|
const TelemetryClientContext = createContext<TelemetryClient | undefined>(
|
|
@@ -97,7 +99,7 @@ export interface TelemetryProviderProps {
|
|
|
97
99
|
children: ReactNode;
|
|
98
100
|
/**
|
|
99
101
|
* Advanced override: supply a pre-built `TimelineStore` (e.g. one with
|
|
100
|
-
* extra
|
|
102
|
+
* extra published processors registered, or non-default `ViewClock` options,
|
|
101
103
|
* a scrub UI, a fixed replay delay) instead of the default one this
|
|
102
104
|
* provider builds. When omitted, `TelemetryProvider` builds one itself,
|
|
103
105
|
* see this component's own doc comment.
|
|
@@ -157,6 +159,7 @@ export function TelemetryProvider({
|
|
|
157
159
|
new ViewClock({
|
|
158
160
|
...viewClockOptions,
|
|
159
161
|
delaySeconds: viewClockOptions?.delaySeconds ?? authority.delaySeconds,
|
|
162
|
+
delayEpoch: viewClockOptions?.delayEpoch ?? authority.delayEpoch,
|
|
160
163
|
warpRate:
|
|
161
164
|
viewClockOptions?.warpRate ??
|
|
162
165
|
(() => (warpSlope.paused ? 0 : warpSlope.rate)),
|
|
@@ -164,9 +167,7 @@ export function TelemetryProvider({
|
|
|
164
167
|
// A topic under a dynamic namespace is one whole raw topic, never a `<domain.channel>.<field>` split.
|
|
165
168
|
{ dynamicWholeTopicPrefixes: DYNAMIC_WHOLE_TOPIC_PREFIXES },
|
|
166
169
|
);
|
|
167
|
-
|
|
168
|
-
built.registerDerivedChannel(channel);
|
|
169
|
-
}
|
|
170
|
+
publishProcessorsOn(built);
|
|
170
171
|
/*
|
|
171
172
|
* Core's own forward models, through the same registry an Uplink's go
|
|
172
173
|
* through. Idempotent, and re-asserted here rather than left to the module
|
|
@@ -174,31 +175,24 @@ export function TelemetryProvider({
|
|
|
174
175
|
* the vanilla back with its store.
|
|
175
176
|
*/
|
|
176
177
|
registerCoreReckoners();
|
|
177
|
-
// Uplink-contributed channels register AFTER the first-party ones, so a
|
|
178
|
-
// topic core already owns cannot be taken over by an Uplink importing
|
|
179
|
-
// itself later. Contributions are per (topic, owner) and a contested topic
|
|
180
|
-
// arrives from nobody: see `contributed-channels.ts`.
|
|
181
|
-
for (const channel of getContributedDerivedChannels()) {
|
|
182
|
-
built.registerDerivedChannel(channel);
|
|
183
|
-
}
|
|
184
178
|
return { store: built, delayAuthority: authority, warp: warpSlope };
|
|
185
179
|
}, [providedStore, client]);
|
|
186
180
|
|
|
187
|
-
// A store is built with the
|
|
181
|
+
// A store is built with the processors published so far, which on a station
|
|
188
182
|
// is none of them: its Uplink bundles cannot load until there is a
|
|
189
183
|
// peer-backed client to read the roster off, so `StationScreen` mounts the
|
|
190
|
-
// provider as the parent of the loader. Keep draining as
|
|
191
|
-
//
|
|
192
|
-
//
|
|
184
|
+
// provider as the parent of the loader. Keep draining as they arrive,
|
|
185
|
+
// skipping any topic the store already has so a Topic never changes meaning
|
|
186
|
+
// under a widget that is already reading it.
|
|
193
187
|
useEffect(() => {
|
|
194
188
|
const drain = () => {
|
|
195
|
-
for (const
|
|
196
|
-
if (store.
|
|
197
|
-
store.
|
|
189
|
+
for (const processor of getPublishedProcessors()) {
|
|
190
|
+
if (store.hasPublishedProcessor(processor.topic)) continue;
|
|
191
|
+
store.publishProcessor(processor);
|
|
198
192
|
}
|
|
199
193
|
};
|
|
200
194
|
drain();
|
|
201
|
-
return
|
|
195
|
+
return onPublishedProcessorsChange(drain);
|
|
202
196
|
}, [store]);
|
|
203
197
|
|
|
204
198
|
useEffect(() => client.attachStore(store), [client, store]);
|
|
@@ -273,7 +267,19 @@ export function TelemetryProvider({
|
|
|
273
267
|
// answers settles instead of hanging. One wiring point, one number: the client
|
|
274
268
|
// does not compute delay and the transport is not asked about it.
|
|
275
269
|
const clearDelaySource = client.setDelaySource(delayAuthority.delaySeconds);
|
|
270
|
+
/*
|
|
271
|
+
* A subscriber hears only the newest frame of a topic, and a screen handed a
|
|
272
|
+
* topic's history after the fact (a station joining) is told the newest
|
|
273
|
+
* first. Through a blackout the newest says there is no path home, so the
|
|
274
|
+
* last measured delay has to be read off the frames that came before it.
|
|
275
|
+
*/
|
|
276
|
+
const detachFigures = client.onRawMessage((message) => {
|
|
277
|
+
if (message.type === "stream-data" && message.topic === "comms.delay") {
|
|
278
|
+
delayAuthority.observeFigure(message.payload, message.meta.validAt);
|
|
279
|
+
}
|
|
280
|
+
});
|
|
276
281
|
return () => {
|
|
282
|
+
detachFigures();
|
|
277
283
|
clearDelaySource();
|
|
278
284
|
detach();
|
|
279
285
|
};
|
|
@@ -296,6 +302,13 @@ export function TelemetryProvider({
|
|
|
296
302
|
* readout still judges every other channel's staleness against it.
|
|
297
303
|
*/
|
|
298
304
|
useEffect(() => client.subscribe("time.warp", () => {}), [client]);
|
|
305
|
+
/*
|
|
306
|
+
* `comms.delay` names the active craft the moment the game switches, which is
|
|
307
|
+
* how the store knows a reading about another craft is no longer one of the
|
|
308
|
+
* active craft's. Held for the provider's life so that holds for a dashboard
|
|
309
|
+
* that draws no delay readout.
|
|
310
|
+
*/
|
|
311
|
+
useEffect(() => client.subscribe("comms.delay", () => {}), [client]);
|
|
299
312
|
/* The view clock extrapolates game time at the game's own rate: a pause stands it still, and warp carries it forward as fast as the game goes. */
|
|
300
313
|
useEffect(() => {
|
|
301
314
|
if (!warp) return;
|
|
@@ -351,33 +364,49 @@ export function TelemetryProvider({
|
|
|
351
364
|
return (
|
|
352
365
|
<TelemetryClientContext.Provider value={client}>
|
|
353
366
|
<TimelineStoreContext.Provider value={store}>
|
|
354
|
-
{delayAuthority
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
367
|
+
<DelayAuthorityContext.Provider value={delayAuthority}>
|
|
368
|
+
{delayAuthority ? (
|
|
369
|
+
<OwnCraftDelayGate authority={delayAuthority} />
|
|
370
|
+
) : null}
|
|
371
|
+
{children}
|
|
372
|
+
</DelayAuthorityContext.Provider>
|
|
358
373
|
</TimelineStoreContext.Provider>
|
|
359
374
|
</TelemetryClientContext.Provider>
|
|
360
375
|
);
|
|
361
376
|
}
|
|
362
377
|
|
|
363
378
|
/**
|
|
364
|
-
*
|
|
365
|
-
* `TelemetryProvider` builds. A caller that needs a
|
|
379
|
+
* Gonogo's own published processors, registered on the default store a
|
|
380
|
+
* `TelemetryProvider` builds. A caller that needs a Topic missing from this
|
|
366
381
|
* list, or wants to omit one, passes its own pre-built `store` prop.
|
|
367
382
|
*
|
|
368
|
-
* An Uplink
|
|
369
|
-
*
|
|
370
|
-
* list: its channel is registered alongside these when the store is built. A
|
|
371
|
-
* derived channel is the only way to join two Topics.
|
|
383
|
+
* An Uplink publishes a processor with `registerProcessor` and `topic`, never by
|
|
384
|
+
* editing this list: it is added alongside these when the store is built.
|
|
372
385
|
*/
|
|
373
|
-
export const
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
386
|
+
export const CORE_PUBLISHED_PROCESSORS: PublishedProcessorDefinition[] = [
|
|
387
|
+
SYSTEM_STATE,
|
|
388
|
+
SYSTEM_UPLINK_HEALTH,
|
|
389
|
+
SPACE_CENTER_STATE,
|
|
390
|
+
DV_CURRENT_STAGE_RESOURCE,
|
|
391
|
+
DV_CURRENT_STAGE_RESOURCE_MAX,
|
|
392
|
+
].map(publishedDefinitionOf);
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Publishes Gonogo's own processors on `store`, then every Uplink's that no other
|
|
396
|
+
* Uplink also claims. Useful for building a store that answers every computed
|
|
397
|
+
* Topic, as the telemetry provider and a replay do. Uplinks go on after Gonogo's
|
|
398
|
+
* own and never over them, so a topic core already owns cannot be taken over by
|
|
399
|
+
* an Uplink importing itself later.
|
|
400
|
+
*/
|
|
401
|
+
export function publishProcessorsOn(store: TimelineStore): void {
|
|
402
|
+
for (const processor of CORE_PUBLISHED_PROCESSORS) {
|
|
403
|
+
store.publishProcessor(processor);
|
|
404
|
+
}
|
|
405
|
+
for (const processor of getPublishedProcessors()) {
|
|
406
|
+
if (store.hasPublishedProcessor(processor.topic)) continue;
|
|
407
|
+
store.publishProcessor(processor);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
381
410
|
|
|
382
411
|
/**
|
|
383
412
|
* The `TelemetryClient` supplied by the nearest `TelemetryProvider`, the
|
|
@@ -542,7 +571,7 @@ export type ViewClockView = Pick<
|
|
|
542
571
|
* contract, including under a pinned/scrubbed test clock.
|
|
543
572
|
*/
|
|
544
573
|
let activeViewClock:
|
|
545
|
-
| Pick<ViewClock, "viewUt" | "scetUt" | "commandArrivalUt">
|
|
574
|
+
| Pick<ViewClock, "viewUt" | "scetUt" | "commandArrivalUt" | "utNowEstimate">
|
|
546
575
|
| undefined;
|
|
547
576
|
|
|
548
577
|
/**
|
|
@@ -710,6 +739,43 @@ export function getViewUt(): Value<"ut"> | undefined {
|
|
|
710
739
|
return ut !== undefined && Number.isFinite(ut) ? value("ut", ut) : undefined;
|
|
711
740
|
}
|
|
712
741
|
|
|
742
|
+
/**
|
|
743
|
+
* The game's universal time right now, as the clock of the most recently
|
|
744
|
+
* mounted `TelemetryProvider` estimates it, as a single read for a caller that
|
|
745
|
+
* cannot use hooks. Useful for a service that marks the instant something
|
|
746
|
+
* happened in the game, which the delayed view time cannot say. Used by the
|
|
747
|
+
* alarm host service to date a switch of craft.
|
|
748
|
+
*
|
|
749
|
+
* `undefined` when no provider has mounted or the estimate is not a number yet.
|
|
750
|
+
*/
|
|
751
|
+
export function getGameUtNow(): Value<"ut"> | undefined {
|
|
752
|
+
noteUndeclaredRead("getGameUtNow");
|
|
753
|
+
const ut = activeViewClock?.utNowEstimate();
|
|
754
|
+
return ut !== undefined && Number.isFinite(ut) ? value("ut", ut) : undefined;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* Which timeline the mounted `TelemetryProvider` is showing: the epoch the game
|
|
759
|
+
* has reached and the store that holds it, or `undefined` without a store that
|
|
760
|
+
* keeps one. The epoch goes up each time the game starts a new timeline, on a
|
|
761
|
+
* revert, a quickload or a load of another save. Useful for a service outside
|
|
762
|
+
* React that has to forget what belongs to the previous flight. Used by the
|
|
763
|
+
* go/no-go host service.
|
|
764
|
+
*
|
|
765
|
+
* `store` tells one provider's timeline from another's: the epoch of a replay
|
|
766
|
+
* and the epoch of the live stream are unrelated numbers, so a caller compares
|
|
767
|
+
* epochs only while `store` is the same.
|
|
768
|
+
*/
|
|
769
|
+
export function getActiveTimelineEpoch():
|
|
770
|
+
| { epoch: number; store: object }
|
|
771
|
+
| undefined {
|
|
772
|
+
const store = activeTimelineStore as
|
|
773
|
+
| (ActiveTimelineStore & { clock?: Pick<ViewClock, "getEpoch"> })
|
|
774
|
+
| undefined;
|
|
775
|
+
if (typeof store?.clock?.getEpoch !== "function") return undefined;
|
|
776
|
+
return { epoch: store.clock.getEpoch(), store };
|
|
777
|
+
}
|
|
778
|
+
|
|
713
779
|
/**
|
|
714
780
|
* Makes `clock` the source of `getViewUt()` and the clock that
|
|
715
781
|
* `dispatchActiveCommandTopic` judges arrival by, without mounting a
|
|
@@ -723,13 +789,16 @@ export function getViewUt(): Value<"ut"> | undefined {
|
|
|
723
789
|
export function setActiveViewClockForTests(
|
|
724
790
|
clock:
|
|
725
791
|
| (Pick<ViewClock, "viewUt"> &
|
|
726
|
-
Partial<
|
|
792
|
+
Partial<
|
|
793
|
+
Pick<ViewClock, "scetUt" | "commandArrivalUt" | "utNowEstimate">
|
|
794
|
+
>)
|
|
727
795
|
| undefined,
|
|
728
796
|
): void {
|
|
729
797
|
activeViewClock = clock && {
|
|
730
798
|
viewUt: () => clock.viewUt(),
|
|
731
799
|
scetUt: (viewUt) => clock.scetUt?.(viewUt) ?? viewUt,
|
|
732
800
|
commandArrivalUt: (scetUt) => clock.commandArrivalUt?.(scetUt) ?? scetUt,
|
|
801
|
+
utNowEstimate: () => clock.utNowEstimate?.() ?? clock.viewUt(),
|
|
733
802
|
};
|
|
734
803
|
}
|
|
735
804
|
|
|
@@ -934,6 +1003,21 @@ export function sampleActiveReading<Payload>(
|
|
|
934
1003
|
);
|
|
935
1004
|
}
|
|
936
1005
|
|
|
1006
|
+
/**
|
|
1007
|
+
* Whether the newest reading of `topic` that has arrived here is one the active
|
|
1008
|
+
* craft sent, for a caller that cannot use hooks. It answers true while that
|
|
1009
|
+
* reading is held back from the screen by a delay not yet known. Useful for a
|
|
1010
|
+
* service that tells the operator a craft's data is on its way. Used by the
|
|
1011
|
+
* alarm host service.
|
|
1012
|
+
*/
|
|
1013
|
+
export function hasActiveCraftReadingArrived(topic: string): boolean {
|
|
1014
|
+
const store = activeTimelineStore as
|
|
1015
|
+
| (ActiveTimelineStore &
|
|
1016
|
+
Partial<Pick<TimelineStore, "hasArrivedFromActiveCraft">>)
|
|
1017
|
+
| undefined;
|
|
1018
|
+
return store?.hasArrivedFromActiveCraft?.(topic) ?? false;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
937
1021
|
/**
|
|
938
1022
|
* The vessel's own Keplerian orbit elements (`sma`, `ecc`, `inc`, `lan`,
|
|
939
1023
|
* `argPe`, `mu` and the rest) from `vessel.orbit`, as a single read for a caller
|
|
@@ -1103,6 +1187,21 @@ export function useActiveTelemetryClient(): TelemetryClient | undefined {
|
|
|
1103
1187
|
);
|
|
1104
1188
|
}
|
|
1105
1189
|
|
|
1190
|
+
/**
|
|
1191
|
+
* The timeline epoch this screen last received from the mod, re-rendering its
|
|
1192
|
+
* caller when a game load starts a new timeline, and 0 with no provider mounted.
|
|
1193
|
+
* Useful for dropping anything the operator had primed against the timeline a
|
|
1194
|
+
* load replaced. Used by {@link useCommandControl} to disarm a confirm.
|
|
1195
|
+
*/
|
|
1196
|
+
export function useWireTimelineEpoch(): number {
|
|
1197
|
+
// gonogo:reads none
|
|
1198
|
+
const client = useTelemetryClientOptional();
|
|
1199
|
+
return useSyncExternalStore(
|
|
1200
|
+
(listener) => client?.onTimelineChange(listener) ?? (() => undefined),
|
|
1201
|
+
() => client?.wireEpoch ?? 0,
|
|
1202
|
+
);
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1106
1205
|
/**
|
|
1107
1206
|
* The mod's refusal of a command that was routed: its code and message, as
|
|
1108
1207
|
* the mod wrote them. Useful for telling the operator why a command did not take
|
|
@@ -1196,12 +1295,17 @@ function describeDispatchRejection(error: unknown): DispatchCommandRefusal {
|
|
|
1196
1295
|
* A routed command settles asynchronously, and `settled` never rejects. It
|
|
1197
1296
|
* resolves with the simulation's refusal (its code and message as written)
|
|
1198
1297
|
* when the command was refused, and with `undefined` when it succeeded.
|
|
1298
|
+
*
|
|
1299
|
+
* `through` names the client to send on, for a caller that holds a connection
|
|
1300
|
+
* of its own and must not follow whichever provider mounted last. The arrival
|
|
1301
|
+
* check still reads the mounted provider's clock.
|
|
1199
1302
|
*/
|
|
1200
1303
|
export function dispatchActiveCommandTopic(
|
|
1201
1304
|
command: string,
|
|
1202
1305
|
args: unknown,
|
|
1306
|
+
through?: TelemetryClient,
|
|
1203
1307
|
): DispatchActiveCommandResult {
|
|
1204
|
-
const client = activeTelemetryClient;
|
|
1308
|
+
const client = through ?? activeTelemetryClient;
|
|
1205
1309
|
if (!client) return { routed: false };
|
|
1206
1310
|
const clock = activeViewClock;
|
|
1207
1311
|
const arrivalUt = clock
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
localGravity,
|
|
21
21
|
withinAtmosphere,
|
|
22
22
|
} from "./atmospheric-reckoning";
|
|
23
|
+
import { catalogRelayOrbit } from "./catalog-fallback";
|
|
23
24
|
import { deriveCelestialFacts } from "./celestial-facts";
|
|
24
25
|
import { commsDelaySecondsAt, fitCommsDelay } from "./comms-delay-reckoning";
|
|
25
26
|
import {
|
|
@@ -33,6 +34,7 @@ import {
|
|
|
33
34
|
buildElements,
|
|
34
35
|
isUnderThrust,
|
|
35
36
|
keplerAdmissibility,
|
|
37
|
+
keplerAdmissibilityAcrossPatches,
|
|
36
38
|
loadedCoastEvidence,
|
|
37
39
|
magnitude,
|
|
38
40
|
propagateVesselOrbit,
|
|
@@ -551,46 +553,6 @@ function registerFlightReckoner(): void {
|
|
|
551
553
|
});
|
|
552
554
|
}
|
|
553
555
|
|
|
554
|
-
/**
|
|
555
|
-
* The orbit the command centre's catalog records for the relay `vesselId`,
|
|
556
|
-
* with the gravitational parameter of the body it orbits, or `undefined` when
|
|
557
|
-
* the entry, any element the solve needs, or that body's parameter is unread.
|
|
558
|
-
* An unread element is never filled with a zero.
|
|
559
|
-
*/
|
|
560
|
-
function catalogRelayOrbit(
|
|
561
|
-
catalog: TopicPayload<"trackingStation.catalog"> | null | undefined,
|
|
562
|
-
bodies: TopicPayload<"trackingStation.bodies"> | null | undefined,
|
|
563
|
-
vesselId: string,
|
|
564
|
-
): CommsPeerOrbit | undefined {
|
|
565
|
-
const entry = catalog?.entries?.find((e) => e.vesselId === vesselId);
|
|
566
|
-
const orbit = entry?.orbit;
|
|
567
|
-
const bodyIndex = entry?.bodyIndex;
|
|
568
|
-
if (orbit == null || bodyIndex == null) return undefined;
|
|
569
|
-
const mu = bodies?.bodies?.find((b) => b.index === bodyIndex)?.gravParameter;
|
|
570
|
-
const { sma, ecc, inc, meanAnomalyAtEpoch, epoch } = orbit;
|
|
571
|
-
if (
|
|
572
|
-
sma == null ||
|
|
573
|
-
ecc == null ||
|
|
574
|
-
inc == null ||
|
|
575
|
-
meanAnomalyAtEpoch == null ||
|
|
576
|
-
epoch == null ||
|
|
577
|
-
mu == null
|
|
578
|
-
) {
|
|
579
|
-
return undefined;
|
|
580
|
-
}
|
|
581
|
-
return {
|
|
582
|
-
sma,
|
|
583
|
-
ecc,
|
|
584
|
-
inc,
|
|
585
|
-
lan: orbit.lan,
|
|
586
|
-
argPe: orbit.argPe,
|
|
587
|
-
meanAnomalyAtEpoch,
|
|
588
|
-
epoch,
|
|
589
|
-
mu,
|
|
590
|
-
referenceBodyIndex: bodyIndex,
|
|
591
|
-
};
|
|
592
|
-
}
|
|
593
|
-
|
|
594
556
|
/**
|
|
595
557
|
* `comms.delay.oneWaySeconds`, by re-measuring the first hop of the observed
|
|
596
558
|
* route and carrying the rest of it forward unchanged.
|
|
@@ -1077,16 +1039,24 @@ function registerOrbitReckoner(): void {
|
|
|
1077
1039
|
roster.state === "observed" || roster.state === "held"
|
|
1078
1040
|
? roster.value
|
|
1079
1041
|
: undefined;
|
|
1080
|
-
const admissible =
|
|
1042
|
+
const admissible = keplerAdmissibilityAcrossPatches(
|
|
1081
1043
|
point,
|
|
1082
1044
|
bodies,
|
|
1083
1045
|
reckonUt,
|
|
1084
1046
|
loadedCoastEvidence(thrust, pending),
|
|
1085
1047
|
);
|
|
1086
|
-
|
|
1087
|
-
if (orbit == null) {
|
|
1048
|
+
if (point.payload == null) {
|
|
1088
1049
|
return { declined: { reason: "input-absent", input: "@vessel.orbit" } };
|
|
1089
1050
|
}
|
|
1051
|
+
/*
|
|
1052
|
+
* Past the transition that ends the current patch, the orbit carried is
|
|
1053
|
+
* the next patch of the chain the sample already holds, so every element
|
|
1054
|
+
* below is that patch's rather than the observation's.
|
|
1055
|
+
*/
|
|
1056
|
+
const carried = "ok" in admissible && admissible.carried;
|
|
1057
|
+
const orbit = (
|
|
1058
|
+
"ok" in admissible ? admissible.orbit : point.payload
|
|
1059
|
+
) as NonNullable<typeof point.payload>;
|
|
1090
1060
|
/*
|
|
1091
1061
|
* The constants of the orbit, copied verbatim on the conic branch: one
|
|
1092
1062
|
* reading carries one projection over every marked field, and the conic
|
|
@@ -1094,11 +1064,13 @@ function registerOrbitReckoner(): void {
|
|
|
1094
1064
|
* observation itself.
|
|
1095
1065
|
*/
|
|
1096
1066
|
const held = {
|
|
1067
|
+
referenceBodyIndex: orbit.referenceBodyIndex,
|
|
1097
1068
|
sma: orbit.sma,
|
|
1098
1069
|
ecc: orbit.ecc,
|
|
1099
1070
|
inc: orbit.inc,
|
|
1100
|
-
lan: orbit.lan
|
|
1101
|
-
argPe: orbit.argPe
|
|
1071
|
+
lan: orbit.lan as Value<"°">,
|
|
1072
|
+
argPe: orbit.argPe as Value<"°">,
|
|
1073
|
+
mu: orbit.mu,
|
|
1102
1074
|
};
|
|
1103
1075
|
if ("declined" in admissible) {
|
|
1104
1076
|
const coldOrUnknown =
|
|
@@ -1132,11 +1104,20 @@ function registerOrbitReckoner(): void {
|
|
|
1132
1104
|
};
|
|
1133
1105
|
}
|
|
1134
1106
|
return {
|
|
1135
|
-
modelled:
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1107
|
+
modelled: carried
|
|
1108
|
+
? movedFields(
|
|
1109
|
+
"kepler-propagation",
|
|
1110
|
+
"meanAnomalyAtEpoch",
|
|
1111
|
+
"epoch",
|
|
1112
|
+
"referenceBodyIndex",
|
|
1113
|
+
"sma",
|
|
1114
|
+
"ecc",
|
|
1115
|
+
"inc",
|
|
1116
|
+
"lan",
|
|
1117
|
+
"argPe",
|
|
1118
|
+
"mu",
|
|
1119
|
+
)
|
|
1120
|
+
: movedFields("kepler-propagation", "meanAnomalyAtEpoch", "epoch"),
|
|
1140
1121
|
bandAt: (at) => {
|
|
1141
1122
|
const drift = departureAt(
|
|
1142
1123
|
orbit.horizon?.departure,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
import type { DelayAuthority } from "./delay-authority";
|
|
3
|
+
|
|
4
|
+
/** The `DelayAuthority` the nearest `TelemetryProvider` built, or `null` when it was handed a store of its own. */
|
|
5
|
+
export const DelayAuthorityContext = createContext<DelayAuthority | null>(null);
|
|
6
|
+
|
|
7
|
+
export function useDelayAuthorityOptional(): DelayAuthority | null {
|
|
8
|
+
return useContext(DelayAuthorityContext);
|
|
9
|
+
}
|