1
0
Fork 0

Round millibars to nearest whole number, and make inches default even in UK until the altimeter on the panel gets a millibar adjuster

This commit is contained in:
daveluff 2004-03-24 00:28:52 +00:00
parent b6d30b7224
commit e8ccfb6d20

View file

@ -181,10 +181,10 @@ void FGATIS::UpdateTransmission() {
// Get the pressure / altimeter // Get the pressure / altimeter
double P = fgGetDouble("/environment/pressure-sea-level-inhg"); double P = fgGetDouble("/environment/pressure-sea-level-inhg");
if(ident.substr(0,2) == "EG") { if(ident.substr(0,2) == "EG" && fgGetBool("/sim/atc/use-millibars") == true) {
// Convert to millibars for the UK! // Convert to millibars for the UK!
P *= 33.864; P *= 33.864;
sprintf(buf, "%.1f", P); sprintf(buf, "%.0f", P);
} else { } else {
sprintf(buf, "%.2f", P); sprintf(buf, "%.2f", P);
} }