Angular separation between two sets of spherical coordinates.
Status: vector/matrix support routine.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | al | first longitude (radians) |
||
real(kind=wp), | intent(in) | :: | ap | first latitude (radians) |
||
real(kind=wp), | intent(in) | :: | bl | second longitude (radians) |
||
real(kind=wp), | intent(in) | :: | bp | second latitude (radians) |
||
real(kind=wp), | intent(out) | :: | s | angular separation (radians) |
subroutine SEPS ( al, ap, bl, bp, s )
implicit none
real(wp),intent(in) :: al !! first longitude (radians)
real(wp),intent(in) :: ap !! first latitude (radians)
real(wp),intent(in) :: bl !! second longitude (radians)
real(wp),intent(in) :: bp !! second latitude (radians)
real(wp),intent(out) :: s !! angular separation (radians)
real(wp) :: ac(3), bc(3)
! Spherical to Cartesian.
call S2C ( al, ap, ac )
call S2C ( bl, bp, bc )
! Angle between the vectors.
call SEPP ( ac, bc, s )
end subroutine SEPS