unit UnRightS ; { right hand side of secular equations } interface uses UnSagCot ; { for type TVarSix } procedure SecuRightHand ( tc : Extended ; { current moment in day } ec : TVarSix ; { canonical elements } var fc : TVarSix ) ; { forces for elements } implementation uses UnTypVar , { types and global variables } UnTheorS , { procedure DifEquNul ( var q : TVarSix ) ; } UnThelem , { procedure CorElem for the partial derivations } UnGiaMod , { global var PlanetFMain fm in AU^3/day^2 } unforprt ; { for result text file fprt proc BadCasePrt } { to obtain numerical value for right hand side of secular equations input tc current moment value in day of time from selected date in julian day ec current values of secular canonical elements output fc values of the forces for this canonical elements } procedure SecuRightHand ( tc : Extended ; { current moment in day } ec : TVarSix ; { canonical elements } var fc : TVarSix ) ; { forces for elements } var { ec 1 L 2 G 3 H 4 l 5 g 6 h } qs : TVarSix ; { for partial derivations with canonical elements } ps : tsagano ; { unsagcot canonical elements with time p.e[..] p.t } begin ToControlBadCasePrt(tc,ec); { to go from program unforprt } ps.t:=tc; { moment in julian day to current record } ps.e:=ec; { the same type TVarSix canonical elements } DifEquNul(qs); { from UnTheorS initial nullo to simple array } corelem(ps,mectwo,rowtwo,qs); { unthelem untypvar derivations } corelem(ps,mectre,rowtre,qs); { unthelem untypvar derivations } fc[1]:=+qs[1]; { dL/dt=+d(F)/dl } fc[2]:=+qs[2]; { dG/dt=+d(F)/dg } fc[3]:=+qs[3]; { dH/dt=+d(F)/dh } fc[4]:=-qs[4]; { dl/dt=-d(F)/dL } fc[5]:=-qs[5]; { dg/dt=-d(F)/dG } fc[6]:=-qs[6]; { dh/dt=-d(F)/dH } { but for the mean anomaly l there is mean motion n=(fm)^2/L^3 } fc[4]:=Sqr(PlanetFMain/ec[1])/ec[1]+fc[4]; { ungiamod } end; end.