Unit tests for the modified_equinoctial_module.
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