tpt-rust2

Rust

No_std runtime units, timeseries alignment, infrastructure topology, and physical property tables (water/air/fuels) for the TUP protocol stack.

0 stars0 forks0 watchers1 open issues

Languages

Rust99.0%Just1.0%
README

tpt-rust2 — The Language & Physics

tpt-rust2 is the second layer of the TPT platform. It provides the strict physical language, spatial topologies, and thermodynamic property tables required to understand the data carried inside a TUP envelope. It bridges the gap between raw telemetry and mathematical physics.

tpt-rust2 consumes raw TUP telemetry and applies physical context:

  • Read Path: TUP Envelope → tpt-units-runtime (converts to standard SI) → tpt-timeseries-align (syncs to a deterministic time grid).
  • Context Path: tpt-geo-topology + tpt-props-water → physical constants for the Brain (tpt-rust-4).

Crates

CratePurpose
tpt-tup-schemaTUP envelope structs, macros, and strict validation
tpt-units-runtimeDynamic, registry-based unit conversion
tpt-timeseries-alignMulti-rate sensor stream alignment onto a time grid
tpt-timeseries-gapStaleness/freeze detection and gap-filling
tpt-geo-topologyInfrastructure-aware directed graphs (pipes/wires/ducts)
tpt-geo-assetGeographic coordinate → TUP device ID / network node registry
tpt-network-matrixIncidence & admittance matrix generation
tpt-props-waterPure-Rust, no_std IAPWS-IF97 water/steam tables
tpt-props-airno_std ASHRAE psychrometrics / moist-air properties
tpt-props-fuelsHeating value, density, combustion properties

Core Principles

  1. Runtime over compile-time — TUP payloads are dynamic; units and dimensions must be resolvable at runtime without sacrificing type safety in the domain logic.
  2. Pure Rust physics — no unsafe C-bindings; everything is no_std capable.
  3. Infrastructure-aware graphs — topology graphs understand upstream/downstream flow, not just generic node-edge relationships.

Design

See spec.txt for the full crate descriptions and the "TUP Integration & Data Flow" section that motivates the phase ordering.

Building

cargo build
cargo test

Each crate is no_std compatible (feature-gated alloc/std).