add units Gauss, Weber and Oersted

This commit is contained in:
donovaly
2020-01-05 23:38:04 +01:00
committed by Yorik van Havre
parent 51b5d81741
commit d1b354fc6b
11 changed files with 359 additions and 283 deletions

View File

@@ -306,8 +306,22 @@ QString UnitsSchemaInternal::schemaTranslate(const Quantity &quant, double &fact
factor = 1.0;
}
else if (unit == Unit::MagneticFluxDensity) {
unitString = QString::fromLatin1("T");
factor = 1.0;
if (UnitValue <= 1e-3) {
unitString = QString::fromLatin1("G");
factor = 1e-4;
}
else {
unitString = QString::fromLatin1("T");
factor = 1.0;
}
}
else if (unit == Unit::MagneticFieldStrength) {
unitString = QString::fromLatin1("Oe");
factor = 0.07957747;
}
else if (unit == Unit::MagneticFlux) {
unitString = QString::fromLatin1("Wb");
factor = 1e6;
}
else if (unit == Unit::ElectricalConductance) {
if (UnitValue < 1e-9) {