add units Gauss, Weber and Oersted
This commit is contained in:
committed by
Yorik van Havre
parent
51b5d81741
commit
d1b354fc6b
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user