Added check to make sure that ApA is outside of the atmosphere -- was causing "dT is NaN!" spam while s/c orbit still in the atmosphere, see http://bugs.kerbalspaceprogram.com/issues/5334 for more details.
Added check to make sure that ApA is outside of the atmosphere -- was causing "dT is NaN!" spam while s/c orbit still in the atmosphere, see http://bugs.kerbalspaceprogram.com/issues/5334 for more details.

--- a/Documents/CHANGES.txt
+++ b/Documents/CHANGES.txt
@@ -1,12 +1,9 @@
 1.0.18.0
     Added: Orbital readouts - "Speed at Periapsis" and "Speed at Apoapsis". (Padishar)
     Added: Manoeuvre readouts - "Post-burn Apoapsis" and "Post-burn Periapsis". (Padishar)
-    Added: Orbital readout - "Time to Atmosphere".
     Fixed: Synched the minimum simulation time sliders and stopped them from snapping back after 999ms. (saybur)
     Fixed: Added workaround for the bug in Vessel.horizontalSrfSpeed (Padishar)
     Fixed: Physically insignificant part mass was not being correctly cascaded down through multiple parent parts.
-    Fixed: Intake air demand calculation not working.
-    Fixed: Some build engineer settings labels do not scale with UI size.
 
 1.0.17.0
     Added: 'Mach Number' readout under the 'Surface' category and included it on the default surface HUD.

--- a/KerbalEngineer/Flight/Readouts/Orbital/TimeToAtmosphere.cs
+++ b/KerbalEngineer/Flight/Readouts/Orbital/TimeToAtmosphere.cs
@@ -50,7 +50,7 @@
             String str;
             Orbit orbit = FlightGlobals.ship_orbit;
 
-            if (orbit.referenceBody.atmosphere && orbit.PeA < orbit.referenceBody.atmosphereDepth)
+			if (orbit.referenceBody.atmosphere && orbit.PeA < orbit.referenceBody.atmosphereDepth && orbit.ApA > orbit.referenceBody.atmosphereDepth)
             {
                 double tA = orbit.TrueAnomalyAtRadius(orbit.referenceBody.atmosphereDepth + orbit.referenceBody.Radius);
                 //log.buf.AppendFormat("tA = {0}\n", tA);
@@ -87,7 +87,7 @@
             else
             {
                 str = "---s";
-                //log.buf.AppendLine("no atmosphere or pe > atmosphere");
+                //log.buf.AppendLine("no atmosphere, pe > atmosphere, or ap < atmosphere");
             }
 
             //log.Flush();