iau_test Subroutine

public subroutine iau_test()

Unit test routine for iau_module.

Arguments

None

Calls

proc~~iau_test~~CallsGraph proc~iau_test iau_orientation_module::iau_test proc~icrf_to_iau_earth iau_orientation_module::icrf_to_iau_earth proc~iau_test->proc~icrf_to_iau_earth proc~icrf_to_iau_moon iau_orientation_module::icrf_to_iau_moon proc~iau_test->proc~icrf_to_iau_moon proc~iau_rotation_matrix iau_orientation_module::iau_rotation_matrix proc~icrf_to_iau_earth->proc~iau_rotation_matrix proc~icrf_to_iau_moon->proc~iau_rotation_matrix proc~rotation_matrix vector_module::rotation_matrix proc~iau_rotation_matrix->proc~rotation_matrix

Source Code

    subroutine iau_test()

    implicit none

    real(wp)                :: et
    real(wp),dimension(3,3) :: rotmat

    integer :: i

    write(*,*) ''
    write(*,*) '---------------'
    write(*,*) ' iau_test'
    write(*,*) '---------------'
    write(*,*) ''

    et     = 1000.0_wp               !epoch [sec from J2000]
    rotmat = icrf_to_iau_earth(et)   !rotation matrix from J2000 to IAU_EARTH

    write(*,*) '---icrf_to_iau_earth---'
    write(*,*) 'et    =',et
    write(*,*) 'rotmat='
    do i=1,3
        write(*,*) rotmat(i,:)
    end do

    ! ---icrf_to_iau_earth---
    ! et    =   1000.0000000000000
    ! rotmat=
    !  0.24742305587604752      -0.96890754534215406       -7.6219971891330182E-010
    !  0.96890754534215406       0.24742305587604752       -2.9847705387722482E-009
    !  3.0805524797727912E-009  -1.0920940632167532E-017   1.0000000000000000
    !
    ! Compare to SPICE:
    ! call PXFORM( 'J2000', 'IAU_EARTH', ET, ROTMAT )
    ! rotmat=
    !  0.24742305587604752      -0.96890754534215406       -7.6219971891330182E-010
    !  0.96890754534215406       0.24742305587604752       -2.9847705387722482E-009
    !  3.0805524797727912E-009  -1.0920940632167532E-017    1.0000000000000000

    et     = 1000.0_wp               !epoch [sec from J2000]
    rotmat = icrf_to_iau_moon(et)    !rotation matrix from J2000 to IAU_MOON

    write(*,*) '---icrf_to_iau_moon---'
    write(*,*) 'et    =',et
    write(*,*) 'rotmat='
    do i=1,3
        write(*,*) rotmat(i,:)
    end do

    ! ---icrf_to_iau_moon---
    ! et    =   1000.0000000000000
    ! rotmat=
    !  0.78257369718829173       0.55976292119480831       0.27247730276942850
    ! -0.62214729926548507       0.71906872303263469       0.30963350847878057
    ! -2.2608548951909870E-002 -0.41183205753276536       0.91097925876642116
    !
    ! Compare to SPICE:
    ! call PXFORM( 'J2000', 'IAU_MOON', ET, ROTMAT )
    ! rotmat=
    !  0.78257369718829173       0.55976292119480819       0.27247730276942861
    ! -0.62214729926548507       0.71906872303263458       0.30963350847878074
    ! -2.2608548951909880E-002 -0.41183205753276558       0.91097925876642105


    end subroutine iau_test