Open ruebezahl opened 13 years ago
@rausch| we could add all possible units in the associated dropdown in the instruments form and map them internally to the one we will save and show
alternative: storing data in a default-unit datatype and converting to it when submitting new data
problem: what about unknown/unconfigured input data units/types?
I would say we won't allow them as they are of no use.
Regarding the dimension of a value, we can parse the input before we save it as float, render an appended 'm', 'u', or 'n' to the respective dimension and multiply it with the value.
E.g.: 1.234u => 1.234e-6
As we save data types in a model, we need some kind of conversion management. Something like a many-to-many association model (say, Formula) with DataType on both ends.
Further we have to think about how to handle the conversion logic from a user's perspective.
we will need to have some kind of conversion for the different input-datatypes (millisievert, microsievert, rem, etc). on each export request all data needs to be converted to the desired output format
wikipedia has the formulas