@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/contract-tags.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// The value tags each contract declares, registered by the client that owns it.
|
|
2
2
|
//
|
|
3
3
|
// A tag is a fact about a published value that a reader acts on: how it relates
|
|
4
|
-
// in time (`kind`), whether it identifies its list entry (`entryKey`),
|
|
4
|
+
// in time (`kind`), whether it identifies its list entry (`entryKey`), what a
|
|
5
|
+
// picker lists it as (`displayName`, and `names` for a whole Topic), and which
|
|
5
6
|
// models carry it forward (`reckonable`). Each contract's codegen writes them
|
|
6
7
|
// into one table, `GENERATED_CONTRACT_TAGS` in its generated `units.ts`, and the
|
|
7
8
|
// owning client registers that table here under its own id. Core's is
|
|
@@ -14,6 +15,7 @@ import type {
|
|
|
14
15
|
GeneratedReckoningBasis,
|
|
15
16
|
} from "./__generated__/reckonability";
|
|
16
17
|
import { GENERATED_CONTRACT_TAGS } from "./__generated__/units";
|
|
18
|
+
import { noteRuntimeTopicMetadata } from "./runtime-topic-registry";
|
|
17
19
|
|
|
18
20
|
/**
|
|
19
21
|
* The owner id that Gonogo's own contract registers its value tags under, and
|
|
@@ -50,6 +52,8 @@ export interface ValueTags {
|
|
|
50
52
|
readonly kind?: Exclude<SampleKind, "event">;
|
|
51
53
|
/** Present when this value identifies its entry of a list across samples. */
|
|
52
54
|
readonly entryKey?: true;
|
|
55
|
+
/** The name the value is listed under where the operator picks one, such as "Altitude (sea level)". */
|
|
56
|
+
readonly displayName?: string;
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
/**
|
|
@@ -67,6 +71,8 @@ export interface ContractReckonableRow {
|
|
|
67
71
|
readonly field: string;
|
|
68
72
|
/** The model that carries it forward, one of the reckoning bases. */
|
|
69
73
|
readonly basis: string;
|
|
74
|
+
/** `"stepped"` for a value that changes only at a boundary the sample states and is never interpolated; absent for a continuous one. */
|
|
75
|
+
readonly carried?: "stepped";
|
|
70
76
|
/** The published inputs the model needs beyond the value itself. */
|
|
71
77
|
readonly inputs: readonly GeneratedReckonableInput[];
|
|
72
78
|
}
|
|
@@ -85,6 +91,8 @@ export interface ContractTagTable {
|
|
|
85
91
|
readonly topics?: Readonly<
|
|
86
92
|
Record<string, Readonly<Record<string, ValueTags>>>
|
|
87
93
|
>;
|
|
94
|
+
/** What each Topic describes, by Topic id, such as "Active vessel" for `vessel.flight`. */
|
|
95
|
+
readonly names?: Readonly<Record<string, string>>;
|
|
88
96
|
/** Every value a declared model carries forward. */
|
|
89
97
|
readonly reckonable?: readonly ContractReckonableRow[];
|
|
90
98
|
}
|
|
@@ -123,6 +131,12 @@ const topicTags = new Map<
|
|
|
123
131
|
{ readonly owner: string; readonly paths: ReadonlyMap<string, ValueTags> }
|
|
124
132
|
>();
|
|
125
133
|
|
|
134
|
+
/** Each Topic's display name and the owner that declared it, held to the same one-owner rule as the value tags. */
|
|
135
|
+
const topicNames = new Map<
|
|
136
|
+
string,
|
|
137
|
+
{ readonly owner: string; readonly name: string }
|
|
138
|
+
>();
|
|
139
|
+
|
|
126
140
|
/**
|
|
127
141
|
* Reckonable rows by the owner that declared them. Unlike value tags these
|
|
128
142
|
* may name another owner's Topic: a model belongs to whoever supplies it, so
|
|
@@ -148,8 +162,11 @@ export function registerContractTags(
|
|
|
148
162
|
owner: string,
|
|
149
163
|
table: ContractTagTable,
|
|
150
164
|
): void {
|
|
151
|
-
for (const topic of
|
|
152
|
-
|
|
165
|
+
for (const topic of [
|
|
166
|
+
...Object.keys(table.topics ?? {}),
|
|
167
|
+
...Object.keys(table.names ?? {}),
|
|
168
|
+
]) {
|
|
169
|
+
const existing = topicTags.get(topic) ?? topicNames.get(topic);
|
|
153
170
|
if (existing && existing.owner !== owner) {
|
|
154
171
|
throw new Error(
|
|
155
172
|
`registerContractTags("${owner}"): the values of ${topic} are already described by "${existing.owner}". ` +
|
|
@@ -175,8 +192,16 @@ export function registerContractTags(
|
|
|
175
192
|
for (const [topic, paths] of Object.entries(table.topics ?? {})) {
|
|
176
193
|
topicTags.set(topic, { owner, paths: new Map(Object.entries(paths)) });
|
|
177
194
|
}
|
|
195
|
+
for (const [topic, entry] of topicNames) {
|
|
196
|
+
if (entry.owner === owner) topicNames.delete(topic);
|
|
197
|
+
}
|
|
198
|
+
for (const [topic, name] of Object.entries(table.names ?? {})) {
|
|
199
|
+
topicNames.set(topic, { owner, name });
|
|
200
|
+
}
|
|
178
201
|
reckonableByOwner.set(owner, rows);
|
|
179
202
|
generation += 1;
|
|
203
|
+
// A picker memoised on the registered Topics relabels only when that list's identity moves.
|
|
204
|
+
noteRuntimeTopicMetadata();
|
|
180
205
|
}
|
|
181
206
|
|
|
182
207
|
/**
|
|
@@ -215,8 +240,42 @@ export function valueTagsOf(
|
|
|
215
240
|
}
|
|
216
241
|
|
|
217
242
|
/**
|
|
218
|
-
*
|
|
219
|
-
*
|
|
243
|
+
* What `topic` describes, in the game's own nouns ("Active vessel" for
|
|
244
|
+
* `vessel.flight`), as the contract that publishes it names it, or `undefined`
|
|
245
|
+
* when that contract names none. Useful for listing a Topic where the operator
|
|
246
|
+
* picks a value by what it measures. Used by the graph's series picker. A
|
|
247
|
+
* field's own name is read with {@link fieldDisplayNameOf}.
|
|
248
|
+
*
|
|
249
|
+
* @category Registering
|
|
250
|
+
*/
|
|
251
|
+
export function topicDisplayNameOf(topic: string): string | undefined {
|
|
252
|
+
return topicNames.get(topic)?.name;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* The name the value at `path` of `topic` is listed under ("Altitude (sea
|
|
257
|
+
* level)" for `altitudeAsl` of `vessel.flight`), as the contract that publishes
|
|
258
|
+
* the Topic names it, or `undefined` when it names none. `path` is the dotted
|
|
259
|
+
* camelCase path from the payload root, `*` for each list or dictionary it
|
|
260
|
+
* crosses. Useful for labelling a value the operator picks or reads off a plot.
|
|
261
|
+
* Used by the graph's series picker, title and legend.
|
|
262
|
+
*
|
|
263
|
+
* @category Registering
|
|
264
|
+
*/
|
|
265
|
+
export function fieldDisplayNameOf(
|
|
266
|
+
topic: string,
|
|
267
|
+
path: string,
|
|
268
|
+
): string | undefined {
|
|
269
|
+
return topicTags.get(topic)?.paths.get(path)?.displayName;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* A number that changes whenever a contract's value tags or names are
|
|
274
|
+
* registered. Useful for knowing when something built from
|
|
275
|
+
* {@link topicDisplayNameOf} or {@link fieldDisplayNameOf} is stale. Used by
|
|
276
|
+
* the graph's series picker.
|
|
277
|
+
*
|
|
278
|
+
* @category Registering
|
|
220
279
|
*/
|
|
221
280
|
export function contractTagsGeneration(): number {
|
|
222
281
|
return generation;
|
|
@@ -251,6 +310,9 @@ export function clearRegisteredContractTags(): void {
|
|
|
251
310
|
for (const [topic, entry] of topicTags) {
|
|
252
311
|
if (entry.owner !== CORE_CONTRACT_OWNER) topicTags.delete(topic);
|
|
253
312
|
}
|
|
313
|
+
for (const [topic, entry] of topicNames) {
|
|
314
|
+
if (entry.owner !== CORE_CONTRACT_OWNER) topicNames.delete(topic);
|
|
315
|
+
}
|
|
254
316
|
for (const owner of reckonableByOwner.keys()) {
|
|
255
317
|
if (owner !== CORE_CONTRACT_OWNER) reckonableByOwner.delete(owner);
|
|
256
318
|
}
|
package/src/data-rate.ts
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import type { DataRateReport, SetRate } from "./__generated__/contract";
|
|
2
|
+
import { magnitudeOr } from "./magnitude";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A rate a widget can ask the mod to send a Topic at: `"base"`, the rate every
|
|
6
|
+
* Topic runs at, or `"fast"`. The tier names how much the widget needs the
|
|
7
|
+
* Topic; what each tier is in samples a second is set by the mod and reported
|
|
8
|
+
* on `system.dataRates`.
|
|
9
|
+
*
|
|
10
|
+
* @category Reading telemetry
|
|
11
|
+
*/
|
|
12
|
+
export type DataRateTier = SetRate["tier"];
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The faster rates a widget can ask for on Topics it reads, each a list of the
|
|
16
|
+
* Values or whole Topics it wants at that tier (`"vessel.flight.altitude"` or
|
|
17
|
+
* `"vessel.flight"`). The mod sends a whole Topic at a time, so naming one Value
|
|
18
|
+
* puts its Topic at that tier. Useful for a widget that plots or models a Value
|
|
19
|
+
* closely and draws it in steps at one sample a second. Used by the Landing
|
|
20
|
+
* Status and Graph widgets.
|
|
21
|
+
*
|
|
22
|
+
* @category Registering widgets and themes
|
|
23
|
+
*/
|
|
24
|
+
export interface WidgetDataRates {
|
|
25
|
+
/** Values or Topics to send at the fast tier while the widget is open. */
|
|
26
|
+
readonly fast?: readonly string[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The samples a game second a Topic arrives at, read off a `system.dataRates`
|
|
31
|
+
* report: the Topic's own row when it is above the base tier, otherwise the base
|
|
32
|
+
* tier's rate. One a second when `report` is absent or not a report, which is
|
|
33
|
+
* the base rate the mod sends at until it says otherwise. Useful for sizing how many samples
|
|
34
|
+
* of a Topic to keep so a plot spans the same game time at any rate.
|
|
35
|
+
*
|
|
36
|
+
* @category Reading telemetry
|
|
37
|
+
*/
|
|
38
|
+
export function samplesPerSecondOf(report: unknown, topic: string): number {
|
|
39
|
+
if (!isDataRateReport(report)) return 1;
|
|
40
|
+
return rateOf(
|
|
41
|
+
report.topics.find((entry) => entry.topic === topic) ??
|
|
42
|
+
report.tiers.find((entry) => entry.tier === "base"),
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Read as a report only when both lists are present, so any other payload reads as none. */
|
|
47
|
+
function isDataRateReport(value: unknown): value is DataRateReport {
|
|
48
|
+
return (
|
|
49
|
+
typeof value === "object" &&
|
|
50
|
+
value !== null &&
|
|
51
|
+
Array.isArray(Reflect.get(value, "tiers")) &&
|
|
52
|
+
Array.isArray(Reflect.get(value, "topics"))
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The samples a game second a rate tier carries now, read off a
|
|
58
|
+
* `system.dataRates` report. One a second when `report` is absent or not a
|
|
59
|
+
* report, or names no such tier. Useful for knowing how fast the mod sends the
|
|
60
|
+
* Topics at a tier, such as the fastest a screen can be sent them. Used by the
|
|
61
|
+
* main screen's pacing of its stations.
|
|
62
|
+
*
|
|
63
|
+
* @category Reading telemetry
|
|
64
|
+
*/
|
|
65
|
+
export function tierSamplesPerSecondOf(
|
|
66
|
+
report: unknown,
|
|
67
|
+
tier: DataRateTier,
|
|
68
|
+
): number {
|
|
69
|
+
if (!isDataRateReport(report)) return 1;
|
|
70
|
+
return rateOf(report.tiers.find((entry) => entry.tier === tier));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* A sample rate becomes the plain number samples are counted in, such as how many a timeline keeps. */
|
|
74
|
+
function rateOf(
|
|
75
|
+
row: Pick<DataRateReport["tiers"][number], "samplesPerSecond"> | undefined,
|
|
76
|
+
): number {
|
|
77
|
+
return magnitudeOr(row?.samplesPerSecond, 1);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/*
|
|
81
|
+
* Fields too large to keep on every sample of a Topic sent above the base
|
|
82
|
+
* rate, and read only from the sample on screen. A vessel.landing sample is
|
|
83
|
+
* about 61 KB with its terrain and 1.4 KB without, so at ten a second its
|
|
84
|
+
* history would hold close to a gigabyte if every sample kept them.
|
|
85
|
+
*/
|
|
86
|
+
const SUPERSEDED_FIELDS: ReadonlyMap<string, readonly string[]> = new Map([
|
|
87
|
+
[
|
|
88
|
+
"vessel.landing",
|
|
89
|
+
[
|
|
90
|
+
"siteHeights",
|
|
91
|
+
"horizonAngles",
|
|
92
|
+
"groundTrackDistances",
|
|
93
|
+
"groundTrackElevations",
|
|
94
|
+
],
|
|
95
|
+
],
|
|
96
|
+
]);
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* True for a Topic whose history drops some fields once a sample is no longer
|
|
100
|
+
* the one on screen, as {@link supersededPayload} drops them. Useful for
|
|
101
|
+
* skipping that work on every other Topic. Used by every screen's timelines and
|
|
102
|
+
* by the main screen's relay to stations.
|
|
103
|
+
*
|
|
104
|
+
* @category Reading telemetry
|
|
105
|
+
*/
|
|
106
|
+
export function hasSupersededFields(topic: string): boolean {
|
|
107
|
+
return SUPERSEDED_FIELDS.has(topic);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* A sample's payload once a newer sample of its Topic is on screen: the same
|
|
112
|
+
* payload without the fields only the sample on screen is read for, such as
|
|
113
|
+
* Landing Status's terrain on `vessel.landing`. The payload itself, unchanged,
|
|
114
|
+
* for any other Topic or when none of those fields are present. Useful for
|
|
115
|
+
* keeping a long history of a fast Topic without holding its largest fields on
|
|
116
|
+
* every sample. Used by every screen's timelines and by the main screen's
|
|
117
|
+
* relay to stations.
|
|
118
|
+
*
|
|
119
|
+
* @category Reading telemetry
|
|
120
|
+
*/
|
|
121
|
+
export function supersededPayload<Payload>(
|
|
122
|
+
topic: string,
|
|
123
|
+
payload: Payload,
|
|
124
|
+
): Payload {
|
|
125
|
+
const fields = SUPERSEDED_FIELDS.get(topic);
|
|
126
|
+
if (!fields || payload === null || typeof payload !== "object") {
|
|
127
|
+
return payload;
|
|
128
|
+
}
|
|
129
|
+
const record = payload as Record<string, unknown>;
|
|
130
|
+
if (!fields.some((field) => field in record)) return payload;
|
|
131
|
+
const kept: Record<string, unknown> = {};
|
|
132
|
+
for (const key of Object.keys(record)) {
|
|
133
|
+
if (!fields.includes(key)) kept[key] = record[key];
|
|
134
|
+
}
|
|
135
|
+
return kept as Payload;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/*
|
|
139
|
+
* The mod's own list of fields it sends on a connection only when they change:
|
|
140
|
+
* values the game retakes about once a second or less, which would otherwise
|
|
141
|
+
* repeat unchanged on every sample of a Topic sent ten times a second.
|
|
142
|
+
*/
|
|
143
|
+
const SENT_ON_CHANGE: ReadonlyMap<string, readonly string[]> = new Map([
|
|
144
|
+
["vessel.landing", ["siteHeights", "horizonAngles"]],
|
|
145
|
+
]);
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The payload fields of a Topic that the mod sends on a connection only when
|
|
149
|
+
* they change, such as Landing Status's terrain grid and skyline on
|
|
150
|
+
* `vessel.landing`. Empty for every other Topic. A sample that leaves one out
|
|
151
|
+
* names it in the `stream-data` frame's `unchanged` list. Useful for passing a
|
|
152
|
+
* Topic's samples on to another screen without repeating those fields on every
|
|
153
|
+
* sample. Used by the main screen's relay to stations.
|
|
154
|
+
*
|
|
155
|
+
* @category Reading telemetry
|
|
156
|
+
*/
|
|
157
|
+
export function fieldsSentOnChange(topic: string): readonly string[] {
|
|
158
|
+
return SENT_ON_CHANGE.get(topic) ?? [];
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Puts back into `payload` each field `unchanged` names, taken from `previous`,
|
|
163
|
+
* the last payload of the same Topic received on the same connection. A field
|
|
164
|
+
* `previous` does not hold stays absent, since its value is not known. Changes
|
|
165
|
+
* `payload` in place.
|
|
166
|
+
*/
|
|
167
|
+
export function fillUnchangedFields(
|
|
168
|
+
payload: unknown,
|
|
169
|
+
unchanged: readonly string[],
|
|
170
|
+
previous: unknown,
|
|
171
|
+
): void {
|
|
172
|
+
if (typeof payload !== "object" || payload === null) return;
|
|
173
|
+
if (typeof previous !== "object" || previous === null) return;
|
|
174
|
+
for (const field of unchanged) {
|
|
175
|
+
if (field in previous)
|
|
176
|
+
Reflect.set(payload, field, Reflect.get(previous, field));
|
|
177
|
+
}
|
|
178
|
+
}
|
package/src/delay-roles.ts
CHANGED
|
@@ -79,7 +79,7 @@ export type HeldAtHomeTopic = GeneratedHeldAtHomeTopic;
|
|
|
79
79
|
* How the running mod says each Topic is delayed, as carried on the
|
|
80
80
|
* `delayRoles` field of `system.uplinks`. It covers Uplink Topics as well as
|
|
81
81
|
* Gonogo's own. A Topic in none of the sets, and not under a prefix in
|
|
82
|
-
* `trueNowPrefixes`, is delayed. Useful for reading an Uplink's Topics in the
|
|
82
|
+
* `trueNowPrefixes` or `heldAtHomePrefixes`, is delayed. Useful for reading an Uplink's Topics in the
|
|
83
83
|
* right delay lane. Returned by {@link readDeclaredDelayRoles} and taken by
|
|
84
84
|
* {@link delayLaneOf}.
|
|
85
85
|
*
|
|
@@ -92,12 +92,25 @@ export interface DeclaredDelayRoles {
|
|
|
92
92
|
readonly heldAtHome: ReadonlySet<string>;
|
|
93
93
|
/** Prefixes under which every Topic is read with no signal delay. */
|
|
94
94
|
readonly trueNowPrefixes: readonly string[];
|
|
95
|
+
/**
|
|
96
|
+
* Prefixes under which every Topic is held at the home command centre, such
|
|
97
|
+
* as one record per saved craft. The mod applies each centre's delay home
|
|
98
|
+
* before it sends them, so they are read as received. A mod that predates the
|
|
99
|
+
* list sends none.
|
|
100
|
+
*/
|
|
101
|
+
readonly heldAtHomePrefixes?: readonly string[];
|
|
95
102
|
/**
|
|
96
103
|
* Addressed Topics: those whose values are each sent to one particular
|
|
97
104
|
* command centre, such as that centre's own contact plan. The mod delivers
|
|
98
105
|
* each value after its own delay, so it is read as received.
|
|
99
106
|
*/
|
|
100
107
|
readonly addressed: ReadonlySet<string>;
|
|
108
|
+
/**
|
|
109
|
+
* Topics that describe whichever craft is active, each kept per craft, such
|
|
110
|
+
* as an Uplink's life-support reading. A screen shows the active craft's own
|
|
111
|
+
* newest reading of each. A mod that predates the list sends none.
|
|
112
|
+
*/
|
|
113
|
+
readonly followsActiveCraft?: ReadonlySet<string>;
|
|
101
114
|
}
|
|
102
115
|
|
|
103
116
|
const GENERATED_ROLES: DeclaredDelayRoles = {
|
|
@@ -140,7 +153,9 @@ export function readDeclaredDelayRoles(
|
|
|
140
153
|
trueNow: new Set(trueNow),
|
|
141
154
|
heldAtHome: new Set(heldAtHome),
|
|
142
155
|
trueNowPrefixes,
|
|
156
|
+
heldAtHomePrefixes: stringsOf(raw.heldAtHomePrefixes) ?? [],
|
|
143
157
|
addressed: new Set(stringsOf(raw.addressed) ?? []),
|
|
158
|
+
followsActiveCraft: new Set(stringsOf(raw.followsActiveCraft) ?? []),
|
|
144
159
|
};
|
|
145
160
|
}
|
|
146
161
|
|
|
@@ -196,7 +211,9 @@ export function delayLaneOf(
|
|
|
196
211
|
) {
|
|
197
212
|
return "true-now";
|
|
198
213
|
}
|
|
199
|
-
|
|
214
|
+
const heldPrefixes = roles.heldAtHomePrefixes ?? [];
|
|
215
|
+
return roles.trueNowPrefixes.some((prefix) => topic.startsWith(prefix)) ||
|
|
216
|
+
heldPrefixes.some((prefix) => topic.startsWith(prefix))
|
|
200
217
|
? "true-now"
|
|
201
218
|
: "delayed";
|
|
202
219
|
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Degrees either axis may be off the port's line for a docking mark to read as
|
|
3
|
+
* lined up. Useful for colouring an alignment cue the same way as the four
|
|
4
|
+
* triangles. Used by the Rendezvous widget's border cue.
|
|
5
|
+
*
|
|
6
|
+
* @category Widget slots
|
|
7
|
+
*/
|
|
8
|
+
export const DOCK_LINED_UP_DEG = 1;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The four marks around a docking port, named for the side of the port each
|
|
12
|
+
* sits on. Useful for drawing or styling one triangle at a time. Used by
|
|
13
|
+
* {@link dockMarkStyles} and {@link dockMarkPath}.
|
|
14
|
+
*
|
|
15
|
+
* @category Widget slots
|
|
16
|
+
*/
|
|
17
|
+
export type DockMarkSide = "top" | "right" | "bottom" | "left";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* How one of the four triangles around the target port is drawn: its colour as
|
|
21
|
+
* a CSS colour, whether it is outlined and dashed rather than filled, and
|
|
22
|
+
* whether it is left out. A field left out keeps the drawer's default.
|
|
23
|
+
* Useful for painting the same triangles on a camera picture and on a drawn
|
|
24
|
+
* view. Used by the Rendezvous widget and its camera augment.
|
|
25
|
+
*
|
|
26
|
+
* @category Widget slots
|
|
27
|
+
*/
|
|
28
|
+
export interface DockMarkStyle {
|
|
29
|
+
/** The CSS colour of the triangle. */
|
|
30
|
+
colour?: string;
|
|
31
|
+
/** Whether the triangle is outlined and dashed rather than filled. */
|
|
32
|
+
dashed?: boolean;
|
|
33
|
+
/** Whether the triangle is left out. */
|
|
34
|
+
hidden?: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* What the four triangles around the target port are drawn from: whether they
|
|
39
|
+
* show, the horizontal and vertical angles off the port's line, and whether the
|
|
40
|
+
* ports are aligned or docked. Useful for styling the triangles the same on a
|
|
41
|
+
* camera picture and a drawn view. Taken by {@link dockMarkStyles}.
|
|
42
|
+
*
|
|
43
|
+
* @category Widget slots
|
|
44
|
+
*/
|
|
45
|
+
export interface DockMarkInput {
|
|
46
|
+
/** Whether the port is in front of the lens, in frame and not hidden behind something; with no camera, whether the port is inside the drawn circle. */
|
|
47
|
+
visible: boolean;
|
|
48
|
+
/** Horizontal line-of-sight angle to the target port in degrees, `undefined` while it is not reported. */
|
|
49
|
+
ax: number | undefined;
|
|
50
|
+
/** Vertical line-of-sight angle to the target port in degrees, `undefined` while it is not reported. */
|
|
51
|
+
ay: number | undefined;
|
|
52
|
+
/** True while the two ports face each other head-on. */
|
|
53
|
+
aligned: boolean;
|
|
54
|
+
/** True once the own port has captured the target port or is joined to it. */
|
|
55
|
+
docked: boolean;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const LINED_UP = "var(--color-accent-fg)";
|
|
59
|
+
const OFF = "var(--color-warn-mark)";
|
|
60
|
+
const HIDDEN: DockMarkStyle = { hidden: true };
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The look of the four triangles around the target port: top and bottom
|
|
64
|
+
* follow the vertical angle, left and right the horizontal one. A triangle is
|
|
65
|
+
* green while its angle is within {@link DOCK_LINED_UP_DEG} and amber outside
|
|
66
|
+
* it, and all four are green once the port has captured or joined the target.
|
|
67
|
+
* Filled while the ports face each other head-on, outlined and dashed while
|
|
68
|
+
* they do not. None is drawn unless the port is visible.
|
|
69
|
+
* Useful for giving a camera picture and a drawn view the same markers. Used
|
|
70
|
+
* by the Rendezvous widget and its camera augment.
|
|
71
|
+
*
|
|
72
|
+
* @category Widget slots
|
|
73
|
+
*/
|
|
74
|
+
export function dockMarkStyles(
|
|
75
|
+
input: DockMarkInput,
|
|
76
|
+
): Record<DockMarkSide, DockMarkStyle> {
|
|
77
|
+
const { visible, ax, ay, aligned, docked } = input;
|
|
78
|
+
if (!visible) {
|
|
79
|
+
return { top: HIDDEN, right: HIDDEN, bottom: HIDDEN, left: HIDDEN };
|
|
80
|
+
}
|
|
81
|
+
const side = (angle: number | undefined): DockMarkStyle => {
|
|
82
|
+
if (docked) return { colour: LINED_UP, dashed: false };
|
|
83
|
+
if (angle === undefined || !Number.isFinite(angle)) return HIDDEN;
|
|
84
|
+
return {
|
|
85
|
+
colour: Math.abs(angle) <= DOCK_LINED_UP_DEG ? LINED_UP : OFF,
|
|
86
|
+
dashed: !aligned,
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
const vertical = side(ay);
|
|
90
|
+
const horizontal = side(ax);
|
|
91
|
+
return {
|
|
92
|
+
top: vertical,
|
|
93
|
+
bottom: vertical,
|
|
94
|
+
left: horizontal,
|
|
95
|
+
right: horizontal,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Where the four triangles sit, in pixels: the centre of the port, half the
|
|
101
|
+
* side of the box they surround, the side of each triangle, and the stroke.
|
|
102
|
+
* Useful for drawing the triangles on a picture at any size. Taken by
|
|
103
|
+
* {@link dockMarkPath}.
|
|
104
|
+
*
|
|
105
|
+
* @category Widget slots
|
|
106
|
+
*/
|
|
107
|
+
export interface DockMarkGeometry {
|
|
108
|
+
/** The horizontal centre of the port. */
|
|
109
|
+
cx: number;
|
|
110
|
+
/** The vertical centre of the port. */
|
|
111
|
+
cy: number;
|
|
112
|
+
/** Half the side of the box the triangles surround. */
|
|
113
|
+
half: number;
|
|
114
|
+
/** The side of each triangle. */
|
|
115
|
+
arm: number;
|
|
116
|
+
/** The stroke width. */
|
|
117
|
+
stroke: number;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The smallest size the triangles keep on a camera picture, in the picture's
|
|
122
|
+
* pixels, so they stay readable when the port is far away. Useful for an Uplink
|
|
123
|
+
* that draws the marks over its own video.
|
|
124
|
+
*
|
|
125
|
+
* @category Widget slots
|
|
126
|
+
* @intent an Uplink drawing the dock marks over its own camera picture passes these as the floors of {@link dockMarkGeometry}
|
|
127
|
+
*/
|
|
128
|
+
export const DOCK_MARK_CAMERA_FLOORS = {
|
|
129
|
+
half: 14,
|
|
130
|
+
arm: 6,
|
|
131
|
+
stroke: 2,
|
|
132
|
+
} as const;
|
|
133
|
+
|
|
134
|
+
/** The share of the box's side one triangle takes. */
|
|
135
|
+
const ARM_FRACTION = 0.3;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The geometry of the triangles for a port at `centre` whose apparent radius
|
|
139
|
+
* is `radiusPx`: the box is that radius on a side half, never below a floor,
|
|
140
|
+
* and each triangle is a share of the box's side. A camera picture keeps the
|
|
141
|
+
* floors {@link DOCK_MARK_CAMERA_FLOORS}; a smaller drawing passes its own.
|
|
142
|
+
* Useful for sizing the triangles with the port's range. Used by the
|
|
143
|
+
* Rendezvous widget's drawn view.
|
|
144
|
+
*
|
|
145
|
+
* @category Widget slots
|
|
146
|
+
*/
|
|
147
|
+
export function dockMarkGeometry(
|
|
148
|
+
centre: { x: number; y: number },
|
|
149
|
+
radiusPx: number,
|
|
150
|
+
floors: {
|
|
151
|
+
half: number;
|
|
152
|
+
arm: number;
|
|
153
|
+
stroke: number;
|
|
154
|
+
} = DOCK_MARK_CAMERA_FLOORS,
|
|
155
|
+
): DockMarkGeometry {
|
|
156
|
+
const half = Math.max(floors.half, radiusPx);
|
|
157
|
+
const arm = Math.max(floors.arm, ARM_FRACTION * half * 2);
|
|
158
|
+
return { cx: centre.x, cy: centre.y, half, arm, stroke: floors.stroke };
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The outline of one triangle: outside the box on its side, its tip on the
|
|
163
|
+
* box's edge pointing at the port. Useful for drawing the marks in an SVG.
|
|
164
|
+
* Used by the Rendezvous widget's drawn view.
|
|
165
|
+
*
|
|
166
|
+
* @category Widget slots
|
|
167
|
+
*/
|
|
168
|
+
export function dockMarkPath(side: DockMarkSide, g: DockMarkGeometry): string {
|
|
169
|
+
const { cx, cy, half: h, arm: a } = g;
|
|
170
|
+
const t = a * 0.8;
|
|
171
|
+
const w = a / 2;
|
|
172
|
+
switch (side) {
|
|
173
|
+
case "top":
|
|
174
|
+
return `M${cx} ${cy - h}L${cx - w} ${cy - h - t}L${cx + w} ${cy - h - t}Z`;
|
|
175
|
+
case "right":
|
|
176
|
+
return `M${cx + h} ${cy}L${cx + h + t} ${cy - w}L${cx + h + t} ${cy + w}Z`;
|
|
177
|
+
case "bottom":
|
|
178
|
+
return `M${cx} ${cy + h}L${cx + w} ${cy + h + t}L${cx - w} ${cy + h + t}Z`;
|
|
179
|
+
default:
|
|
180
|
+
return `M${cx - h} ${cy}L${cx - h - t} ${cy + w}L${cx - h - t} ${cy - w}Z`;
|
|
181
|
+
}
|
|
182
|
+
}
|
package/src/envelope.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Hand-owned: RT cannot derive the union alias from C# generics. Under the drift gate.
|
|
2
2
|
|
|
3
3
|
import type {
|
|
4
|
+
CapRate,
|
|
4
5
|
ClaimRequest,
|
|
5
6
|
CommandAccepted,
|
|
6
7
|
CommandGroupRequest,
|
|
@@ -12,6 +13,7 @@ import type {
|
|
|
12
13
|
Hello,
|
|
13
14
|
Ping,
|
|
14
15
|
Pong,
|
|
16
|
+
SetRate,
|
|
15
17
|
SetVantage,
|
|
16
18
|
StreamData,
|
|
17
19
|
Subscribe,
|
|
@@ -56,4 +58,6 @@ export type ClientMessage =
|
|
|
56
58
|
| CommandRequest<unknown>
|
|
57
59
|
| CommandGroupRequest
|
|
58
60
|
| ClaimRequest
|
|
61
|
+
| SetRate
|
|
62
|
+
| CapRate
|
|
59
63
|
| Ping;
|
package/src/flight/types.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FlightEndReason } from "../__generated__/contract";
|
|
1
2
|
import type { DataKey, StreamStatusValue } from "../api/types";
|
|
2
3
|
import type { BandKind, Reading, ReckoningBasis } from "../reading";
|
|
3
4
|
import type { TopicId } from "../topics";
|
|
@@ -328,8 +329,10 @@ export interface ReadingSeriesRange<Payload = unknown> {
|
|
|
328
329
|
export interface FlightRecord {
|
|
329
330
|
/** This flight's identifier. */
|
|
330
331
|
id: string;
|
|
331
|
-
/** The vessel's name when the
|
|
332
|
+
/** The vessel's name now, or when the flight ended. */
|
|
332
333
|
vesselName: string;
|
|
334
|
+
/** The name the vessel launched with. Absent while it is the same as `vesselName`. */
|
|
335
|
+
launchName?: string;
|
|
333
336
|
/** The game's identifier for the vessel, when it has one. */
|
|
334
337
|
vesselUid?: string | null;
|
|
335
338
|
/** Wall-clock ms when the recording began. */
|
|
@@ -362,6 +365,18 @@ export interface FlightRecord {
|
|
|
362
365
|
* vessel and the operator might still recover its remains.
|
|
363
366
|
*/
|
|
364
367
|
outcome?: FlightOutcome;
|
|
368
|
+
/**
|
|
369
|
+
* Why the flight ended, as the `flight.ended` notice named it. Absent while the
|
|
370
|
+
* flight is open and for a recording that stopped without one, such as the
|
|
371
|
+
* operator leaving the flight scene.
|
|
372
|
+
*/
|
|
373
|
+
endReason?: FlightEndReason;
|
|
374
|
+
/** The names of the kerbals who went on EVA from this vessel during the flight, in the order they went. Absent when none did. */
|
|
375
|
+
evaKerbals?: string[];
|
|
376
|
+
/** The id of the craft the vessel joined, when `endReason` is `FlightEndReason.Docked`. */
|
|
377
|
+
joinedVesselId?: string;
|
|
378
|
+
/** The name of the craft the vessel joined, when `endReason` is `FlightEndReason.Docked`. */
|
|
379
|
+
joinedVesselName?: string;
|
|
365
380
|
/**
|
|
366
381
|
* The UT, in seconds, of the first captured frame, set only by a recorder
|
|
367
382
|
* that works in UT. A graph of such a record queries its range with these:
|
|
@@ -468,8 +483,10 @@ export interface FlightChapterRecord {
|
|
|
468
483
|
export interface MissionMeta {
|
|
469
484
|
/** This mission's identifier. */
|
|
470
485
|
id: string;
|
|
471
|
-
/** The vessel's name. */
|
|
486
|
+
/** The vessel's name now, or when the flight ended. */
|
|
472
487
|
vesselName: string;
|
|
488
|
+
/** The name the vessel launched with. Absent while it is the same as `vesselName`. */
|
|
489
|
+
launchName?: string;
|
|
473
490
|
/** Wall-clock ms when recording started. */
|
|
474
491
|
launchedAt: number;
|
|
475
492
|
/** UT (seconds) of the first captured frame. */
|
|
@@ -497,6 +514,18 @@ export interface MissionMeta {
|
|
|
497
514
|
* automatically, but can still be deleted by hand. Absent means not starred.
|
|
498
515
|
*/
|
|
499
516
|
starred?: boolean;
|
|
517
|
+
/**
|
|
518
|
+
* Why the flight ended, as the `flight.ended` notice named it. Absent for a
|
|
519
|
+
* recording that stopped without one, such as the operator leaving the flight
|
|
520
|
+
* scene, and for a mission recorded before it was kept.
|
|
521
|
+
*/
|
|
522
|
+
endReason?: FlightEndReason;
|
|
523
|
+
/** The names of the kerbals who went on EVA from this vessel during the flight, in the order they went. Absent when none did. */
|
|
524
|
+
evaKerbals?: string[];
|
|
525
|
+
/** The id of the craft the vessel joined, when `endReason` is `FlightEndReason.Docked`. */
|
|
526
|
+
joinedVesselId?: string;
|
|
527
|
+
/** The name of the craft the vessel joined, when `endReason` is `FlightEndReason.Docked`. */
|
|
528
|
+
joinedVesselName?: string;
|
|
500
529
|
/**
|
|
501
530
|
* User-authored chapters / markers, as `FlightChapterRecord`. Its
|
|
502
531
|
* `startMs`/`endMs` are literal milliseconds elapsed since `firstFrameUt`,
|
package/src/frames/index.ts
CHANGED
|
@@ -101,9 +101,6 @@
|
|
|
101
101
|
* - `frameSides` and `FrameSides`, which replicate the in-game frame selector's
|
|
102
102
|
* own notion of which bodies sit on each side, and so track something outside
|
|
103
103
|
* this repo
|
|
104
|
-
* - the two station-keeping thresholds behind `LibrationStationKeeping`, which
|
|
105
|
-
* are tuning rather than physics: read the meaning, not the distance it was
|
|
106
|
-
* cut at
|
|
107
104
|
* - `CelestialFacts` and `CelestialBody`, the catalogue every function below
|
|
108
105
|
* takes. Already on the root barrel, which is where the catalogue is produced,
|
|
109
106
|
* and a type reachable through two paths raises a canonicality question for no
|
|
@@ -130,7 +127,6 @@ export {
|
|
|
130
127
|
type LibrationPair,
|
|
131
128
|
type LibrationPoint,
|
|
132
129
|
type LibrationRefusal,
|
|
133
|
-
type LibrationStationKeeping,
|
|
134
130
|
lagrangePointsAt,
|
|
135
131
|
librationOffsetOf,
|
|
136
132
|
librationPairLabel,
|