unit ungiamod ; { model for gravitational field of our giants } interface var { global variables } MaxZonHarm : byte ; { for maximum number of zonal harmonics } PlanetFM : extended ; { planetograv const in km^3/s^2 } PlanetFMain : extended ; { planetograv const in AU^3/day^2 } PlanetRadius : extended ; { equatorial radius in AU for the forces } ZonHarmValue : array[1..6] of extended ; { coefficient zonal harmonics } { gravitational model for each giant planet } procedure toobtainmodel ( PlanetMain : integer ) ; implementation uses unsagcot , { types const } ungiarom , { proc ToClcMatrOfRotation } unephjpl ; { const global variables and procedures } { gravitational model for each giant planet } procedure toobtainmodel ( PlanetMain : integer ) ; var i : byte ; { simple count } begin MaxZonHarm:=0; { default nullo values } for i:=1 To 6 Do ZonHarmValue[i]:=0.0; { default nullo values } ToObtainFMuS ; { from unephjpl for FactorMuS[..] global array } PlanetFM:=SunFM/SystemOfMasses[PlanetMain]; { km^3/s^2 unephjpl } PlanetFMain:=FactorMuS[PlanetMain]; { in AU^3/day^2 unephjpl } { EquatorMatRot is a matrix to change from the fixed equator of the Earth to the fixed equator of the Planet const unsagcot } ToClcMatrOfRotation(PlanetMain,jd2000,EquatorMatRot); { ungiarom global } case PlanetMain of NJupiter : { const unephjpl } begin PlanetRadius:=71492.0/AstrUnit; { in AU } MaxZonHarm:=6; ZonHarmValue[2]:=+0.014736; ZonHarmValue[3]:=+0.000001; ZonHarmValue[4]:=-0.000587; ZonHarmValue[6]:=+0.000103; end; NSaturn : begin PlanetRadius:=60268.0/AstrUnit; { in AU } MaxZonHarm:=6; ZonHarmValue[2]:=+0.016292; ZonHarmValue[4]:=-0.000931; ZonHarmValue[6]:=+0.000091; end; NUranus : begin PlanetRadius:=25559.0/AstrUnit; { in AU } MaxZonHarm:=4; ZonHarmValue[2]:=+0.00334346; ZonHarmValue[4]:=-0.00002885; end; NNeptune : begin PlanetRadius:=24764.0/AstrUnit; { in AU } MaxZonHarm:=4; ZonHarmValue[2]:=+0.003410; ZonHarmValue[4]:=-0.000035; end; end; { for case of planet main } end; end.