Units: extend parser to accept mph, sqft and cft. Fix a bug in imperial civil schema

This commit is contained in:
wmayer
2019-12-23 19:55:21 +01:00
parent 97e11fadac
commit 2484cd56ef
5 changed files with 325 additions and 296 deletions

View File

@@ -298,7 +298,7 @@ QString UnitsSchemaImperialBuilding::schemaTranslate(const Quantity &quant, doub
factor = 92903.04;
}
else if (unit == Unit::Volume) {
unitString = QString::fromLatin1("cuft");
unitString = QString::fromLatin1("cft");
factor = 28316846.592;
}
else if (unit == Unit::Velocity) {
@@ -343,7 +343,7 @@ QString UnitsSchemaImperialCivil::schemaTranslate(const Base::Quantity& quant, d
}
else if (unit == Unit::Velocity) {
unitString = QString::fromLatin1("mph");
factor = 0.002235598; //1mm/sec => mph
factor = 447.04; //1mm/sec => mph
}
// this schema expresses angles in degrees + minutes + seconds
else if (unit == Unit::Angle) {