Base: Fix schema translation data

Corrects 12 bugs across Internal and MKS schemas where factors were
wrong, units were assigned to the wrong threshold positions, or
thresholds didn't align with natural unit boundaries.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
Benjamin Nauck
2026-02-12 14:26:45 +01:00
co-authored by Claude Opus 4.6
parent 0b7da82433
commit 3f17f2f01f
+24 -24
View File
@@ -96,7 +96,7 @@ inline const UnitsSchemaSpec s3
{ 1e4 , "mm" , 1.0 },
{ 1e7 , "m" , 1e3 },
{ 1e10 , "km" , 1e6 },
{ 0 , "m" , 1.0 }}
{ 0 , "m" , 1e3 }}
},
{ "Area", {
{ 1e2 , "mm^2" , 1.0 },
@@ -114,7 +114,7 @@ inline const UnitsSchemaSpec s3
{ 0 , "°" , 1.0 }}
},
{ "Mass", {
{ 1e-6 , "\xC2\xB5g" , 1.0 },
{ 1e-6 , "\xC2\xB5g" , 1e-9 },
{ 1e-3 , "mg" , 1e-6 },
{ 1.0 , "g" , 1e-3 },
{ 1e3 , "kg" , 1.0 },
@@ -126,8 +126,8 @@ inline const UnitsSchemaSpec s3
{ 0 , "kg/mm^3" , 1.0 }}
},
{ "ThermalConductivity", {
{ 0 , "W/m/K" , 1e3 },
{ 1e6 , "W/mm/K" , 1e6 }}
{ 1e6 , "W/m/K" , 1e3 },
{ 0 , "W/mm/K" , 1e6 }}
},
{ "ThermalExpansionCoefficient", {
{ 1e-3 , "\xC2\xB5m/m/K" , 1e-6 },
@@ -209,18 +209,18 @@ inline const UnitsSchemaSpec s3
{ 0 , "C" , 1.0 }}
},
{ "SurfaceChargeDensity", {
{ 1e-4 , "C/m^2" , 1e-6 },
{ 1e-2 , "C/cm^2" , 1e-2 },
{ 1e-2 , "C/m^2" , 1e-6 },
{ 1.0 , "C/cm^2" , 1e-2 },
{ 0 , "C/mm^2" , 1.0 }}
},
{ "VolumeChargeDensity", {
{ 1e-4 , "C/m^3" , 1e-9 },
{ 1e-2 , "C/cm^3" , 1e-3 },
{ 1e-3 , "C/m^3" , 1e-9 },
{ 1.0 , "C/cm^3" , 1e-3 },
{ 0 , "C/mm^3" , 1.0 }}
},
{ "CurrentDensity", {
{ 1e-4 , "A/m^2" , 1e-6 },
{ 1e-2 , "A/cm^2" , 1e-2 },
{ 1e-2 , "A/m^2" , 1e-6 },
{ 1.0 , "A/cm^2" , 1e-2 },
{ 0 , "A/mm^2" , 1 }}
},
{ "MagneticFluxDensity", {
@@ -250,10 +250,10 @@ inline const UnitsSchemaSpec s3
{ 0 , "MOhm" , 1e12 }}
},
{ "ElectricalConductivity", {
{ 0 , "MS/m" , 1e-3 },
{ 1e-3 , "mS/m" , 1e-12 },
{ 1.0 , "S/m" , 1e-9 },
{ 1e3 , "kS/m" , 1e-6 }}
{ 1e-9 , "mS/m" , 1e-12 },
{ 1e-6 , "S/m" , 1e-9 },
{ 1e-3 , "kS/m" , 1e-6 },
{ 0 , "MS/m" , 1e-3 }}
},
{ "ElectricalCapacitance", {
{ 1e-15 , "pF" , 1e-18 },
@@ -366,7 +366,7 @@ inline const UnitsSchemaSpec s4
{ 10'000.0 , "kPa" , 1.0 },
{ 10'000'000.0 , "MPa" , 1'000.0 },
{ 10'000'000'000.0 , "GPa" , 1'000'000.0 },
{ 0 , "Pa" , 1000.0 }}
{ 0 , "Pa" , 0.001 }}
},
{ "Stress", {
{ 10.0 , "Pa" , 0.001 },
@@ -388,8 +388,8 @@ inline const UnitsSchemaSpec s4
{ 0 , "GPa/m" , 1e3 }}
},
{ "ThermalConductivity", {
{ 1'000'000 , "W/mm/K" , 1'000'000.0 },
{ 0 , "W/m/K" , 1'000.0 }}
{ 1'000'000 , "W/m/K" , 1'000.0 },
{ 0 , "W/mm/K" , 1'000'000.0 }}
},
{ "ThermalExpansionCoefficient", {
{ 0.001 , "\xC2\xB5m/m/K" , 0.000001 },
@@ -432,7 +432,7 @@ inline const UnitsSchemaSpec s4
{ 0 , "C/m^3" , 1e-9 }}
},
{ "CurrentDensity", {
{ 1e3 , "A/m^2" , 1e-6 },
{ 1.0 , "A/m^2" , 1e-6 },
{ 0 , "A/mm^2" , 1.0 }}
},
{ "MagneticFluxDensity", {
@@ -462,9 +462,9 @@ inline const UnitsSchemaSpec s4
{ 0 , "MOhm" , 1e12 }}
},
{ "ElectricalConductivity", {
{ 1e-3 , "mS/m" , 1e-12 },
{ 1.0 , "S/m" , 1e-9 },
{ 1e3 , "kS/m" , 1e-6 },
{ 1e-9 , "mS/m" , 1e-12 },
{ 1e-6 , "S/m" , 1e-9 },
{ 1e-3 , "kS/m" , 1e-6 },
{ 0 , "MS/m" , 1e-3 }}
},
{ "ElectricalCapacitance", {
@@ -475,9 +475,9 @@ inline const UnitsSchemaSpec s4
{ 0 , "F" , 1e-6 }}
},
{ "ElectricalInductance", {
{ 1e-6 , "nH" , 1e-3 },
{ 1e-3 , "\xC2\xB5H" , 1.0 },
{ 1.0 , "mH" , 1e3 },
{ 1.0 , "nH" , 1e-3 },
{ 1e3 , "\xC2\xB5H" , 1.0 },
{ 1e6 , "mH" , 1e3 },
{ 0 , "H" , 1e6 }}
},
{ "VacuumPermittivity", {