Skip to content

Commit

Permalink
CMR-4722: Added more precision to orbit calculation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ygliuvt committed Apr 20, 2018
1 parent 89ede54 commit 6779814
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions orbits-lib/resources/orbits/orbit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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:
#
Expand All @@ -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
Expand Down

0 comments on commit 6779814

Please sign in to comment.