Check the orbit for singularities.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | ecc |
eccentricity |
||
real(kind=wp), | intent(in) | :: | inc |
inclination [rad] |
||
logical, | intent(out) | :: | circular |
is the orbit circular? |
||
logical, | intent(out) | :: | equatorial |
is the orbit equatorial? |
pure subroutine orbit_check(ecc,inc,circular,equatorial) implicit none real(wp),intent(in) :: ecc !! eccentricity real(wp),intent(in) :: inc !! inclination [rad] logical,intent(out) :: circular !! is the orbit circular? logical,intent(out) :: equatorial !! is the orbit equatorial? real(wp),parameter :: tol = 1.0e-10_wp !! tolerance for circular & equatorial checks circular = ecc < tol equatorial = (one - abs(cos(inc))) < tol ! 0 or 180 deg end subroutine orbit_check