!*********************************************************************************************************************************** ! ! B A R K E R S T B L ! ! Program: BARKERSTBL ! ! Programmer: David G. Simpson ! Laurel, Maryland ! ! Date: July 4, 2012 ! ! Language: Fortran-90 ! ! Version: 1.00b (July 5, 2012) ! ! Description: Generate Barker's tables. ! ! Files: Source files: ! ! barkerstbl.f90 Main program ! ! Note: This program generates Barker's tables for the computation of parabolic orbits. ! Barker's tables give the solution to Barker's equation, and are tabulations of ! ! H = C[tan(f/2) + (1/3)tan^3(f/2)] ! ! where f is the true anomaly and C is a tabulation constant that varies depending ! on the author of the table: ! ! Watson: C = 75 ! Oppolzer: C = sqrt(2)/k ! SI: C = sqrt(2/GM) (Sun - SI units) ! CGS: C = sqrt(2/GM) (Sun - CGS units) ! ! A new convention with C = 1 can also be generated. The tabulation convention is ! chosen by setting parameter C. ! !*********************************************************************************************************************************** PROGRAM BARKERSTBL IMPLICIT NONE DOUBLE PRECISION, PARAMETER :: PI = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803D0 ! C is 75 for Watson, sqrt(2)/k for Oppolzer, 1 for "unity" convention (k=0.01720209895) ! sqrt(2/GM) for SI and CGS (GM = 1.3271240041E20 m^3/s^2 = 1.3271240041E26 cm^3/s^2 DOUBLE PRECISION, PARAMETER :: C_WATSON = 75.0D0 DOUBLE PRECISION, PARAMETER :: C_OPPOLZER = 82.21168628803260364931738310979184773086495211544798567599680840056628545681671D0 DOUBLE PRECISION, PARAMETER :: C_UNITY = 1.0D0 DOUBLE PRECISION, PARAMETER :: C_SI = 1.2276065043248915656555537509484882388446121386917924481834509610395005131531D-10 DOUBLE PRECISION, PARAMETER :: C_CGS = 1.2276065043248915656555537509484882388446121386917924481834509610395005131531D-13 DOUBLE PRECISION, PARAMETER :: C = C_UNITY ! set this to choose tabulation convention INTEGER :: DG, MN, SC, I DOUBLE PRECISION :: F, F2, MARR(13) !----------------------------------------------------------------------------------------------------------------------------------- WRITE (UNIT=*, FMT='(/A/)') ' '//& 'BARKER''S TABLES' WRITE (UNIT=*, FMT='(A)') ' 0" 5" 10" 15" 20" 25" '//& ' 30" 35" 40" 45" 50" 55" 60"' WRITE (UNIT=*, FMT='(A/)') ' DEG MIN' DO DG = 0, 179 ! degrees loop DO MN = 0, 59 ! minutes loop DO I = 0, 12 ! 5" loop F = (DBLE(DG) + DBLE(MN)/60.0D0 + DBLE(5*I)/3600.0D0)*PI/180.0D0 F2 = 0.5D0*F MARR(I+1) = C * (TAN(F2) + (TAN(F2)**3)/3.0D0) END DO WRITE (UNIT=*,FMT='(I5,2X,I2.2,13ES14.6)') DG, MN, (MARR(I),I=1,13) ! print one line of table END DO END DO STOP END PROGRAM BARKERSTBL