From 67798141467f2191820100fe84928b7c9e82fa60 Mon Sep 17 00:00:00 2001 From: Yonggang Liu Date: Wed, 18 Apr 2018 16:40:05 -0400 Subject: [PATCH] CMR-4722: Added more precision to orbit calculation. --- orbits-lib/resources/orbits/orbit.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orbits-lib/resources/orbits/orbit.rb b/orbits-lib/resources/orbits/orbit.rb index 02c462e4b3..18fd29e4a8 100644 --- a/orbits-lib/resources/orbits/orbit.rb +++ b/orbits-lib/resources/orbits/orbit.rb @@ -416,7 +416,7 @@ def horizontal_swath_edges(coord, ascending) # We can't just compute constants for the line, because `b` could be near 0. # Let's deal with that special case first. - if b.abs < EPSILON + if b.abs < 0.000001 # If `b = 0`, then the plane's equation is: # @@ -430,7 +430,7 @@ def horizontal_swath_edges(coord, ascending) # case, we have an orbit that follows the equator. If coord lies within the # swath, then every orbit will cover the point, otherwise no orbits will. - if a.abs < EPSILON + if a.abs < 0.000001 if coord.phi.abs < swath_width_rad / 2 return [Coordinate.phi_theta(0, -PI), Coordinate.phi_theta(0, PI)] else