Skip to main content

Temporal inference from physics models — no RTC, no NTP, no GPS

Project description

physics-clock — Temporal Inference from Physics

No RTC. No NTP. No GPS. The physics IS the clock.

Infers elapsed time from physical observations using Bayesian temporal inference across multiple independent physics models. Each model provides an independent clock signal. The joint probability gives precise time.

How It Works

  1. Observe physical quantities (temperature, sound speed, signal propagation, etc.)
  2. Each physics model gives P(observation | t)
  3. Bayesian fusion: P(t | all observations) ∝ Π P(obs_i | t) × P(t)
  4. Peak of posterior = best time estimate

Physics Clock Models

Model Physical Signal Clock Source
SoundSpeedClock UNESCO/Chen-Millero sound speed Depth-dependent timing
AbsorptionClock Francois-Garrison absorption Range-dependent timing
ThermalClock Silicon gate delay vs temperature Newtonian cooling/heating
PropagationClock Signal propagation delay Distance / speed
DopplerClock Doppler frequency shift Velocity integration
SiliconClock Gate delay fingerprint (PUF) Crystal aging drift

Quick Start

from physics_clock import PhysicsClock, ThermalClock, SoundSpeedClock

clock = PhysicsClock([
    ThermalClock(),
    SoundSpeedClock(),
])

result = clock.infer_time({
    "temperature": 40.0,
    "initial_temp": 60.0,
    "ambient_temp": 25.0,
    "thermal_tau": 120.0,
    "measured_speed": 1495.0,
    "descent_rate": 0.5,
    "surface_temp": 20.0,
    "salinity": 35.0,
}, t_min=0, t_max=300)

print(f"Elapsed: {result.timestamp:.1f}s ± {result.uncertainty:.1f}s")
print(f"Precision: {result.precision}")
print(f"Clocks used: {result.n_clocks}")

Use Cases

  • Underwater vehicles: infer time from sound speed + absorption + thermocline
  • Robot fleets: infer time from silicon timing + thermal + constraint load
  • IoT networks: infer time without NTP (physics is the sync protocol)
  • Security: verify device honesty through reality parity (can't fake physics)

Security: Reality Parity

The timing of constraint evaluation IS attestation:

from physics_clock import RealityParity

parity = RealityParity()
result = parity.check({
    "eval_ns": 15000,        # reported eval time
    "n_constraints": 100,     # constraints evaluated
    "temperature": 30.0,      # reported die temperature
    "voltage_mv": 3300.0,     # supply voltage
})

if not result.honest:
    print(f"Device flagged: {result.reason}")
    print(f"Expected {result.expected_eval_ns:.0f}ns, got {result.actual_eval_ns:.0f}ns")
    print(f"Deviation: {result.deviation_sigma:.1f}σ")
  • eval_time = f(complexity, temperature, voltage)
  • If reported timing doesn't match reported temperature → device is lying
  • No cryptographic keys needed. The physics can't be spoofed.

Composable With

  • cocapn-schemas: temporal fingerprint tile format
  • fleet-constraint-kernel: evaluation timing as temporal signal
  • fleet-proto: Rust version of physics clock types
  • temporal-auth: full authentication using physics-clock

Install

pip install physics-clock

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

physics_clock-0.1.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

physics_clock-0.1.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file physics_clock-0.1.0.tar.gz.

File metadata

  • Download URL: physics_clock-0.1.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for physics_clock-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3df8fd1a81b2f0c600eaa26b08fb75dda7ab8056fc1e70ea8e03ac520664ee66
MD5 480e826eb6f59d34175f5611dc61dbf5
BLAKE2b-256 5234ee0814f4cb1a90a3b20c5949030a94a7c8d7d23f31d7a71150316b0e451a

See more details on using hashes here.

File details

Details for the file physics_clock-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: physics_clock-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for physics_clock-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2681101f8107efccb5ef39d64181c228ed046383874336eb8a62a560892a03c9
MD5 ef4b703a4b3fc7f79d06ae02da4c44b4
BLAKE2b-256 b40f0882d5d59f178585a095920497fc489907e322cbcddf4585ea35964266e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page