1#include "../../Inc/Utils/Units.h"
2#include "../../Inc/Utils/MessageFormat.h"
9 -1000.0f, 1000.0f, -50.0f, 50.0f, 3, 1.0f},
11 -1000000.0f, 1000000.0f, -50000.0f, 50000.0f, 1, 0.001f},
15 -1000.0f, 1000.0f, -100.0f, 100.0f, 3, 1.0f},
17 -1000000.0f, 1000000.0f, -100000.0f, 100000.0f, 1, 0.001f},
21 -1.0f, 10000.0f, 0.0f, 3000.0f, 1, 6894.76f},
23 -1.0f, 1000.0f, 0.0f, 300.0f, 2, 100000.0f},
25 -1.0f, 100000000.0f, 0.0f, 30000000.0f, 0, 1.0f},
29 -273.15f, 3000.0f, -50.0f, 200.0f, 1, 1.0f},
31 -459.67f, 5432.0f, -58.0f, 392.0f, 1, 1.0f},
33 0.0f, 3273.15f, 223.15f, 473.15f, 2, 1.0f},
37 -1000.0f, 1000.0f, 0.0f, 100.0f, 1, 1.0f},
39 -3600.0f, 3600.0f, -180.0f, 180.0f, 1, 0.017453f},
41 -62.83f, 62.83f, -3.14159f, 3.14159f, 3, 1.0f},
45 0.0f, 50000.0f, 0.0f, 10000.0f, 0, 0.10472f},
47 0.0f, 1000000.0f, 0.0f, 10000.0f, 2, 1.0f},
49 0.0f, 1000.0f, 0.0f, 300.0f, 1, 0.27778f},
51 0.0f, 600.0f, 0.0f, 200.0f, 1, 0.44704f},
55 0.0f, 86400.0f, 0.0f, 3600.0f, 3, 1.0f},
57 0.0f, 86400000.0f, 0.0f, 10000.0f, 0, 0.001f},
59 0.0f, 86400000000.0f, 0.0f, 10000000.0f, 0, 0.000001f},
63 0.0f, 1.0f, 0.0f, 1.0f, 0, 1.0f},
65 0.0f, 65535.0f, 0.0f, 100.0f, 0, 1.0f},
69 0.0f, 100.0f, 0.0f, 100.0f, 1, 1.0f},
71 -1000000.0f, 1000000.0f, -1000.0f, 1000.0f, 3, 1.0f}
96 return (value >= unit->
absolute_min && value <= unit->absolute_max);
bool validateUnitValue(UnitId unit_id, float value)
const UnitDefinition * getUnitDefinition(UnitId unit_id)
static const UnitDefinition unit_definitions[UNIT_COUNT]
float convertUnits(float value, UnitId from_unit, UnitId to_unit)
UnitId getUnitIdBySymbol(const char *symbol)
@ UNIT_CATEGORY_FREQUENCY
@ UNIT_CATEGORY_TEMPERATURE
@ UNIT_CATEGORY_DIMENSIONLESS