Rotation matrix from Mean Ecliptic to J2000.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
procedure(mean_obliquity_func), | optional | :: | obliquity_func |
optional function to compute the mean obliquity. If not present, then mean_obliquity_of_ecliptic_iau1980 is used. |
rotation matrix
pure function mean_ecliptic_to_equatorial_rotmat(obliquity_func) result(rot) implicit none real(wp),dimension(3,3) :: rot !! rotation matrix procedure(mean_obliquity_func),optional :: obliquity_func !! optional function to compute !! the mean obliquity. If not !! present, then !! [[mean_obliquity_of_ecliptic_iau1980]] !! is used. real(wp) :: e !! mean obliquity at J2000 (rad) real(wp) :: s,c if (present(obliquity_func)) then e = obliquity_func(0.0_wp) else e = mean_obliquity_of_ecliptic_iau1980(0.0_wp) end if e = e * deg2rad s = sin(e) c = cos(e) rot(:,1) = [1.0_wp, 0.0_wp, 0.0_wp] rot(:,2) = [0.0_wp, c, s] rot(:,3) = [0.0_wp, -s, c] end function mean_ecliptic_to_equatorial_rotmat