Angular Time Coordination for Robotics
Robot control loops, trajectory planners, and sensor-fusion pipelines all depend on phase. temporalBLOCK exposes θ — the angular phase coordinate of the Temporal Spiral — as a first-class API value, giving every node on your robot the same certified phase reference without a local PTP daemon.
θ as the angular velocity / phase coordinate
Every /v1/spiral response returns sin(θ) and cos(θ) for each of the Temporal Spiral's 12 nested time scales — from microseconds to millennia. Because θ is encoded as a unit-circle pair rather than a raw angle, phase stays continuous across day, year, and era boundaries — exactly what a control loop needs.
Use atan2(sin, cos) to recover θ ∈ [−π, π] at any granularity. For a 1 Hz control loop, the second-scale rung gives the fractional position of the current second within its minute. For slower planners, the minute- or hour-scale rung gives the same quantity at a coarser resolution. Full θ reference →
// Fetch θ (theta) for the current moment — the angular phase coordinate
// across every time scale from microseconds to years.
const { scales } = await fetch(
"https://api.temporalblock.com/api/v1/spiral",
{ headers: { "X-API-Key": process.env.TBLK_API_KEY } }
).then((r) => r.json());
// scales[0] is the finest rung (microseconds).
// Each rung exposes sin(θ) and cos(θ) — a unit-circle encoding that
// keeps phase continuous across midnight, year, and era boundaries.
const { sin, cos } = scales[0];
// Use atan2(sin, cos) to recover θ ∈ [−π, π] without discontinuities.
const thetaRad = Math.atan2(sin, cos);Stamp every sensor frame with a certified Spiral coordinate
Vision Block lets you POST a capture timestamp (hardware PTP or software) and receive back the full Spiral coordinate — including θ — for that exact instant. Every camera frame, LiDAR scan, or IMU sample gets a tamper-evident temporal address you can correlate across nodes without relying on local clock agreement.
// Stamp every camera frame or LiDAR scan with a certified Spiral coordinate.
// The Vision Block API returns the θ phase for the exact capture instant.
const stamp = await fetch(
"https://api.temporalblock.com/api/v1/vision-block/stamp",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": process.env.TBLK_API_KEY,
},
body: JSON.stringify({
capturedAtUtcMs: Date.now(), // replace with hardware PTP timestamp
sensorId: "lidar-front",
}),
}
).then((r) => r.json());
// stamp.spiralCoordinate.scales[N].sin / .cos gives sin(θ) and cos(θ)
// for the capture moment across every temporal scale — microseconds to years.
const { sin, cos } = stamp.spiralCoordinate.scales[0];The stamp is anchored to an NTP/NTS-disciplined server clock. On dedicated deployments, PTP (IEEE 1588) hardware timestamping is available for sub-microsecond envelopes.
Strict event ordering across distributed robot nodes
When multiple compute nodes write joint-angle snapshots, state transitions, or planning events, wall-clock timestamps collide within the same millisecond. Causal Block issues Hybrid Logical Clock tuples that always strictly increase — even across nodes writing concurrently — so your robot's event log has a total order you can replay deterministically.
// Enforce strict event ordering across distributed robot nodes.
// Each node writes to the same Causal Block — no clock-skew collisions.
const event = await fetch(
"https://api.temporalblock.com/api/v1/causal-block/event",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": process.env.TBLK_API_KEY,
},
body: JSON.stringify({
label: "joint-angle-snapshot",
payload: { nodeId: "arm-left", joints: [1.57, 0.0, -0.78] },
}),
}
).then((r) => r.json());
// event.hlc is a Hybrid Logical Clock tuple that ALWAYS strictly increases —
// even across nodes writing within the same millisecond.
console.log(event.hlc); // { wallMs: 1750000000123, counter: 4, nodeId: "..." }- Phase-locked control loops — use θ from the second-scale rung as the phase reference for PID or MPC loops without a local oscillator.
- Joint-space trajectory planning — encode waypoints as θ offsets so replays land on the correct phase regardless of wall-clock drift.
- Multi-sensor fusion — stamp each sensor stream with Vision Block and sort by Causal Block HLC to reconstruct a consistent world state across heterogeneous sensor clocks.
- Fleet coordination — every robot in the fleet reads the same certified θ from the API, eliminating inter-robot clock skew without a dedicated PTP master.
Add certified phase to your robot today
Free Lite tier includes /v1/spiral (θ coordinates) and /v1/calibrate. Vision Block and Causal Block require Standard or higher. No credit card to start.
Related
Temporal Spiral is patent pending — U.S. Provisional Application No. 64/065,213 (filed 2026-05-14).