feat(p3): falcon rate controller P3 stream variant — first control-cascade engine (#168)#188
Merged
Merged
Conversation
…scade engine (#168, STREAM-P05) Extends streamification from the cFS engines (LC/SCH/HK/SC) to the CONTROL CASCADE. The rate controller is the first flight-control engine as a P3 async stream, toward a composed flight-control stream pipeline (iekf->pos->att->rate ->mixer). De-risked: built the proven cFS-stream way (rust_wasm_component_bindgen, wasi p3, deps on the verified :relay-rate Bazel library) rather than the cascade's cargo-component path, with a SELF-CONTAINED WIT (falcon:rate-stream) that does not touch the shared, fragile cascade.wit. - wit/falcon-rate-stream/rate_stream.wit: monitor: func(stream<rate-input>) -> stream<torque-setpoint>. - wasm/cm/rate/src/stream.rs: async fn monitor over a StreamReader<RateInput>, driving relay_rate::RatePid::tick (the verified body-rate PID; stateful PID + 1 kHz timestamp like the sync component) — use relay_rate, NOT an inline copy. - BUILD.bazel: falcon_rate_stream_wit + //:falcon-rate-stream (wasi=p3) deps on :relay-rate. - bazel.yml: builds //:falcon-rate-stream in CI (exercised, #168 lesson). - SWREQ-RELAY-STREAM-P05 -> FV-RELAY-STREAM-005. rivet validate PASS. New P3 direction (user-scoped) after the cFS streamification completed at v1.65. The cascade build path is new territory, so the P3 build is CI-validated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends streamification from the cFS engines (LC/SCH/HK/SC, done at v1.65) to the control cascade. The rate controller is the first flight-control engine as a P3 async stream — toward a composed flight-control stream pipeline (iekf→pos→att→rate→mixer).
De-risked approach
Built the proven cFS-stream way (
rust_wasm_component_bindgen, wasi p3,depson the verified:relay-rateBazel library) rather than the cascade's finickycargo-componentpath — with a self-contained WIT (falcon:rate-stream) that does NOT touch the shared, fragilecascade.wit. This collapses the risk to "known pattern, new dep + new types."What's here
wit/falcon-rate-stream/rate_stream.wit:monitor: func(stream<rate-input>) -> stream<torque-setpoint>.wasm/cm/rate/src/stream.rs: async stream transformer drivingrelay_rate::RatePid::tick(the verified body-rate PID; stateful PID + 1 kHz timestamp, exactly as the syncfalcon-rate) —use relay_rate, not an inline copy.//:falcon-rate-stream(wasi=p3) deps:relay-rate; built + exercised in CI (bazel.yml).SWREQ-RELAY-STREAM-P05 -> FV-RELAY-STREAM-005, rivet PASS.Verification note
The cascade build path is new territory (vs the four proven cFS streams), so the P3 build is CI-validated via the Component Model cascade job. API verified against
relay-rate/plain(RatePid::new/tick([f32;3],[f32;3])->[f32;3]/Timestamp).Falsification: wrong if
//:falcon-rate-streamfails to build as a P3 component; ifmonitor()calls a method absent fromrelay_rate; or if a copy of the PID logic crept in instead of the:relay-ratedep.🤖 Generated with Claude Code