Unit test for bplane_module.
subroutine bplane_test() implicit none real(wp),dimension(3) :: vinfvec real(wp) :: bmag,theta,BdotT,BdotR,bmag2,theta2,BdotT2,BdotR2 logical :: status_ok integer :: istat real(wp),parameter :: mu = 0.398600436233000e+06_wp !! grav. param. for earth \( (km^2/s^2) \) real(wp),dimension(6),parameter :: rv = [ -1.518170076605391E+04_wp, & 1.518170076605392E+04_wp, & 2.147016712324346E+04_wp, & -4.613927243557805E+00_wp, & -2.352686048227026E+00_wp, & 1.598938983116768E+00_wp ] !! example hyperbolic state write(*,*) '' write(*,*) '---------------' write(*,*) ' bplane_test' write(*,*) '---------------' write(*,*) '' call compute_vinf_vectors(mu,rv,vinfin=vinfvec) write(*,*) 'vinfvec(1) =' , vinfvec(1) write(*,*) 'vinfvec(2) =' , vinfvec(2) write(*,*) 'vinfvec(3) =' , vinfvec(3) call bplane(mu,rv,vinfvec,bmag,theta,BdotT,BdotR,status_ok) write(*,*) '' write(*,*) 'vinfvec(1) =' , vinfvec(1) write(*,*) 'vinfvec(2) =' , vinfvec(2) write(*,*) 'vinfvec(3) =' , vinfvec(3) write(*,*) 'bmag =' , bmag write(*,*) 'theta =' , theta write(*,*) 'BdotT =' , BdotT write(*,*) 'BdotR =' , BdotR call calculate_bplane_data(mu,rv,BdotR2,BdotT2,bmag2,theta2,istat) write(*,*) '' write(*,*) 'Alternate version:' write(*,*) '' write(*,*) 'bmag =' , bmag2 write(*,*) 'theta =' , theta2 write(*,*) 'BdotT =' , BdotT2 write(*,*) 'BdotR =' , BdotR2 write(*,*) '' write(*,*) 'Difference:' write(*,*) '' write(*,*) 'bmag =' , bmag2 - bmag write(*,*) 'theta =' , theta2 - theta write(*,*) 'BdotT =' , BdotT2 - BdotT write(*,*) 'BdotR =' , BdotR2 - BdotR end subroutine bplane_test