Open JohelEGP opened 1 year ago
Yes, similar issues to power
also exist for energy
and efficiency
.
And yes, I also planned to make quantity_spec
templated on photometric condition for light and radiation. I didn't realize it is the same case for power
, energy
, and efficiency
though. Thanks for raising this issue!
Parameterized quantities
I have identified 2 kinds of parameterized quantities.
Same quantity name for different quantities
This kind of quantity shares its name between different quantities in the parts of ISO 80000. For example:
https://github.com/mpusz/mp-units/blob/60a564a86700804e306f0d73a1521ea6e4abe377/src/systems/isq/include/mp-units/systems/isq/mechanics.h#L89 https://github.com/mpusz/mp-units/blob/60a564a86700804e306f0d73a1521ea6e4abe377/src/systems/isq/include/mp-units/systems/isq/electromagnetism.h#L111
Same quantity, actually parameterized
Some quantities from ISO 80000-7:2019 (light and radiation) are parameterized on a photometric condition.
Amount of substance is parameterized on “elementary entity” (ISO 80000-9:2019 9.2). And thus many quantities in part 9 are equally parameterized. The standard has some remarks on the structure of an “elementary entity”. Like https://github.com/mpusz/mp-units/issues/35#issuecomment-1655365069,
Previous work
I had previously started a code specification for the quantities, and this is how I did it.
quantity
above is notmp_units::quantity
.quantity
templates are forward declarations. If it's parameterized on acontext
, it's later explicitly specialized. If it's parameterized on aphotometric_condition
, it's because it's used before it's defined by another parameterized quantity.