Closed ronaldtse closed 3 years ago
This is an example of "watt per square meter steradian" which is SI-derived and can be (technically) user-defined without needing a UnitsDB entry.
"NISTu14.u1e-2/1.u10e-1/1":
dimension_url: "#NISTd38"
short:
root: false
unit_system:
type: "SI_derived_non-special"
name: "SI"
unit_name:
- "watt per square meter steradian"
unit_symbols:
- ascii: "W*m^-2*sr^-1"
html: W/(m^2 · sr)
latex: \ensuremath{\mathrm{W/(m^2\cdot sr)}}
unicode: "W/(m²·sr)"
root_units:
enumerated_root_units:
- unit: "watt"
power_denominator: 1
power_numerator: 1
- unit: "meter"
power_denominator: 1
power_numerator: -2
- unit: "steradian"
power_denominator: 1
power_numerator: -1
quantity_reference:
- name: "radiance"
url: "#NISTq89"
The key points are:
W*m^-2*sr^-1
Maybe something like this:
unitsml(
composite: watt * meter^-1 * steradian^-1,
quantity: radiance
)
will already give us what we want?
Questions:
"watt per square meter steradian" dimensions:
NISTd38:
mass:
powerNumerator: 1
symbol: M
time:
powerNumerator: -3
symbol: T
Watt dimensions:
NISTd16:
length:
powerNumerator: 2
symbol: L
mass:
powerNumerator: 1
symbol: M
time:
powerNumerator: -3
symbol: T
Steradian dimensions:
NISTd9:
dimensionless: true
plane_angle:
powerNumerator: 1
symbol: phi
Meter dimensions:
NISTd1:
length:
powerNumerator: 1
symbol: L
So may be not?
Or is NISTd38 actually wrong?
I do do this already. I do generate the dimensions. I don't yet generate or read in the quantities, for any unit. My code has a TODO for generating the user name, but I agree there should be an option for the user to provide a name.
Quantities and dimensions are read in, where available. User input of quantities now supported.
Allowing name input. Will close this for now.
This functionality should be split into the two locations: unitsml gem (https://github.com/unitsml/unitsml-ruby) and asciiunits (https://github.com/plurimath/asciimath2unitsml).
A feature of UnitsML is the dynamic encoding of non-UnitsDB units through combining existing units (root or derived units).
We'll have to figure out how to do that.