%N sfetra %F $MIR/src/subs/sfetra.for
%D Transformation between equatorial and other coordinate systems
%: coordinates
%P bpw
%B
      subroutine sfetra( slon, slat, inv, sys )
      subroutine dsfetra( dlon, dlat, inv, sys )

      real                 slon, slat
      double precision     dlon, dlat
      logical              inv
      integer              sys

 Trigonometric coordinate transform by matrix multiplication. Defines
 transformation from equatorial to galactic, ecliptic or supergalactic
 coordinates.
 Sfetra takes a real variable as in/output, for dsfetra coordinates
 must be in double precision.

 Input/Output:
   slon/dlon:   longitude (in radians)
   slat/dlat:   latitude  (in radians)

 Input:
   inv:         direction of transformation
                .false. from equatorial to other systems
                .true.  from other systems to equatorial
   sys:         in-/output system
                1: galactic coordinates
                2: ecliptic coordinates
                3: supergalactic coordinates
