Expand description
Time dilation effects for special and general relativity.
Structs§
- Clock
Comparison - Visualize two clocks at different velocities/heights side by side.
- Dilated
Clock - A clock experiencing time dilation due to velocity.
- Time
Dilation Renderer - Render clocks with tick rate proportional to proper time rate.
Functions§
- gps_
time_ correction - Compute the GPS time correction needed per day. Combines special relativistic (velocity) and general relativistic (gravity) effects. Returns the correction in seconds per day.
- gravitational_
time_ dilation - Gravitational time dilation (weak field approximation). dt_high / dt_low = 1 + g*h/c^2 (to first order). Returns the fractional time difference for height_diff.
- integrated_
proper_ time - Multi-step time dilation for a clock undergoing varying velocity. Takes a series of (duration, velocity) segments and returns total proper time.
- muon_
lifetime - Dilated muon lifetime. Rest lifetime ~ 2.2 microseconds. Returns the dilated lifetime at speed v.
- muon_
travel_ distance - Distance a muon can travel at speed v given dilated lifetime.
- time_
dilation_ factor - Time dilation factor: returns gamma. Proper time interval = coordinate time / gamma.
- twin_
paradox - Twin paradox calculation. Given a distance (one way) and travel speed v, returns (traveler_time, stay_at_home_time). Assumes instantaneous turnaround.