Skip to main content

Module units

Module units 

Source
Expand description

Unit expressions and conversion (metatomic-inspired, SI dimensional analysis).

Supports named base units and simple products/quotients with *, /, ^, and parentheses (case-insensitive). unit_conversion_factor(from, to) returns the multiplier x_to = factor * x_from when dimensions match.

Structs§

Dimension
Physical dimension exponents: L, T, M, Q (charge), Θ (temperature).

Functions§

default_v3_units_json
Default LODE units object for new v3 frames.
parse_unit_expression
Parse a unit expression into SI factor and dimension.
unit_conversion_factor
Multiplicative factor: value_in_to = factor * value_in_from.
validate_unit_for_quantity
Validate that unit has dimensions appropriate for quantity (length, energy, mass, time, velocity, force).
validate_v3_units_metadata
CON v3 requires units object with non-empty length and energy strings.