Add kph/KPH as xml unit type

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8884 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: eaa54b83c70910d783290b767dad308c83e3e40e
Former-commit-id: e3d7a0ca60d1d2eb24f74af085d4d4b0bfd4d978
This commit is contained in:
beaglejoe 2023-04-19 23:51:55 +00:00
parent d69955106b
commit dd8b39ddf0

View file

@ -2146,6 +2146,8 @@ evalUnit (char *unit, tdble *dest, int invert)
coeff = 6894.76f; /* Pa */
} else if ((strcmp(unit, "mph") == 0) || (strcmp(unit, "MPH") == 0)) {
coeff = 0.44704f; /* m/s */
} else if ((strcmp(unit, "kph") == 0) || (strcmp(unit, "KPH") == 0)) {
coeff = 0.277778f; /* m/s */
} else if (strcmp(unit, "MPa") == 0) {
coeff = 1000000.0; /* Pa */
} else if ((strcmp(unit, "h") == 0) || (strcmp(unit, "hour") == 0) || (strcmp(unit, "hours") == 0)) {