From dd8b39ddf0644e736458db3981bc7b3d39910be0 Mon Sep 17 00:00:00 2001 From: beaglejoe Date: Wed, 19 Apr 2023 23:51:55 +0000 Subject: [PATCH] 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 --- src/libs/tgf/params.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libs/tgf/params.cpp b/src/libs/tgf/params.cpp index 512f56f84..b2ad87912 100644 --- a/src/libs/tgf/params.cpp +++ b/src/libs/tgf/params.cpp @@ -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)) {