Decent state to try using physical base quantities

This commit is contained in:
Louis Burke 2024-04-04 16:18:44 -04:00
parent 9505a92e45
commit 4c93277605

View file

@ -14,7 +14,7 @@ export @b6_str
export yocte, zepte, atte, femte, pice, nane, micre, mille, cente, dice export yocte, zepte, atte, femte, pice, nane, micre, mille, cente, dice
export yotte, zette, exe, pete, tere, gige, mege, kile, hecte, dece export yotte, zette, exe, pete, tere, gige, mege, kile, hecte, dece
export pace, tick, egg export pace, tick, egg, jolt, brr, °c
function __init__() function __init__()
@ -93,23 +93,24 @@ exe = b6"1e40" # E |
zette = b6"1e44" # Z | zette = b6"1e44" # Z |
yotte = b6"1e52" # Y | yotte = b6"1e52" # Y |
# TODO: consider scaling instants up, using moment for the base unit at a more
# human timescale
# Base Units # Base Units
pace = 1@unit p "p" Pace (lₛ * b6"1e114") false # ~86cm pace = 1@unit p "p" Pace (lₛ * b6"1e114") false # ~86cm
tick = 1@unit t "t" Tick (tₛ * b6"3e132") false # ~0.52s = 300₆ instants (1/tick ~115bpm) tick = 1@unit t "t" Tick (tₛ * b6"3e132") false # ~0.52s = 300₆ instants (1/tick ~115bpm)
egg = 1@unit e "e" Egg (mₛ * b6"1e14") false # ~112g egg = 1@unit e "e" Egg (mₛ * b6"1e14") false # ~112g
jolt = 1@unit j "j" Jolt (b6"1e34" * Unitful.q / tick) false # ~40mA painful jolt (https://electronics.stackexchange.com/questions/19103/how-much-voltage-current-is-dangerous) jolt = 1@unit j "j" Jolt (b6"1e34" * Unitful.q / tick) false # ~40mA painful jolt (https://electronics.stackexchange.com/questions/19103/how-much-voltage-current-is-dangerous)
brr = 1@unit "" Brr (Tₚ * b6"1e-110") false # ~0.3K
@affineunit °c "°c" (Int(b6"4400") * brr) # ~13°C -> 0°c
# Convenience Units # Convenience Units
instant = 1@unit i "i" Instant (tₛ * b6"1e130") false # ~5ms (1000₆ instants is about a second) instant = 1@unit i "i" Instant (tₛ * b6"1e130") false # ~5ms (1000₆ instants is about a second)
# TODO: larger chunks of meaningful time (akin to minutes/hours) pause = 1@unit "" Pause (tick * b6"300") false # ~1 minute
wait = 1@unit "" Wait (pause * b6"100") false # ~34 minutes
# TODO: name ~0.5L which is a mille pace^3? # TODO: name ~0.5L which is a mille pace^3?
# Derived Units # Derived Units
walk = 1@unit w "w" Walk (1 * pace / tick) false # ~6km/h (pretty quick walk) walk = 1@unit w "w" Walk (1 * pace / tick) false # ~6km/h (pretty quick walk)
touch = 1@unit "" Touch (1 * egg * pace / tick ^ 2) false # ~0.36N (half what it takes to press a key on a keyboard) touch = 1@unit "" Touch (1 * egg * pace / tick ^ 2) false # ~0.36N (half what it takes to press a key on a keyboard)
nosh = 1@unit n "n" Nosh (b6"1e11" * pace * touch) false # ~20.5 kcal
#= Useful Constants ============================================================ #= Useful Constants ============================================================
Earth's gravitational constant: gₑ 3₆p/ Earth's gravitational constant: gₑ 3₆p/