Skip to content

Parts and the declaration model

Draft

This page is scaffolded. The outline below marks what it should cover; the Parts reference already renders every stock part from its docstring.

A Part is an atomic unit of behavior on a craft, and a craft is a tree of them. Parts declare their interface at class scope using five sentinels, and the framework walks those declarations at compile time to build the symbolic graph.

To cover

  • The five declaration sentinels — what each is and when to reach for it:
    • Parameter(default, manifold=…) — frozen at construction; baked into the graph (promotable for Fit).
    • State(init, manifold="R1"|"R3"|SO3Manifold(...)) — mutable per-tick state with manifold-correct boxplus.
    • Input(default) — per-tick user value.
    • Output() — per-tick observable (a sensor reading); shape is inferred from what the part writes into PartUpdate.outputs.
    • WhiteNoise(signal_manifold, *, frame=…, sigma=…) / RandomWalkNoise(...) — white noise, or an RW-bias state that synthesizes its own slot + driver. Both subclass Noise.
  • The craft tree — composite parts, mounting transforms, frames (PartFrame, ParentFrame, CraftFrame).
  • update() and PartUpdate — how a part contributes a Wrench and/or state derivatives each tick.
  • How declarations feed the transforms — a Noise channel becomes a Q/R contribution in the EKF; an Output becomes a measurement; a manifold Parameter becomes a fit variable.

Source material

  • Reference: Parts
  • Code: manta/parts/base.py, manta/parts/_declarations.py

Kinematic markers

Antenna is a pure kinematic marker for RF models. It reports the antenna phase center in world coordinates, the world-from-antenna orientation as a (w, x, y, z) quaternion, and the antenna frame's absolute angular velocity expressed in world coordinates. The craft pose, static mount orientation, and articulation chain are already composed into these outputs by the common kinematic pass. Propagation, radiation patterns, tracking, and link policy remain outside the part.