modified_equinoctial_test Subroutine

public subroutine modified_equinoctial_test()

Unit tests for the modified_equinoctial_module.

Arguments

None

Calls

proc~~modified_equinoctial_test~~CallsGraph proc~modified_equinoctial_test modified_equinoctial_module::modified_equinoctial_test proc~cartesian_to_equinoctial modified_equinoctial_module::cartesian_to_equinoctial proc~modified_equinoctial_test->proc~cartesian_to_equinoctial proc~equinoctial_to_cartesian modified_equinoctial_module::equinoctial_to_cartesian proc~modified_equinoctial_test->proc~equinoctial_to_cartesian proc~modified_equinoctial_derivs modified_equinoctial_module::modified_equinoctial_derivs proc~modified_equinoctial_test->proc~modified_equinoctial_derivs proc~cross vector_module::cross proc~cartesian_to_equinoctial->proc~cross proc~unit vector_module::unit proc~cartesian_to_equinoctial->proc~unit

Source Code

    subroutine modified_equinoctial_test()

    implicit none

    real(wp),parameter :: mu = 398600.436233_wp  !! central body grav. parameter
    real(wp),dimension(6),parameter :: x0 = [-2301.67224489839_wp, &
                                             -5371.07610250925_wp, &
                                             -3421.14671530212_wp, &
                                              6.1338624555516_wp,  &
                                              .306265184163608_wp, &
                                             -4.59713439017524_wp  ] !! state vector
    real(wp),dimension(3),parameter :: scn = [zero,zero,zero] !! perturbation

    real(wp),dimension(6) :: e,ed,x2

    write(*,*) ''
    write(*,*) '---------------'
    write(*,*) ' modified_equinoctial_test'
    write(*,*) '---------------'
    write(*,*) ''

    call cartesian_to_equinoctial(mu,x0,e)
    call equinoctial_to_cartesian(mu,e,x2)
    call modified_equinoctial_derivs(mu,e,scn,ed)

    write(*,'(A,1X,*(F20.6,1X))' ) 'x:       ', x0
    write(*,'(A,1X,*(F20.6,1X))' ) 'x2:      ', x2
    write(*,'(A,1X,*(F20.6,1X))' ) 'x error: ', x2-x0
    write(*,'(A,1X,*(F20.6,1X))' ) 'e:       ', e
    write(*,'(A,1X,*(F20.6,1X))' ) 'ed:      ', ed

    end subroutine modified_equinoctial_test