if (parms[metricIdx] == 1){ distancefactor /= 1.609; fuelfactor /= 3.785; }
if (parms[metricIdx] == 1){ distancefactor = 1000 * distancefactor / 1609; fuelfactor = 1000 * fuelfactor / 3785; }