+#endif
+
+ if (elevation_ft >= ISA_def[1].height) {
+ SG_LOG(SG_GENERAL, SG_ALERT, "recalc_sl_temperature: "
+ << "valid only in troposphere, not " << elevation_ft);
+ return;
+ }
+
+// Clamp: temperature of the stratosphere, in degrees C:
+ double t_strato = ISA_def[1].temp - atmodel::freezing;
+ if (temperature_degc < t_strato) temperature_sea_level_degc = t_strato;
+ else temperature_sea_level_degc =
+ temperature_degc + elevation_ft * atmodel::foot * ISA_def[0].lapse;
+
+// Alternative implemenation:
+// else temperature_sea_level_inhg = T_layer(0., elevation_ft * foot,
+// pressure_inhg * inHg, temperature_degc + freezing, ISA_def[0].lapse) - freezing;