Finalversion PDF
Finalversion PDF
Anshuk Attri
SUPERVISED BY
AT
Universitat Politècnica de Catalunya
SUPERVISED BY:
Prof. Josep J. Masdemont
Departament de Matemàtica Aplicada I
This Page Intentionally Left Blank
ABSTRACT
There are two primary objectives of this master’s thesis. The first is to develop
suitable semi-analytical quasi-periodic models for the equations of motion in the solar
system. The results of the research have to be implemented developing specific
vector fields for the propagation of trajectories and the corresponding changes of
coordinates. The second objective of the thesis is to implement a program that is
able to read ephemeris data and is capable of performing numerical calculation in
vector fields. After the program has been implement is has to be tested to ensure
robustness. The software package has been implemented in FORTRAN and has the
ability to read and access the SpiceLib of JPL, CIT, to get ephemeris data for states
of bodies in the solar system. The methodology of the thesis involves: development
of vector fields for restricted n-body problems, general explanations of Lagrangian
and Hamiltonian forms of the restricted n-body problem, development of semi-
analytical model of n-body problem, development of variational equations for n-body
problems in the solar system and for quasi-periodic formulation of equations of
restricted n-body problem, implementation of all these formulations in form of a
package, which is able to read and access ephemeris data using SpiceLib from JPL,
written in FORTRAN 77, testing the routines, and finally, performing trajectory
refinement of two Libration point orbits: one in Jupiter-Europa System and one in
Saturn-Titan System using Parallel Shooting.
This Page Intentionally Left Blank
Table of Contents
INTRODUCTION ............................................................................................. 1
CONCLUSION ................................................................................................ 75
6.1 Present Work ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... 75
6.2 Future Work ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... 75
BIBLIOGRAPHY ............................................................................................. 77
APPENDICES:
Table H.1 Maximum Relative Errors for Variational Equations from VFSSB ..............117
Table H.2 Maximum Relative Errors for Variational Equations from VFIBC ...............117
This Page Intentionally Left Blank
Introduction 1
INTRODUCTION
Study of orbital dynamics is very important for space mission design. It is interesting
both from a mathematical as well as engineering point of view. Orbital dynamics is
useful for computing trajectories of artificial satellites, asteroids, comets etc. The tra-
jectory of a body moving in a gravitational field can be represented in wide varieties of
models. The ease of integrations in a model depends on its simplicity. The most basic
model is using Newton‘s laws of gravitation and to perform integrations based on this
model.
Models of motion in a gravitational field can be entirely analytical i.e. defined in terms
of basic equations of motion. The problem with this model is that numerical compu-
tations can take a significant amount of time. Thus, sometimes, these model can be
refined and we can move them in the domain of semi-analytical. This allows to perform
integrations in the numerical domain, reducing the complexity of the problem. The aim
of the having semi-analytical models is the possibility to have intermediate models
(approximations) between simple models like RTBP and full ephemeris models (either
numerical or analytical).
There are two primary aims of this master‘s thesis. The first is to develop suitable
semi-analytical quasi-periodic models for the equations of motion in the solar system.
These models will be implemented through vector fields and the trajectories will be
propagated in these vector fields. The second objective of the thesis is to implement a
program that is able to read ephemeris data.
The package that is being designed has the capability to read the ephemeris by Jet
Propulsion Laboratory (JPL), CIT. The package is also be capable of performing nu-
merical calculation in vector fields. The work on the package was started as a part of
Reference [7]. Before the work on this thesis was started the package had the ability
to read the ephemeris and to perform change of coordinates. As the work progressed,
it was discovered that the package had some errors and the features were not working
as they should. These bugs were removed before the new vector fields were imple-
mented. After the program routines were implemented it was tested to ensure robust-
ness and accuracy. Finally, the package was used to perform trajectory refinement
of two Libration point orbits: one in Jupiter-Europa System and one in Saturn-Titan
System using Parallel Shooting.
The first chapter of this thesis will formulate the equations of motion of a mass less
body in the solar system. Also, the restricted three body problem will be elaborated
and the equations required for the computations will be derived. It will also introduce
the concept of reference frames and the advantages of transforming between them. It
will also introduce the Lagrangian, Hamiltonian, and the Quasi-Periodic formulation of
the restricted n-body problem.
The second chapter introduces the concept and the mathematical background of varia-
tional equations. The variational equations will then be formulated for n-body problem
2 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
with respect to the solar system barycentre, n-body problem with respect to some
other body in the solar system, and for quasi-periodic formulation of the restricted n-
body problem.
The third chapter will describe the package that was designed as a part of this the-
sis. It will elaborate the basic structure of the package, installation of the package, and
will describe important routines of the package. It will also explain how to implement
programs in the package.
The fourth chapter will show some tests and implementation of routines carried out
for demonstrating the credibility and the abilities of the package. The routines for co-
ordinate transformation, vector fields, and variational equations have been tested and
the results and the steps for these steps have been elaborated in this chapter.
The fifth chapter will elaborate two primary applications of the package. One will be to
implement the coefficients of the Lagrangian and Hamiltonian formulation of the model
of the solar-system, particularly, the restricted n-body problem. The other application
is to perform trajectory refinement using the concept of parallel shooting.
Barycentre will be used to refer to the centre of the mass of a system. It will have
some specific usages. Solar-system barycentre will mean the centre of mass of the
whole solar system. On the other hand, a planet barycentre will be used to refer to
the centre of mass of the system with that specific planet and all its satellites. For ex-
ample, Jupiter barycentre would imply that we are talking about the centre of mass of
the whole Jovian system i.e. Jupiter and all its satellites. One other usage of the word
would explicitly mention two bodies. For example, Saturn-Titan barycentre means the
centre of mass of just Saturn and Titan system.
The term RTBP will be occasionally used in this thesis. It stands for Restricted Three
Body Problem. RTBP system will refer to the primary and secondary body in such a
system. More details are elaborated in Chapter 1.
At the end of this thesis, a robust package has been developed which can be used
to implement numerical computations in the solar-system. It has capability to perform
orbit refinement using parallel shooting. Also, the variational equations have been im-
plemented and tested and can be used by the user.
Equations of Motion 3
Chapter 1
EQUATIONS OF MOTION
1.1 Introduction
The purpose of this chapter is to formulate and introduce the basic equations required
to define motion of bodies in a gravitational field. Also, this chapter will focus on def-
initions of reference frames to be used throughout this thesis and will elaborate how
to transform between them. The following subsections will define the equations of n-
body problem and will formulate the equations for restricted n-body problem. Before
proceeding with the elaboration of equations of motion, we need to define different
reference systems and the transformation between them.
Reference frames can reduce the complexity in two ways. One, if the reference frame
is closer to the spacecraft, for which we are performing the calculations, it can reduce
the size of the numerical computations, and, two, if the reference frame is fixed in
space and not rotating it can offer advantages in terms of reduction of complexity of a
problem by removing dependency on time and making the equations of motion simpler.
We will use two primary frames of reference for the present study. The first one is called
Equatorial coordinate system and the other is called Adimensional coordinate system.
Positions
To define the positions in a reference frame, firstly, the origin of the reference frame
has to be defined. The origin of the equatorial reference frame is the centre of the
earth. The X-Y plane is defined by the earth’s equatorial plane. The positive direction
of the Z-axis is defined as the direction to the north pole from the centre of the earth.
Positive X direction is defined as the direction of Vernal Equinox. Vernal Equinox is
a line drawn from the centre of the earth to the centre of the sun on the first day of
the spring. This is denoted by the symbol àas this is used to depict the direction of
the constellation Aries. A system called the J2000 system is what we will be primarily
using as our reference system. Vernal Equinox is defined as January 1, 2000 at 12 hrs
for J2000 system [2]. The positive direction of the Y-axis is perpendicular to the vernal
equinox and is defined by the line joining the centre of the Sun to the centre of the
Earth on the first day of winter (December 21 for the J2000 system). The geocentric
equatorial frame is depicted in the Figure 1.1 [1].
4 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
Time
The time in a reference frame is defined with respect to an initial epoch. The epoch of
the J2000 system is the January 1, 2000 at 00:00 hours (midnight) UTC. This can be
represented in terms of Julian Date which by definition is the number of days measured
from 4713 B.C but the days start from noon not midnight. J2000 is the Julian Date
2451545 [2], thus, as far as this thesis is concerned, the ‘zero’ of time in our reference
frame is this Julian Date.
The other reference frame we will use is called synodical adimensional reference sys-
tem. This reference system is useful for computation in three body problems and in
representing the restricted n-body problem in a form similar to the restricted three body
problem. The idea is to remove dimensions of positions and time by expressing them
in terms of parameters of the three body system. A restricted n-body system is shown
in Figure 1.2. This system has its origin at the centre of mass of the primary and the
secondary body. The line joining the primary and the secondary is assumed to be
fixed in space. The primary body, with mass m1 , is stationed at coordinates (µ, 0, 0),
where µ is given by Equation (1.1). The secondary body, with mass m2 , is stationed
at coordinates (µ − 1, 0, 0). Then, as can be seen, the distance between the primary
and secondary is ‘one’ in this new system. Thus, the positions are adimensionalized
by considering the distance between the two bodies as a unit distance.
m2
µ= (1.1)
m1 + m2
Time
The time in this reference frame is adimensionalized using the sidereal period of the
secondary. Thus, 2π unit of time in adimensional reference frame is the time period of
Equations of Motion 5
the secondary around the primary This has been elaborated further in the subsequent
section. The epoch of the time remains the same as the equatorial reference system.
It might be useful during the study of the equations of motion and during the course
of numerical computation of orbits to transform coordinates from the equatorial refer-
ence frame to the adimensional reference frame or vice-versa. We will discuss the
transformations in terms of positions, velocity, acceleration, and time.
Transformation of Time
The relation between time in the equatorial reference frame , denoted by t∗ , to the
adimensional frame, denoted by t, is given by,
t = t∗ m (1.2)
where m is the mean motion of the secondary around the primary and is calculated
from the Kepler’s third law as,
s
µ1 + µ2
m= (1.3)
a3s
µ1 = G m1 (1.4)
µ2 = G m2 (1.5)
where a s is the semi major axis of the orbit of the secondary around the primary and G
is the universal gravitational constant. Also, it is important to state the notations being
used to define derivatives with respect to time. For any function f, the symbol f 0 will be
used in this thesis to represent the differentiation with respect to time in the equatorial
reference frame. The symbol f˙ will be used to represent the differentiation with respect
to adimensional time. Thus,
df d dt
f0 = = f = f˙ m (1.6)
dt∗ dt dt∗
d2
f 00 = f = f¨ m2 (1.7)
d(t∗ )2
...
f 000 = f m3 (1.8)
where k is the change of scale factor, C is an orthogonal matrix, and ~b is the translation
vector. The translation vector is nothing but the position of the barycentre of the system
from the origin of the equatorial reference frame. The vector R ~ is the coordinates of
position in the equatorial reference frame and ~a is the coordinates in the adimensional
reference frame. C is a 3 by 3 matrix and can be thought to be composed of three
column vectors C~1 , C~2 , C~3 which are described as,
C = C1 C2 C3 (1.10)
where,
R~21
C~1 = (1.11)
||R21 ||2
0
R~21 × R~21
C~3 = 0 (1.12)
||R~21 × R~21 ||2
and,
C −1~e 0 + C 0−1~e − k0 ~a
~a˙ = (1.18)
km
where ~e is given according to the Equation (1.19) as,
~ − ~b
~e = R (1.19)
The transformation from adimensional velocities to the velocities in the equatorial refer-
ence frame is given by Equation (1.20) and is obtained by rearranging Equation (1.18).
00 00
R~21 × R~21 C~3 . (R~21 × R~21 )
C30 = 0 − 0 R~21 (1.23)
||R~21 × R~21 ||2 ||R~21 × R~21 ||2
Here, k0 can be obtained by differentiating Equation (1.16) with respect to time t as,
0
R~21 . R~21
k =
0
(1.25)
k
The transformation of acceleration from equatorial to adimensional coordinates is com-
puted by differentiating the Equation (1.18) with respect to equatorial time and then
using information on transformation of time given in Section 1.3.1. The transformation
is given by Equation (1.26).
where,
and,
00 0
− R~21 2 k0 R~21 k00 k − 2 k02
!
C100 = + + R~21 (1.33)
k ||R~21 ||22 ||R~21 ||22 k
!
C300 = e~f − C30 . C30 + C3 . e~f . C3 (1.34)
where,
00
0 00 000 C~3 . (R~21 × R~21 ) 00
R~21 × R~21 + R~21 × R~21 − 2 0 (R~21 × R~21 )
||R~21 × R~21 ||2
e~f = (1.36)
||R~21 × R~021 ||2
Here, k00 can be obtained by differentiating Equation (1.25) with respect to time as,
0 0 00
R~21 . R~21 + R~21 . R~21 − k02
k00 = (1.37)
k
The equatorial reference frame we have defined is geocentric i.e. centred in Earth.
Sometimes it is advantageous to perform integration with reference frames centred in
some body other than the Earth. For example, while performing integrations in the
Saturn-Titan system it might be more advantageous to use a reference frame centred
in either Saturn, Titan, or their barycentre. Doing so will reduce the size of the numbers
obtained during integrations. Suppose we have to transform coordinates of a body
from a reference frame centred in the body A to those centred in body B. Suppose r~A
Equations of Motion 9
denotes the coordinates of the body with respect to the body A and r~B denotes the
coordinates of the body with respect to the body B. Also, say the vector r~AB denotes
the vector from body A to body B then,
The idea is depicted in Figure 1.3. It is also important to note that during such transfor-
mation the directions of all the axis are fixed otherwise rotation of coordinates must be
performed. So effectively, only the origin of the reference frame is being transformed.
This section defines the equations to predict the motion of a small body moving in
a gravitational field being created by n-1 number of bodies; a problem referred to
as the restricted n-body problem. The restricted n-body problem finds applications
in prediction of motion of satellites, spacecrafts, and other small objects in the solar
system such as comets and asteroids. Before we generate equations for the restricted
n-body problem, first, we need to define the classic n-body problem. The n-Body
problem is the prediction of motion of a body in a gravitational vector field produce by
n bodies. According to the Newton’s second law motion, the acceleration of a body i
moving in such a gravitational field is given by,
n
X G m j r~i j
r~¨i = (1.39)
j=1, j,i
ri3j
where,
The vectors r~i and the vectors r~j are referenced with respect to the solar system
barycentre at a particular epoch. Thus, the equation (1.39) gives the motion of the
body with respect to the solar system barycentre. It can be seen that the Equa-
tion (1.39) can be written for a set of n different bodies. If we assume that the po-
10 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
sitions, velocities, and accelerations of all bodies but one are known and that the body
for which we do not know these values is very small and cannot influence the motion
of the other n-1 bodies, then, Equation (1.39) will just give one equation, for our target
body. This is called as the restricted n-body problem and it finds applications in the
design of trajectories of spacecrafts and satellites.
As stated earlier sometimes there might arise a need to see the motion of the body
with respect to some other body in the solar system. In this case the Equation (1.39)
must be changed. If we want to see the motion of a body i with respect to the body j we
first compute the accelerations of these bodies with respect to solar system barycentre
from Equations (1.39) which will be given as,
n
X G mk r~ik G m j r~i j n
X G mk r~ik
r~¨i = = + (1.42)
k=1,k,i
rik3 ri3j k=1,k,i, j
rik3
and,
n
X G mk r~jk G mi r~ji n
X G mk r~ik
r~¨j = = + (1.43)
k=1,k, j
r3jk r3ji k=1,k,i, j
rik3
Now, to find the acceleration of body i with respect to j we subtract Equations (1.42)
and (1.43) and we obtain
G(mi + m j ) r~i j n
r~ik r~jk
X !
r~¨i j = − + G mk − (1.44)
ri3j k=1,k,i, j
rik3 r3jk
In this equation we have also used the fact that r~i j = −r~ji . Since we assume that the
mass of the body i is very small as compared to other bodies in the system, mi + m j
can be approximated as m j . Also, since we are trying to write equations with respect
to the body j it is better to obtain positions of every other body with respect to j rather
than the solar system barycentre. Thus, if every vector is expressed with respect to
the body j we can re-write the Equation (1.44) as,
G m j r~i n
r~ik r~k
X !
r~¨i = − + G mk − (1.45)
ri3 k=1,k,i, j
rik3 rk3
It is very important to note that all the vectors in Equation (1.45) are with respect to the
body j. For all practical purposes this thesis will use the Equation (1.45) to predict the
motion of a small body such as a satellite in the restricted n-body problem.
The aim of this section is to introduce the restricted three body problem and to in-
troduce tools that will be required to numerically analyse the said problem. Consider
two bodies of masses m1 and m2 that are moving only under the influence of their mu-
tual gravitational attraction in a circular orbit. We call the heavier of these two bodies
as primary and the other as secondary. Suppose we have a third body with a mass
m3 , which is small enough so that it does not affect the motion of the primary and
Equations of Motion 11
secondary bodies, moving under the influence of the gravity of the primary and the
secondary.
Figure 1.4 [5] shows the projection of a three body system on XY plane. We consider
two separate reference frames. One, the XYZ inertial frame which is fixed in space
(also referred to as the sidereal frame), and two, the X̄ Ȳ Z̄ reference frame which is
rotating with the system (also referred to as the synodic frame). The Z axis of both
the frames can be assumed to be projecting out of the plane and will be the same
as the frame is rotating about the Z-axis. Assume that the mass m1 is located at the
coordinates (in the inertial reference frame) (X1 , Y1 , Z1 ) and the mass m2 (m1 > m2 ) is
located at (X2 , Y2 , Z2 ). Masses m1 and m2 are separated by distance l. The distance
of mass m2 from the origin of the coordinate system is a and the distance of m1 is b.
Assume that the angular velocity of the masses around the centre of the coordinate
axis is ω = n. The gravitational attraction between the bodies must be balanced by the
centrifugal force. Therefore,
G m1 m2
= m1 ω2 b (1.46)
l2
where G is the universal gravitational constant. The equation of motion of the third
body i.e. m3 can be derived using the newton’s second law of motion.
d2 X ∂F d2 Y ∂F d2 Z ∂F
= , = and = (1.47)
dt∗2 ∂X dt∗2 ∂Y dt∗2 ∂Z
It is important to point out that t∗ represents the time in the inertial frame. Here, F is
the force function which is given as [5],
m1 m2
!
F =G + (1.48)
R1 R2
Also, X1 ,Y1 and X2 , Y2 can be expressed in terms of the angular velocity as,
Putting the values from Equations (1.48) to (1.52) in Equation (1.47) we obtain the
acceleration of the body m3 in the inertial frame XY as [5],
It is easy to understand that since the line connecting the masses m1 and m2 is rotating
in space, the coordinates of the mass m3 , when expressed in the inertial reference
frame XYZ, will be dependent on time because of the angular velocity of the system.
This can be confirmed from the Equations (1.53) and (1.54). It makes more sense to
remove this time dependency by assuming that the line connecting the masses m1 and
m2 is fixed and to consider the reference frame X̄ Ȳ Z̄.
This section will formulate the equations of motion of the restricted three body problem
in synodic coordinate system. Following the approach suggested in [5] we use com-
plex variables to transform coordinates from sidereal to synodic reference frame.
∗
P = p eiωt (1.56)
where,
p = X̄ + iȲ (1.57)
P = X + iY (1.58)
Also R1 and R2 , the distances of the primary and secondary respectively, can be ex-
pressed as,
R1 = || P − P1 || (1.59)
R2 = || P − P2 || (1.60)
The Equation (1.51) and (1.52) can be re-written in terms of these new complex coor-
dinate system as,
∗
P1 = b ciωt (1.61)
Equations of Motion 13
∗
P2 = −a ciωt (1.62)
d2 P d2 p dz
!
∗
= + 2i ω − ω p eiwt 2
(1.65)
dt∗2 dt ∗2 dt ∗
Using this equation with equations from (1.56) to (1.64) and rearranging we can get
the complex form of the equations of motion in a circular rotating frame [5],
d2 p dz (p − b) (p + a)
!
+ 2i ω − ω p = −G m1
2
+ m2 (1.66)
dt∗2 dt∗ ||p − b||3 ||p + a||3
Now equating the real and complex parts we can express this equation as,
d2 x̄ dȳ x̄ − b x̄ + a
!
− 2ω − ω x̄ = −G m1
2
+ m2 (1.67)
dt∗ dt∗ r̄13 r̄23
d2 ȳ d x̄ ȳ ȳ
!
+ 2ω − ω ȳ = −G m1
2
+ m2 (1.68)
dt∗ dt∗ r̄13 r̄23
This can be expressed in terms of the Force function F ∗ in synodical coordinates as,
d2 x̄ dȳ ∂F ∗
− 2ω = (1.69)
dt∗ dt∗ ∂ x̄
d2 ȳ d x̄ ∂F ∗
+ 2ω = (1.70)
dt∗ dt∗ ∂ȳ
where,
ω2 m1 m2
!
F =∗
( x̄ + ȳ ) + G
2 2
+ (1.71)
2 r̄1 r̄2
By now, we have only expressed two components of the equations of motion. The z
component is easy to transform since Z = Z̄. Thus,
d2 z̄ ∂F ∗
= (1.72)
dt∗ ∂z̄
Equations (1.69), (1.70), and (1.72) are the final equations of motion in the synodical
reference frame.
14 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
It is interesting to write the equations of the restricted three body problem in adimen-
sional synodic reference frame and to see how much simplicity such a process can
offer. Firstly, we will define some parameters to remove the dimensions of the prob-
lem:
x̄ ȳ r̄1
x= , y = , t = ωt∗ , r1 =
l l l
(1.73)
r̄2 m2
r2 = , µ =
l m1 + m2
Using these parameters Equations (1.69), (1.70), and (1.72) can be re-written in adi-
mensional form as [4],
ẍ − 2ẏ = Ω̄ x (1.74)
ÿ + 2 ẋ = Ω̄y (1.75)
z̈ = Ω̄z (1.76)
where,
1 1−µ µ µ(1 − µ)
Ω= (x2 + y2 ) + + + (1.77)
2 r1 r2 2
and,
These equations are the well known form of the restricted three body problem. Al-
though we will not be studying this problem explicitly, the derivation of these equations
have been presented because we will try to express the restricted n-body problem in
a form similar to these equations.
1~~ X G mA
L= Ṙ Ṙ + (1.80)
2 ~ ~
A(S ,E,M,P...,Pk ),A,m1 ,m2 ||R − RA ||2
This equation contains two terms. The first term contains Ṙ, ~ which is the velocity of
the body (eg. a spacecraft) for which we are writing this equation. The second term
is the combined perturbation of all the other bodies in the solar system except the pri-
mary and the secondary body. Also, G is the gravitational constant, mA is the mass of
~ is the position of the spacecraft, and R~A is the position of the
the perturbing body, R
perturbing body.
Equations of Motion 15
~ 0 .R
R ~0 = B
~ 0. B
~ 0 + 2k0 B
~ 0 . S~ + 2 k B
~ 0 . S~ 0 + (k0 )2~r.~r + 2 k k0 S~ . S~ 0 + 2 k2 S~ 0 . S~ 0 (1.83)
where,
S~ = C ~r (1.84)
Here, k is given from Equation (1.16). Using the equations above we can express the
Lagrangian formulation of Equation (1.39) in adimensional coordinates as,
1 (k0 )2 k2
L(~r,~r0 , t∗ ) = ~ 0. B
B ~ 0 + k0 B
~ 0 . S~ + k B
~ 0 . S~ 0 + ~r.~r + k k0 S~ . S~ 0 + S~ 0 . S~ 0
2 2 2
G m1 G m2
+ p + p (1.86)
k (X − µ)2 + Y 2 + Z 2 k (X − µ + 1)2 + Y 2 + Z 2
X G mA
+
A(S ,E,M,P...,P ),A,m ,m
k ||r − rA ||2
k 1 2
1 1˙ ˙ k̇2 k2
!
L(~r,~r , t) =
0 ~ B
B. ~˙ S~ + k B.
~ + k̇ B. ~˙ S~˙ + ~r.~r + k k̇ S~ . S~˙ + S~˙ . S~˙
a2 2 2 2
a G m1 G m2
+ + p (1.87)
k k (X − µ)2 + Y 2 + Z 2 k (X − µ + 1)2 + Y 2 + Z 2
p
G mA
X !
+
A(S ,E,M,P...,P ),A,m ,m
k ||r − rA ||2
k 1 2
16 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
In this equation a is the semi-major axis of the secondary body around the primary.
Using Equations (1.81) and (1.84) we obtain,
S~ = C1 X + C2 Y + C3 Z (1.88)
where, C1 , C2 , and C3 are column vectors given by Equation (1.11), (1.12), (1.13)
respectively. Also, differentiating Equation (1.88) with respect to adimensional time we
obtain,
˙
S~ = C˙1 X + C˙2 Y + C˙3 Z + C1 Ẋ + C2 Ẏ + C3 Ż (1.89)
where, C˙1 , C˙2 , and C˙3 using Equations (1.22) through (1.24). Finally, using the equa-
tions above we can calculate,
GmA
X !
+
A(S ,E,M,P...,P ),A,m ,m
k||r − rA ||2
k 1 2
!2
1 k
a1 = (1.96)
2 a
kk̇
a2 = (1.97)
a2
Equations of Motion 17
!2
k
a3 = (C˙1 . C2 ) (1.98)
a
k 2
!
a4 = (C˙2 . C3 ) (1.99)
a
(1.100)
1 k̇ 2
!2
k
" ! #
a5 = + (C˙1 . C˙1 ) (1.101)
2 a a
1 k̇ 2 k 2
" ! ! #
a6 = + (C˙2 . C˙2 ) (1.102)
2 a a
1 k̇ 2 k 2
" ! ! #
a7 = + (C3 . C3 )
˙ ˙ (1.103)
2 a a
(1.104)
!2
k
a8 = (C˙3 . C˙3 ) (1.105)
a
k
!
a9 = ( Ḃ . C1 ) (1.106)
a2
k
!
a10 = ( Ḃ . C2 ) (1.107)
a2
k
!
a11 = ( Ḃ . C3 ) (1.108)
a2
(1.109)
k̇ k
! !
a12 = ( Ḃ . C1 ) + ( Ḃ . C˙1 ) (1.110)
a2 a2
k̇ k
! !
a13 = ( Ḃ . C2 ) + ( Ḃ . C˙2 ) (1.111)
a2 a2
k̇ k
! !
a14 = ( Ḃ . C3 ) + ( Ḃ . C˙3 ) (1.112)
a2 a2
a
a15 = (1.113)
k
This section elaborates the Hamiltonian formulation for restricted n-body problem. Ac-
cording to information in Section A.4 we have,
For restricted n-body problem (in adimensional coordinates and time) we have the mo-
mentum given by Equation (A.20) as,
PX = 2 a1 Ẋ + a2 X − a3 Y + a9 (1.115)
PY = 2 a1 Ẏ + a2 Y + a3 X − a4 Z + a10 (1.116)
PZ = 2 a1 Ż + a2 Z + a4 Y + a11 (1.117)
PX a2 X a3 Y a9
Ẋ = − + − (1.118)
2 a1 2 a1 2 a1 2 a1
PY a3 X a2 Y a4 Z a10
Ẏ = − − + − (1.119)
2 a1 2 a1 2 a1 2 a1 2 a1
PZ a4 Y a2 Z a11
Ż = − − − (1.120)
2 a1 2 a1 2 a1 2 a1
The Hamiltonian can be obtained substituting values from these equations into Equa-
tion (1.114). By doing so we obtain the Hamiltonian as the Equation (1.121). The
coefficients required for this equation are dependent on the coefficients of Lagrangian
and are given by Equations (1.122) to (1.136)
1
b1 = (1.122)
4 a1
− a2
b2 = (1.123)
2 a1
a3
b3 = (1.124)
2 a1
a4
b4 = (1.125)
2 a1
a2 + a23
2
b5 = − a5 (1.126)
4a1
a22 + a23 + a24
b6 = − a6 (1.127)
4 a1
Equations of Motion 19
a22 + a24
b7 = − a7 (1.128)
4 a1
a3 a4
b8 = − a8 (1.129)
2 a1
− a9
b9 = (1.130)
2 a1
− a10
b10 = (1.131)
2 a1
− a11
b11 = (1.132)
2 a1
a2 a9 a3 a10
b12 = + − a12 (1.133)
2 a1 2 a1
− a3 a9 a2 a10 a4 a11
b13 = + + − a13 (1.134)
2 a1 2 a1 2 a1
− a4 a10 a2 a11
b14 = + − a14 (1.135)
2 a1 2 a1
b15 = −a15 (1.136)
Again, these coefficients are quasi-periodic functions of time like the coefficients of the
Lagrangian.
The equations of motion for restricted n-body problem in synodical adimensional coor-
dinates are obtained using the Equation (A.18) for the three components i.e. x, y, and
z. Thus, we formulate the equations of motion as,
d ∂L ∂L
− =0 (1.138)
dt ∂ ẋ ∂x
d ∂L ∂L
− =0 (1.139)
dt ∂ẏ ∂y
d ∂L ∂L
− =0 (1.140)
dt ∂ż ∂z
Performing these computations and rearranging we get the quasi-periodic semi-analytical
RTBP like formulation for restricted n-body problem in the synodical adimensional ref-
erence frame as,
∂Ω
ẍ = c1 + c4 ẋ + c5 ẏ + c7 x + c8 y + c9 z + c13 (1.141)
∂x
20 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
∂Ω
ÿ = c2 − c5 ẋ + c4 ẏ + c8 x + c10 y + c11 z + c12 (1.142)
∂y
∂Ω
z̈ = c3 − c6 ẏ + c4 ż + c9 x − c11 y + c12 z + c13 (1.143)
∂z
where,
1−µ µ
Ω= p + p
(x − µ)2 + y2 + z2 (x − µ + 1)2 + y2 + z2
(1.144)
X µA
+
A(S ,E,M,P...,P ),A,m ,m
||~r − r~A ||2
k 1 2
~r = x î + y ĵ + z k̂ (1.145)
r~A = xA î + yA ĵ + zA k̂ (1.146)
It can be seen that these equations are similar in form to the equations of restricted
three body motion in the synodic reference frame. The coefficients are given by,
~¨ . C~1 )
− (B
c1 = (1.147)
k
¨~ ~
− ( B . C2 )
c2 = (1.148)
k
¨~ ~
− ( B . C3 )
c3 = (1.149)
k
− 2 k̇
c4 = (1.150)
k
˙~ ~
c5 = 2 (C1 . C2 ) (1.151)
˙
c6 = 2 (C~2 . C~3 ) (1.152)
˙ ˙ k̈
c7 = (C~1 . C~1 ) − (1.153)
k
˙~ ~
2 k̇ (C1 . C2 ) ¨
c8 = + (C~1 . C~2 ) (1.154)
k
˙ ˙
c9 = (C~1 . C~3 ) (1.155)
˙ ˙ k̈
c10 = (C~2 . C~2 ) − (1.156)
k
˙~ ~
2 k̇ (C2 . C3 ) ¨
c11 = + (C~2 . C~3 ) (1.157)
k
˙ ˙ k̈
c12 = (C~3 . C~3 ) − (1.158)
k
Equations of Motion 21
a3
!
c13 = (1.159)
k
It is important to point out that these coefficients are dependent on time and are quasi
periodic and thus Fourier analysis can be performed. After the Fourier Analysis the
expansions can be cut and only the most relevant terms can be kept and in this way we
can obtain suitable semi-analytical models that approximate up to a desired precision
the complete model of the system.
Variational Equations 23
Chapter 2
VARIATIONAL EQUATIONS
Variational equations are important as they express the change in the final state of a
system when a change is applied to initial state of the system. The study of these
equations is very important as they can be used to analyse the change in orbit of a
body because of a small perturbation in the initial position and velocities. The purpose
of this chapter is to introduce the mathematical background of variational equations
and to formulate the variational equations for three primary vector fields:
1. Restricted n-body problem described with respect to the solar system barycentre
2. Restricted n-body problem described with respect to some particular body in the
solar system
The first step before considering the variational equations is to understand the concept
of State Transition Matrix. Let φt (x0 ) represent the state of a dynamical system at a time
t such that the state of the system at t=0 was x0 . It is important to point out that the
state of the dynamical system at t=0 will be the initial point x0 . This can be stated as,
φ0 (x0 ) = x0 (2.1)
Now if the initial state was changed a little by say ∆x0 then the state at a time t will be
φt (x0 + ∆x0 ). This can be expanded binomially as,
The concept of Equation (2.3) is represented in Figure 2.1. It is easy to see that,
Ẋ = f (X) (2.6)
Then it is clear that the state of the dynamical system φt (x) will be a solution to Equa-
tion (2.6). Thus,
d(φt (x))
= f (φt (x)) (2.7)
dt
d(φt (x))
Dx = D x f (φt (x)) D x (φt (x)) (2.8)
dt
This equation can be re-written as,
d
(D x φt (x)) = D x f (φt (x)) D x (φt (x)) (2.9)
dt
D x (φt (x)) is the state transition matrix as per Equation (2.4). Thus equation (2.9) can
be rewritten as,
Ṁ = D x f (φt (x)) M (2.10)
Consider the state of an autonomous system represented by the vector X such that,
Consider the state of a non-autonomous system represented by the vector X such that,
as,
t˙ = 1 (2.17)
This is a way to include the dependency on time without increasing the complexity of
the system. For this case, the variational matrix DNA is given by Equation (2.18).
0 0 0 0 0 0 0
0
0
0
∂ ẍ
DNA = D (2.18)
∂t
∂ÿ
∂t
∂z̈
∂t
X = (t, X1 , X2 , · · · , X6 )T (2.19)
such that,
1
X4
X5
Ẋ = X6 (2.20)
Ẍ
1
Ẍ2
Ẍ3
Now the idea of implementation of 7×7 variational equations will be elaborated. Out
of these 49 equations, one is the Equation (2.17) and six of them are given by Equa-
tion (2.20). Rest of the equations are given as [6],
0
0
0
X7 X7
X X ∂Ẋ4
d 8 8
X9 = D X9 + ∂t (2.21)
dt .. ..
∂
. . 5
Ẋ
X12 X12 ∂t
∂t
where the matrix D is given by Equation (2.14). Further,
X13 X19 · · · X43 X13 X19 · · · X43
d X14 X20 · · · X44 X14 X20 · · · X44
. .. .. = D .. .. .. (2.22)
dt ..
. . . . .
X18 X24 · · · X48 X18 X24 · · · X48
Variational Equations 27
again, the matrix D is given by Equation (2.14). Equations (2.21) and (2.22) together
are termed as the variational equations.
Now suppose we have an initial point of the trajectory of a spacecraft and we want to
know what will be the change in the final position if the initial conditions are changed.
To compute this, first, we start with a state transition matrix at the initial point which
will of course be the identity matrix I as stated in Section 2.2. At the initial point (of the
orbit, for example) we define the values of X7 to X12 in Equation (2.21) as,
0
X7
X8 0
0
X9 = (2.23)
. 0
..
0
X12
0
We initialise the matrix given on the right side of Equation (2.22) as,
1 0 0 0 0 0
X13 X19 · · · X43 0 1 0 0 0
0
X14 X20 · · · X44 0
0 1 0 0 0
.. .. .. = 0 (2.24)
. . . 0 0 1 0 0
0
X18 X24 · · · X48 0 0 0 1 0
0 0 0 0 0 1
After the initialisation of these values we can integrate the trajectory of the spacecraft
for a desired time. At the end of the computations, the State Transition Matrix can be
obtained from the final values of the matrix composed of the elements from X13 to X48 .
After we have the final State Transition Matrix we can estimate the final point if the
initial conditions are changed with a small perturbation from Equation (2.3). This way
allows to estimate the final point of a trajectory for different values of perturbations in
the initial points. It allows for the reduction in terms of computation time as integrations
need not be performed for different initial conditions. Also, the State Transition Matrix
for a wide number of points on the initial trajectory can be stored and thus the whole
new trajectory with perturbations can be estimated. Of course, this method will not
give the exact trajectory but the accuracy can be increased by considering higher
order terms in Equation (2.3).
This section will elaborate the formation of variational equation for the N-body prob-
lem w.r.t the solar system barycentre which was discussed in Equation (1.39). The
state vector for the N-body problem is given as Equation (2.15) and its derivative is
28 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
ẍ = (r~¨i ) x (2.25)
ÿ = (r~¨i )y (2.26)
z̈ = (r~¨i )z (2.27)
where the values of (r~¨i ) x , (r~¨i )y , and (r~¨i )z are given by equations (B.2), (B.3), and (B.4)
respectively.
The variational matrix for this problem is constructed using the Equation (2.18). For
∂ ẍ ∂ÿ ∂z̈
this case, the values of , , and are taken from Equations (B.14), (B.15), and
∂t ∂t ∂t
(B.16) respectively. For the calculation of matrix D from equation (2.14) the values can
be taken from Equation (B.5) till Equation (B.13). It is important to note that for this
case,
∂ ẍ ∂ ẍ ∂ ẍ ∂ÿ ∂ÿ ∂ÿ ∂z̈ ∂z̈ ∂z̈
= = = = = = = = =0 (2.28)
∂ ẋ ∂ẏ ∂ż ∂ ẋ ∂ẏ ∂ż ∂ ẋ ∂ẏ ∂ż
After the matrix D has been created, it is can be used to compute the variational
equations from the Equations (2.21) and (2.22). Further treatment is dealt with in
Appendix B.
This section will elaborate the formation of variational equation for the N-body problem
w.r.t a body in the solar system which was evaluated in Equation (1.45). The treatment
is similar to the previous sub-section and in this case too the state vector is given by
Equation (2.15) and its derivative is represented by Equation (2.16). Again,
ẍ = (r~¨i ) x (2.29)
ÿ = (r~¨i )y (2.30)
z̈ = (r~¨i )z (2.31)
where the values of (r~¨i ) x , (r~¨i )y , and (r~¨i )z are given by equations (C.7), (C.8), and (C.9)
respectively.
The variational matrix for this problem is constructed using the Equation (2.18). For
∂ ẍ ∂ÿ ∂z̈
this case, the values of , , and are taken from Equations (C.19), (C.20), and
∂t ∂t ∂t
(C.21) respectively. For the calculation of matrix D from equation (2.14) the values can
be taken from Equation (C.10) till Equation (C.18). It is important to note that for this
case also,
∂ ẍ ∂ ẍ ∂ ẍ ∂ÿ ∂ÿ ∂ÿ ∂z̈ ∂z̈ ∂z̈
= = = = = = = = =0 (2.32)
∂ ẋ ∂ẏ ∂ż ∂ ẋ ∂ẏ ∂ż ∂ ẋ ∂ẏ ∂ż
After the matrix D has been created, it can be used to compute the variational equa-
tions from the Equations (2.21) and (2.22). Further treatment is dealt with in Appendix
Variational Equations 29
C.
The variational matrix for this problem is constructed using the Equation (2.18). For this
∂ ẍ ∂ÿ ∂z̈
case, the values of , , and are taken from Equations (D.22) to Equation (D.24)
∂t ∂t ∂t
respectively.
For the calculation of matrix D from equation (2.14) the values can be taken from
the Annexure D. After the matrix D has been created it is can be used to compute the
variational equations from the Equations (2.21) and (2.22).
Package Description 31
Chapter 3
PACKAGE DESCRIPTION
3.1 Introduction
The aim of this chapter is to introduce the package that was designed as a part of
this thesis. It describes some important routines and other important aspects of the
program. The purpose of this chapter is serve as a guide to every user who plans to
implement routines in this package and to use the package to perform integrations.
The Directory structure of the package is shown in Figure 3.1. There are two pri-
mary directories: main and parallelshooting. The directory main contains the JPL
ephemeris in the folder ‘/main/ephemerides/’. The folder‘/main/spicelib/’ holds the JPL
SpiceLib. The folder ‘/main/source/’ contains the routines written in FORTRAN 77 with
a makefile. When these routines are compiled they are copied and stored in the folder
‘/main/lib/’. The folder ‘/main/examples/’ contains all the examples and test routines
that were designed to test certain aspects of the package. These tests are described
in the next chapter.
3.2.2 Installation
Before the use of this package it must be compiled on the user’s machine. To do
so enter the directory ‘/main/’ and execute the file install.sh. This script will compile
the SpiceLib and the program library. After the installation is complete the user can
implement routines in this package. It is very important to note that this package is
32 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
intended for a 64-bit machine as the SpiceLib is 64 bit. The 32 bit SpiceLib has also
been provided in the folder ‘/main/spicelib32/’. If the user intends to use the package
on a 32-bit machine then the user must execute the script named ‘./main/install32.sh/’
rather than ‘./main/install.sh/’. It is recommended to use the 64 bit version. After the
program has been installed, the user can copy the file ‘./main/lib/libjpl.a’ to any folder.
While writing new routines the user can compile this library with their routines.
3.3 SpiceLib
3.3.1 Ephemeris
Ephemeris or Ephemerides describe the position and velocity of a celestial object as a
function of time. Ephemeris can be either analytical or numerical. Analytical ephemeris
expresses the positions and velocities of an object in terms of algebraic equations of
motion. Sometimes, the equations of motion of a body can be quite complicated and it
can be extremely time consuming to find an analytical solution. Numerical Ephemeris,
on the other hand, expresses the positions and velocities based on a table represent-
ing the numerical solution of the equations of motion to a certain degree of accuracy.
A drawback of numerical ephemeris is that sometimes the size of tables could be very
long. Thus, to reduce the size, sometimes the numerical ephemeris can be approx-
imated by analytical functions. The ephemeris that will be used by this thesis is a
numerical ephemeris by JPL DE406. It contains a total of 52 bodies. The bodies are
shown in Appendix G. This ephemeris stores data from 3000 BC to 3000 AD [7] [9]
and are fitted with Chebychev polynomials. To read this ephemeris, JPL has a special
set of programs called as SpiceLib.
numerical computations. It can be used to select bodies in the solar system that have
to be considered for computations. An example model file has been shown in An-
nexure F. The file has four columns. The first column indicates the identifier of the
body. The identifier of the body is an integer. The identifiers of the barycentre of all
the systems are shown in Table 3.1. The bodies in a system are identified as follows.
Suppose that the identifier of a barycentre is P, then the identifier of the planet of the
system will be P99 and the identifiers of the moons start from P01 to P98. For exam-
ple, the identifier of Mars barycentre is 4, then Mars would be 499 and the identifiers
of the moons Phobos and Deimos will be 401 and 402 respectively.
The second column determines whether the body is being considered in the model.
If the value is ‘1’ then the body is considered and a ‘0’ signifies that it is not being
considered. If a body is not considered, the user will not be able to access its in-
formation from the ephemeris and the gravitational contributions of this body will not
be taken into account for the vector fields. The user of the package must open this
file and select the body according to the model requirements. The third column gives
the reference name of the ephemeris where the body is stored in the SpiceLib. The
fourth column exists only for the barycentres and stores the gravity model status of the
system . Gravity model has been described in the Section 3.4.3.
• IBC: IBC holds the origin of the coordinate system. IBC can hold ID of any body
in the ephemeris. If IBC is set to zero, the coordinates are taken with respect to
the solar system barycentre.
• LIST(3,IMAX): It is a array of three rows and IMAX columns and it contains infor-
mation about the model considered. The first row of LIST contains the ID of the
body. The second row shows if we are considering position of the body (takes
34 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
Body Identifier
Sun 10
Mercury Barycentre 1
Venus Barycentre 2
Earth Barycentre 3
Mars Barycentre 4
Jupiter Barycentre 5
Saturn Barycentre 6
Uranus Barycentre 7
Neptune Barycentre 8
Pluto Barycentre 9
the value one); position and velocity (value two); position, velocity and accelera-
tion (value three); or, position, velocity, acceleration and over- acceleration (value
four). And the third row indicates if is a barycentre (value zero), a planet (value
one) or a satellite (value two). Since it has 53 columns it can hold if all the bodies
in the ephemeris have been selected. In general, if bodies less than 53 have
been selected, rest of the variable will be set to zero.
• SECONDARYINDEX: This hold the column index of the secondary body in the
array LIST.
• PRIMARYINDEX: This hold the column index of the primary body in the array
LIST.
• IMAX: This variable is used to define the size of other common variables. Since
the software package is capable of working with maximum of 53 bodies, IMAX
has been defined as 53.
• XMU: It stores is the mass parameter of the restricted three body system con-
sidered.
• ENEM: It stores the mean motion in day−1 of a selected system. It has been
computed using Kepler‘s third law by the routine INTXMUENEM.
• BARYINDEX: This hold the column index of the barycentre in the array LIST. It
is important to note that if the system considered is the Sun-Planet Barycenter
then BARYINDEX is 0.
• C1, C2, C3: C1, C2, and C3 are three column vectors of length 3. They store the
value for the columns of the matrix C necessary for coordinate transformations.
It is important to note that the these variables are only initialised if the routine
CALCPARAMRTBP has been called. Otherwise they are empty. These are
computed from Equations (1.11), (1.12), and (1.13) respectively.
• C1P, C2P, C3P: C1P, C2P, and C3P are three column vectors of length three.
They store the value for the columns of the matrix C 0 necessary for coordinate
transformations. These are calculated from Equations (1.22), (1.24), and (1.23)
respectively.
• C1PP, C2PP, C3PP: C1PP, C2PP, and C3PP are three column vectors of length
3. They store the value for the columns of the matrix C 00 necessary for coordinate
transformations. Their values are obtained from Equations (1.33), (1.33), and
(1.33) respectively.
• C1PPP, C2PPP, C3PPP: C1PPP, C2PPP, and C3PPP are three column vectors
of length 3. They store the value for the columns of the matrix C 000 necessary for
coordinate transformations. These are calculated from Equations (E.2), (E.8),
and (E.3) respectively.
• XT: This variable stores the value of the vector ~b required for the transformations
as described in Chapter 1. The value is computed from the Equation (1.17).
• XK, XKP, XKPP, XKPPP: The variables XK, XKP, XKPP, and XKPPP store the
value of the constants k, k0 , k00 , and k000 , respectively, used for coordinate trans-
formations. Their values are obtained from Equations (1.16), (1.25), (1.37),
and (E.7).
• ADLIST: This variable is a matrix with IMAX columns and three rows. This vari-
able stores the backup of the variable LIST in case the routine ADAPTLIST is
used. List adaptation has been described in section 3.4.4.
• ADFLAG: This variable can take up two values 1 and 0 depending on whether
adapted list is being used or not. The value of this variable is initialised by
ADAPTLIST and must only be used as a read only value.
36 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
• INDEXBACK: This column vector of length three stores the indexes of the pri-
mary, secondary, and the barycenter when the routine ADAPTLIST is being
used.
• GRAVLIST: It is an array of length 9 and has two columns. The first column
contains the ID of the nine barycentres of the nine planets. The second contains
the status of gravity model. Gravity model has been detailed in Section 3.4.3
Suppose that integrations are being performed in a vector field for a particular model
of the solar system. If, for example, the body under consideration (fro example, a
spacecraft) is in vicinity of Jupiter system i.e. Jupiter and its satellites then it is more
accurate to consider every body in this system. But, if our body is very far away from
the Jupiter satellite systems then it makes more sense to consider the Jupiter System
as one single point system based on the centre of gravity of the system. This can
reduce the amount of numerical computations as the program will not calculate vectors
and coordinate transformations for each of the Jovian satellite but will only compute
such factors for one body. To facilitate this, Gravity model has been suggested. The
gravity model is elaborated in the Table 3.2.
List adaptions can be useful in case the user wants to perform integrations just in a
particular three body system and to remove all the perturbations of the other bodies
in the model. To facilitate this, the package has a routine called ADAPTLIST. If this
routine is used it removes every body from the list but the primary, secondary, and the
barycenter defined in the initial model.
3.5 Subroutines
This section will describe the important subroutines that are included in this software
package and are being used in course of this study. Some of the routines we will
define as ‘internal’, which means that the user need not know about it and are only
used by some other routines, but are important enough to be mentioned. The routines
are grouped into categories.
READ MODELEPH
The main purpose of this routine is to read the file ‘modeleph.dat’, from the directory
in which the user is implementing routines, and to write the common variable LIST.
The first step is to Figure 3.2 shows the flowchart of the working of the routine. The
first step is to open the file ‘modeleph.dat’ and to read its columns. The next step is
to check if the value of ICO has been defined and is not equal to zero. In case ICO
is zero, the program stops. Otherwise the routine CHANGE FILE DAT is called This
routine writes the selected bodies into a file named ‘new files.dat’.
The next step is to call the routine CONG. This routine verifies the integrity of the
model i.e. if a planet has been selected then its barycenter must also be selected.
If a satellite has been selected, it is mandatory to select its planet and the planet’s
barycenter. After these checks are made the routine READ MODELEPH will write
these selected bodies into LIST. This is an internal routine.
CALL NMODJPL(0,501,2)
The flowchart of working of the routine has been shown in Figure 3.3.The routine
NMODJPL calls the routine READ MODELEPH followed by a call to WRITELIST.
The routine WRITELIST writes a file named ‘list.dat’. The next step is to call the
routine FILLXMUE which returns a vector containing the gravitational constants i.e.
GM of all the bodies in the ephemeris. The routine FILLSEMIFINAL is then called
which initialises the common variables SEMIAXFIN and SEMIINDEX. The next step is
a call to the routine ORDER which makes sure that the variable LIST is ordered. The
routine CICOLI is eventually called which is responsible for initialisation of the values
of ICO and LI. The routine SETSYSTEMPOSITIONS sets the values for the common
variables PRIMARYINDEX, SECONDARYINDEX, and BARYINDEX. Afterwards the
routine INTXMUENEM is called which is responsible for calculation of the values of
common variables XMU and ENEM.
1. REAL*8 P1: Date in the equatorial J2000 reference frame for which the states
are required.
2. INTEGER P2: IPVA which can take integer values from ‘1’ to ‘4’. If the value of
IPVA is ‘1’ then the routine only returns positions of the bodies. A value of ‘2’ re-
turns positions and velocities, ‘3’ returns positions, velocities, and accelerations,
and ‘4’ returns positions, velocities, accelerations, and over-accelerations.
This routine is responsible for returning states of bodies included in the model. The
routine calls the routine SPKG which reads the SpiceLib and returns the vector with po-
sitions, velocities, accelerations, and overaccerlerations. The coordinates of barycen-
tres are with respect to the solar system barycenter. The coordinates of planets and
moons are with respect to the barycenter of the system. For example, the coordinates
Package Description 39
of Jupiter’s moon Europa will be given with respect to the Jupiter Barycenter. The rou-
tine then calls PVASIBC which returns the coordinates of all the bodies with respect to
the IBC i.e. the centre of the coordinate system selected by the user. The transforma-
tions are carried using the formulae given in Section 1.3.2. So finally the output matrix
is a matrix of size (12, IMAX), where IMAX is 53 (see Section 3.4.2). The 12 rows will
hold state of the body. It will contain the requested values (according to IPVA) with
respect to the user selected reference frame. The columns will be in the same order
as that of the variable LIST.
CALL PLAJPLNSAT(1000.D0,4,PVAS)
where, PVAS should be a 12 by 53 matrix to hold the output produced by the routine.
SUBROUTINE SEARCHLIST(P1,P2)
1. INTEGER P1: The identifier of the body for which the index is needed.
The routine searches the common variable LIST and returns the index of the position
of the requested body. The routine is useful as it saves time for the user because it
prevents writing loops to search the list manually. Of course, it is necessary that the
requested body must have been selected in the model.
The importance of this routine can be seen from the following example. If the rou-
tine is called as,
CALL SEARCHLIST(502,POS)
then the routine will return the index of the Europa in the variable POS. If now for exam-
ple we need the position of Europa then the position will be [PVAS(1,POS), PVAS(2,
POS), PVAS(3,POS)].
SUBROUTINE RETURNSEMIMAJAXIS(P1,P2)
1. INTEGER P1: the identifier of the body for which the semi-major axis is needed.
The routine returns the semi-major axis of the requested body. The values of semi
major axis have been taken from The Explanatory Supplement to the Astronomical
Almanac (see [9]). The routine searches the common variable SEMIINDEX for the
index of the body and uses this index to return the semi-major axis from the common
variable SEMIAXFIN. The routine is called as,
CALL RETURNSEMIMAJAXIS(301,SMA)
In this example the routine will return the semi-major axis of the Moon in the variable
SMA.
40 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
1. INTEGER P1: The identifier of the body for which the value is needed.
The routine returns the value of GM of the requested body, where, G is the Gravita-
tional Constant and M is the mass of the body. The values have been taken from The
Explanatory Supplement to the Astronomical Almanac (see [9]). The routine searches
the common variable SEMIINDEX for the index of the body and uses this index to
return the value of GM from the common variable XMUE. The routine is called as,
CALL RETURNXMUEA(301,XMUEM)
In this example the routine will return the value of GM of the Moon in the variable
XMUEM.
These routines can be used for the transformation from one reference frame to the
other. These are very important as many tests and computations depend on these
routines.
SUBROUTINE CALCPARAMRTBP(P1,P2)
2. INTEGER P2: The value of IPVA. IPVA can take integer values from ‘1’ to ‘4’. For
example, if during coordinate transformations only positions and velocities must
be transformed then IPVA must be ‘2’.
This internal routine calculates the parameters required for implementation of the co-
ordinate transformations. It calculates the values of the common variables C1, C2, C3,
C1P, C2P, C3P, C1PP, C2PP, C3PP, C1PPP, C2PPP, C3PPP, XT, XK, XKP, XKPP,
and XKPPP. The call to this routine is,
CALL CALCPARAMRTBP(1000.D0, 2)
SUBROUTINE TRANS(P1,P2,P3,P4,P5)
5. INTEGER P5: The request index and it can take two values: ‘1’ and ‘-1’. If
the request index is ‘1’ then equatorial coordinates are transformed into adimen-
sional ones. On the other hand, if it is ‘-1’ then adimensional coordinates are
transformed to equatorial coordinates.
SUBROUTINE TRANSIBC(P1,P2,P3,P4,P5,P6)
1. REAL*8 P1: The time in equatorial J2000 reference frame.
2. REAL*8 P2(12): The input containing points to be transformed (let’s call it Xold )
3. INTEGER P3: The identifier of the origin of the old reference frame with respect
to which the coordinates Xold are specified.
4. REAL*8 P4(12): An empty one dimensional array vector to store the output of
the routine (let’s call it Xnew )
5. INTEGER P5: The identifier of the body of the new origin of reference frame with
respect to which the coordinates Xnew are specified
This routine can be used to transform from equatorial coordinates with respect to one
origin of reference frame to equatorial coordinates with respect to another origin of
reference frame. It should be noted that the length of the arrays Xold and Xnew must be
at least ‘3*IPVA’ to properly store the output of the routine.
SUBROUTINE CDJTA(P1,P2,P3,P4)
1. REAL*8 P1: The date in equatorial J2000 time.
2. REAL*8 P2: The adimensional time.
3. REAL*8 P3: Origin of the equatorial time frame. The origin of the equatorial time
frame must be supplied always as ‘0.D0’. This option can allow user to use an
equatorial reference frame with a different epoch than the date ‘0’.
4. INTEGER P4: The request index which takes two integer values: ‘1’ and ‘-1’. If
the routine is called with the value ‘1’ then the equatorial time is transformed to
adimensional time. The adimensional time is transformed to equatorial time if
the request index is ‘-1’.
This routine can be used to transform from equatorial time to adimensional time or
vice-versa. An example call to the routine will look like,
CALL CDJTA(1000.D0,TA,0.D0,1)
This call will transform the equatorial date ‘1000’ to adimensional time and will store
it in the variable TA. This routine uses concepts of transformation of time given in
Section 1.3.1.
SUBROUTINE VFSSB(P1,P2,P3,P4)
1. REAL*8 P1: The time in equatorial J2000 reference frame.
2. REAL*8 P2(48): The state where the vector field and variational equations must
be calculated
3. INTEGER P3: Integer variable N specifying whether only the vector field is
needed or the variational equations are needed as well. The variable N can
have two values: ‘6’ means only the vector field are returned, ‘48’ means the
vector field as well as the variational equations are computed and returned.
4. REAL*8 P3(48): Array to hold the output of the routine.
This routine computes the vector field and the variational equations for a body in the
solar system with respect to the solar system barycentre depending on the model
specified by the user. The equations for the vector field are given in Equation (1.39)
and the variational equations are given in Section 2.6.1. An example of a call to the
routine looks like,
CALL VFSSB(1000.D0, B, 48, F)
Here, the routine will compute the value of the variational equations and the vector
fields on the date ‘1000’ based on the positions supplied in array B and will return the
output in the array F. It should be noted that the routine only works if the reference
frame is centred in the solar-system barycenter.
Package Description 43
SUBROUNTINE VFIBC(P1,P3,P4,P5)
2. REAL*8 P2(48): The state where the vector field and variational equations must
be calculated
3. INTEGER P3: Integer variable N specifying whether only the vector field is
needed or the variational equations are needed as well. The variable N can
have two values: ‘6’ means only the vector field are returned, ‘48’ means the
vector field as well as the variational equations are computed and returned.
This routine computes the vector field and the variational equations for a body in the
solar system with respect to a body specified as the origin of the equatorial reference
frame. The reference body must be stored in the common variable IBC. The equations
for the vector field are given in Equation (1.45) and the variational equations are given
in Section 2.6.2. The variable N can have two values: ‘6’ means only the vector field
are returned, ‘48’ means the vector field as well as the variational equations are com-
puted and returned.
Here , the routine will compute the value of the variational equations and the vector
fields on the date ‘1000’ based on the positions supplied in array B and will return the
output in the array F. It should be noted that the routine only works if the reference
frame is centred in the some body other than the solar system barycenter i.e. IBC , 0.
SUBROUTINE RETURNBODYSTATUS(P1,P2)
The purpose of this routine is to return whether a particular body must be considered
for perturbations or not. The routine reads the gravity model and returns an Integer
value. A return of ‘1’ means that the body has to be considered and a return of value
‘0’ means that the body should not be considered. A sample call to the routine is,
CALL RETURNBODYSTATUS(501,STAT)
In this example, the routine is asked to return the status for IO. It will search the gravity
list and if the value in the gravity list for Jupiter Barycenter is either ‘2’ or ‘3’ then the
routine will return the variable STAT with a value of ‘1’ else with a value ‘0’.
44 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
SUBROUTINE ADAPTLIST
The purpose of this routine is to change the common variable LIST. The routine takes
the existing LIST and stores it in the common variable ADLIST. After the backup is
made, the routine removes all the bodies from LIST and puts in only the primary,
secondary, and the barycenter for the defined RTBP system. For example, if the se-
lected RTBP system is Saturn-Titan then the new list will contain only Saturn, Titan,
and the barycenter of the Saturn satellite system. After changing the LIST this routine
makes a backup of the common variables PRIMARYINDEX, SECONDARYINDEX, and
BARYINDEX in the common variable array INDEXBACK. These variables are then set
to ‘1’, ‘2’, and ‘3’ respectively as that is the new position of these bodies in the new
”adapted” LIST. It also sets the common variable ADFLAG to ‘1’ signifying that LIST
has been adapted. Also, whenever the routine is called it checks that whether the vari-
able ADFLAG is ‘0’ or not because a value ‘1’ would signify that the routine has been
used once in the past. If the value of this variable is ‘1’ then this routine restores the
original LIST from the backup stored in the variable ADLIST and restores the variables
PRIMARYINDEX, SECONDARYINDEX, and BARYINDEX from the backup stored in
the array INDEXBACK. Then it sets the variable ADFLAG back to ‘0’. This routine
takes in no inputs. A sample call to the routine is,
CALL ADAPTLIST
Also, it is important to note that if the LIST is adapted then the routine PLAJPLNSAT
will print out a message reminding the user of the same.
SUBROUTINE CALCOOACC(P1,P2)
1. REAL*8 P1: The time in the equatorial J2000 frame
This routines calculates the over-over acceleration of a body. Since the package does
not have the ability to return analytical value of the over-over acceleration and the
values of the three components are calculated using numerical differentiation. The
over-over acceleration is calculated for all the bodies in the model.
This will return the over-over accelerations of all the bodies in the model in on the date
‘1000’.
SUBROUTINE RK78(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11)
1. REAL*8 P1: Current value of independent variable, in our case, date in some
reference frame
2. REAL*8 P2(48): Current value of dependent variable, in our case, the vector field
8. REAL*8 P8(13,N): Auxiliary variable of size (13, N), where N is the number of
equation
10. REAL*8 P10(N): Empty auxiliary vector of size N, to return the value of the output
of the routine for which the integrations has to be performed
11. EXTERNAL P11: Name of the routine for which the integrations must be per-
formed i.e. the name of the vector field.
This routine can be used to perform integrations in a vector field using Runge-Kutta-
Fehlberg method of the order 7 and 8. For details into RK78 method and its numerical
equations the reader can see Reference [12]. It uses a total of 13 steps and computes
two different guess of the next point. Then the difference between the estimation is
computed and the L1 norm is obtained. If this norm divided by the number of equations
is less than a given tolerance e1 times (1+0.01*L1 norm at the point) then this estimation
is returned as the next point. If this condition is not satisfied then a new value of the
step size h is obtained and the computation is done again. After the computations are
completed a prediction of the next step h is returned. The routine takes the following
inputs, in order: A call to this routine will look like,
In this example, the integration will be performed on the day ‘1000’ for the coordinates
stored in the vector XJP. The size of vector XJP must be at least 6, as the number of
equations will be 6. The initial time step that will be used will be 1.8×10−2 . The minimum
value for the time step will be 1 × 10−4 and the maximum value is 1. The tolerance e1
will be 1 × 10−13 and the integrations will be performed for the routine VFSSB.
This section will give an example of how to start the program to assist the user to im-
plement some parts of the program. A simple example is to obtain the trajectory of
Moon with respect to a centre of the earth. The sample program is shown below.
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C
C THIS EXAMPLE SHOWS A BASIC ROUTINE IMPLEMENTATION IN THE
C PACKAGE
C
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
PROGRAM MAIN
IMPLICIT NONE
CHARACTER*64 ARXOUT
INTEGER I,MOON
REAL*8 PVAS(12,53), T, XMOONI(6),TOLRK,HMIN,HMAX
REAL*8 TFINAL, H, B(48),F(48),R(13,48)
EXTERNAL VFIBC
C
C INITIALISING THE SYSTEM (EARTH-MOON)
C
CALL NMODJPL(399,301,0)
C
C THE IBC SELECTED IS 399. THUS REFERENCE FRAME WILL BE CENTRED
C IN THE EARTH
C
C THE ICO IS 301. WHICH MEANS THAT THE SECONDARY IS THE MOON
C (SEE MODELEPH.DAT IN APPENDIX F)
C
C
C SELECTING A RANDOM INITIAL TIME
C
T=232.D0
C
C
C CALL TO THE ROUTINE PLAJPLNSAT TO GET THE POSITIONS OF ALL BODIES
Package Description 47
C OF THE SYSTEM
C
CALL PLAJPLNSAT(T,2,PVAS)
C
C PVAS NOW STORES THE POSITION OF ALL THE BODIES IN THE SYSTEM
C
C
C STORING THE CURRENT POSITION AS AN INITIAL GUESS OF THE INTEGRATION
C
DO I=1,6
XMOONI(I)=PVAS(I, MOON)
END DO
C
C PARAMETERS FOR RK78
C
TOLRK=1.D-13
HMIN=1.D-4
HMAX=1.D0
H=1.D-1
C
C INTEGRATIONS FOR 60 DAYS (2 REVOLUTION PERIODS APPROX)
C
TFINAL=T+60.D0
C
C FILE FOR STORING THE OUTPUT
C
CALL GETLUN(IUNIT)
NCD=IUNIT
ARXOUT=’output.dat’
C
C START OF THE INTEGRATIONS
C
OPEN (NCD,FILE=ARXOUT)
WRITE (NCD,100) T,(XMOONI(I),I=1,6)
48 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
C
C WRITING OUTPUT OF RK78 TO FILE
C
CLOSE(NCD)
RETURN
END
Tests and Examples 49
Chapter 4
4.1 Introduction
After the package was implemented it is important to test different aspects of the
programs to verify the integrity and robustness of the package. The purpose of this
chapter is to elaborate these tests. The chapter also elaborates some examples that
demonstrate the capability of the package by performing integrations in some vector
fields.
4.2.1 PLAJPLNSAT
The routine PLAJPLNSAT has to be checked to ensure that the output from ephemeris
are correct. To ensure this we will employ the numerical differentiation elaborated in
the Section 3.5.5. The steps followed are as follows,
1. A sample body was selected. Value of the three components of its velocity
was then calculated numerically differentiating the positions obtained from the
ephemeris as per Equation (4.1). The ∆t was taken to be 1.15740741 × 10−8 days
which is equal to 0.01s. Similarly, the process can be followed to obtain numerical
values of accelerations by differentiating velocities obtained from the ephemeris
and over-accelerations can be obtained by numerically differentiating the accel-
erations obtained from the ephemeris.
p x (T + ∆t) − p x (T − ∆t)
vx = (4.1)
2∆t
where p x (T ) represents the position of the body at time T.
2. The routine PLAJPLNSAT was called with IPVA equal to ‘4’ for both time T + ∆t
and T − ∆t. This will make the routine return positions, velocities, accelerations,
and over-accelerations for both the times.
4. The process was repeated for T starting from ‘100’ days to ‘1350’ days with steps
of ‘50’ days for three different bodies.
Over
Body ∆t (Days) Velocities Accelerations
-Accelerations
Mean of Mean of Mean of
1.15740741×
Jupiter Components: Components: Components:
10−1
6.74474× 10−6 8.48638 × 10−3 1.81640 × 10−2
Standard Standard Standard
Deviation of Deviation of Deviation of
Components: Components: Components:
2.30361 × 10−5 1.61496 × 10−2 0.14703
Velocities and
Mean of Mean of Mean of
Accelerations:
Io Components: Components: Components:
1.15740741×
8.15694× 10−6 8.44216 × 10−6 9.48154 × 10−2
10−8
Over Standard Standard Standard
-Accelerations: Deviation of Deviation of Deviation of
1.15740741× Components: Components: Components:
10−1 9.49089 × 10−6 1.41249 × 10−2 0.45644
Velocities and Mean of Mean of Mean of
Mars Accelerations: Components: Components: Components:
6.09534× 10−6 6.81394× 10−6 3.50977 × 10−7 9.89109 × 10−3
Over Standard Standard Standard
-Accelerations: Deviation of Deviation of Deviation of
1.15740741× Components: Components: Components:
10−1 5.37963 × 10−6 6.63660 × 10−6 2.48941 × 10−2
4.2.2 TRANS
The routine TRANS was tested to ensure that that the output of this routine is robust
as this routine is used by a lot of other parts of the package. The steps to test were as
follows:
1. Three different bodies were selected. The RTBP system was selected as Jupiter-
Io system. The three bodies were Jupiter, Io, and Earth.
3. The adimensional coordinates were then transformed back to equatorial and rel-
ative error was calculated.
The result of the test are shown in Table 4.2. The code used is in the file ‘/main/examples
/TEST-JPLTOADIM/main.f ’.
Tests and Examples 51
4.2.3 TRANSIBC
The idea of testing this routine is that a set of coordinates are transformed from one
reference system to several others and finally they are transformed back to the initial
reference frame. The reference systems used are shown in Figure 4.1.
The transformation was carried on the date ‘110’. The states of Venus with respect to
the Solar System barycenter at this date were stored and transformed into the refer-
52 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
ence frames given in Figure 4.1. The results are shown in Table 4.3. The code used
is in the file ‘/main/examples/TEST-TRANSIBC/main test.f ’.
Over-
Body Positions Velocities Accelerations Accelera-
-tions
x=−2.08106 x=−6.96743 x=−3.46464
x=0.00000
×10−15 ×10−16 ×10−13
y=7.67402 × y=−3.58038 × y=1.28933 ×
Venus y=0.00000
10−14 10−14 10−14
z=7.58649 × z=9.10535 × z=−1.47874 ×
z=0.00000
10−15 10−15 10−13
x=−2.31526 × x=3.60894 × x=−1.84372 × x=−1.45090 ×
10−16 10−16 10−16 10−16
y=−7.17070 × y=−1.40284 × y=1.14290 ×
Io y=0.00000
10−16 10−16 10−16
z=−2.96177 × z=1.64900 ×
z=0.00000 z=0.00000
10−16 10−16
4.3 Integrations
4.3.1 VFSSB
This section shows the results of the tests of the routine VFSSB and displays results
of integration with respect to the Solar System barycenter. The steps followed are as
follows:
1. An initial set of coordinates are chosen for the initial date ‘0’.
2. The coordinates are transformed into equatorial coordinates if they are adimen-
sional.
Tests and Examples 53
x = −1.011267857487360811
y = 0.00
z = 9.069633331713512900 × 10−4
v x = 0.00
vy = 9.073734203283341515×10−3
vz = 0.00
4. The output of the routine is obtained and stored. Output is also converted into
adimensional coordinates to see the orbit in adimensional synodical reference
frame.
The tests were made for two different cases. The first test was done with a set of
adimensional coordinates in Sun-Earth+Moon system shown in Table 4.4 as the initial
coordinates. For this case the integrations were performed for 145.33 days (2.5 in
adimensional time). The results are shown in Figure H.1 in equatorial coordinates and
Figure H.2 in adimensional coordinates.
The second test was in the Sun-Mars system. The coordinates of Phobos on date
‘0’ were used as the initial point. The integrations were performed for 1.09 days (0.01
in adimensional time) and the results are shown in Figure H.3 and in Figure H.4 in adi-
mensional coordinates. The code used can be found in the file ‘/main/examples/TEST-
VFSSB/main vfssb.f’.
4.3.2 VFIBC
The tests for the routine VFIBC follow steps that are exactly similar to those of VFSSB,
the only difference being that the coordinates are now with respect to a frame of ref-
erence which has its origin in a body other than the solar system barycenter. Again,
the tests were carried out for two cases. The coordinates used for testing were trans-
formed into the relevant reference frame before integrations. The first test was done
with a set of adimensional coordinates in Sun-Earth+Moon system shown in Table 4.4
with a reference frame centred in Uranus. The integrations were carried for 145.33
days. The results are shown in Figure H.5 in equatorial coordinates and in Figure H.6
in adimensional coordinates.
The second case was again the coordinates of Phobos transformed into a reference
frame centred in Europa. The integrations were carried on for 5.46 days (0.05 in adi-
mensional time) and the results are shown in Figure H.7 in equatorial coordinates and
54 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
in Figure H.8 in adimensional coordinates. The code used can be found in the file
‘/main/examples/TEST-VFIBC/main vfibc.f’.
The aim of this test was to make sure that the integrations being performed in two
different reference frames lead to the same result. The steps performed are as follows:
2. This point is transformed to a reference frame with respect to some other body
in the solar system with the help of the routine TRANSIBC.
3. The integrations are then performed in both the reference frame till the same final
time.
4. The final point of the second reference frame (the one centred in some body) is
transformed back to the solar system barycentric reference frame.
Tests and Examples 55
The test was performed for three different reference frames centred in Sun, Venus,
and Jupiter. Integrations were performed for 145.33 days and the results are shown
in Table 4.5. The initial set of coordinates were the same as given in Table 4.4. As
can be seen from the results the relative errors are very small and thus it can be
concluded that the routines agree with each other. The code used can be found in the
file ‘/main/examples/TEST-INTIBC/main vfibc vfssb.f’.
The test of variational equations are based on the concept elaborated in Section 2.2.
An initial set of coordinates are chosen as those shown in Table 4.4. Another set of
coordinates which differ from the initial condition by a vector ∆ is also chosen. The
initial matrix M is initialised as an identity matrix. Then the vector field is integrated for
both the initial conditions till a pre-decided time. The final coordinates obtained after
the integrations must satisfy the Equation (2.3).
4.4.1 VFSSB
The tests were performed for two different initial conditions; one in the Sun-Earth+Moon
system and one in Sun-Mars system. The perturbation (in equatorial coordinates) con-
sidered was given by the vector,
The results are shown in Table H.1. Integrations were performed for 143.33 days in
the Sun-Earth+Moon system and for 2.18 days in Sun-Mars system. The code used
can be found in the folder ‘/main/examples/TEST-VARIATIONAL/main variational.f’.
4.4.2 VFIBC
The tests were performed for two different reference frames; one centred in the Mer-
cury and one centred in Sun. Integrations were performed for 143.33 days in both
the cases. The perturbation (in equatorial coordinates) considered was given by the
vector,
∆ = (0.1 × 10−4 , 0.1 × 10−6 , 0.2 × 10−3 , 0.3 × 10−4 , 0.4 × 10−2 , 0.1 × 10−2 )T (4.3)
The results are shown in Table H.2. The code used can be found in the folder ‘/main/exa
mples/TEST-VARIATIONALIBC/main variational.f’.
Applications 57
Chapter 5
APPLICATIONS
One of the applications of the package is to compute the coefficients of the Lagrangian
and Hamiltonian form of the restricted n-body problem in adimensional synodic refer-
ence frame and to implement the quasi periodic models of the solar system. What
is important to note is that the coefficients derived in Sections 1.6, 1.7, and 1.8 are
functions of time. This dependency on the time can be used to see their variation with
time and these coefficients tend to be quasi periodic.
Fourier Analysis of these coefficients was intended to be a part of this thesis but was
later abandoned for fixing the package as some problems were encountered with the
older version. Nevertheless, routines for computations of the coefficients were de-
signed. These routines have been described in the next section.
This section lists the description of routines that can be used for computation of coeffi-
cients of Lagrangian, Hamiltonian, and the quasi periodic formulation of the restricted
n-body problem in adimensional synodic reference frame.
SUBROUTINE COEFFLAGRANGIAN(P1,P2)
This routine initialises the value of fifteen different coefficients required for the compu-
tation of the value of Lagrangian for restricted n-body problem in adimensional synodic
reference frame. The routine uses the equations as specified in the Section 1.6. This
routine uses the routine CALCPARAMRTBP to calculate various parameters required
for the computation of the coefficients. The coefficients are returned in this array. A
call to the routine looks like,
If, for example, we need the coefficient a5 then we can access it at the array index ‘5’
i.e. at COEFFA(5). It is an internal routine and is used by a lot of other routines.
SUBROUTINE LAGRANGIANRTBP(P1,P2,P3,P4)
2. REAL*8 P2(6): Input containing position and velocity (in adimensional coordi-
nates) of the point where Lagrangian has to be computed
This routine computes the value of Lagrangian for restricted n-body problem in adi-
mensional synodic reference frame. The routine uses the equations as specified in
the Section 1.6. This routine calls the routine COEFFLAGRANGIAN to calculated var-
ious coefficients required for the computation of the coefficients. A call to the routine
looks like,
In this example, the routine will return the value of the Lagrangian at the position and
velocity mentioned in the array X. The output will be stored in the variable LGN. As the
variable N is unused we supplied a random value ‘0’ to it. The reason for having this
unused variable is that this preserves the form similar to the routine VFSSB.
SUBROUTINE COEFFHAMILTONIAN(P1,P2)
This routine initialises the value of fifteen different coefficients required for the compu-
tation of the value of Hamiltonian for restricted n-body problem in adimensional synodic
reference frame. The routine uses the equations as specified in the Section 1.7. This
routine uses the routine COEFFLAGRANGIAN to calculate various Lagrangian coef-
ficients required for the computation of the Hamiltonian coefficients.
If, for example, we need the coefficient b5 then we can access it at the array index ‘5’
i.e. at COEFFB(5)
SUBROUTINE HAMILTONIANRTBP(P1,P2,P3,P4)
2. REAL*8 P2(6): A vector of length 6 containing position and momentum (in adi-
mensional coordinates) of the point where Hamiltonian has to be computed,
4. REAL*8 P4: An empty REAL variable to hold the value of the Hamiltonian
Applications 59
This routine computes the value of Hamiltonian for restricted n-body problem in adi-
mensional synodic reference frame. The routine uses the equations as specified in the
Section 1.7. This routine calls the routine COEFFHAMILTONIAN to calculated various
coefficients required for the computation of the Hamiltonian. A call to the routine looks
like,
CALL HAMILTONIANRTBP(1000.D0, X, 0, HMT)
In this example, the routine will return the value of the Hamiltonian at the position and
velocity mentioned in the array X. The output will be stored in the variable HMT.
SUBROUTINE COEFFQUASI(P1,P2,P3)
1. REAL*8 P1: The time in equatorial J2000 reference frame
2. REAL*8 P2(13): An empty array of length ‘13’ (for 13 coefficients) to hold the
output.
3. REAL*8 P3(13): An empty array of length ‘13’ (for 13 derivatives of the coeffi-
cients)
This routine initialises the value of thirteen different coefficients required for the com-
putation of the quasi periodic equations discussed in Section 1.8. This routine uses the
routine COEFFLAGRANGIAN to calculate generate Lagrangian coefficients required
for the computation of these quasi coefficients. A call to the routine looks like,
CALL COEFFQUASI(T, COEFFC, COEFFCD)
If, for example, we need the coefficient c5 then we can access it at the array index ‘5’
i.e. at COEFFC(5). This routine is internal at this point but it might come in handy for
the user if Fourier analysis is to be performed.
SUBROUTINE CALCOMEGAQUASI(P1,P2,P3,P4)
1. REAL*8 P1: The time in equatorial J2000 reference frame
2. REAL*8 P2(6): Adimensional coordinates in form of a one dimensional array of
length six (3 for position, 3 for velocity)
3. REAL*8 P3: Empty variable to receive the output of the function
4. INTEGER P4: An integer request variable
This routine computes the value of Omega and other values as mentioned in the Sec-
tion 1.8 and Annexure D. It is required by other routines and therefore is an internal
routine. The output of the function depend on the request variable. The following table
lists the request variable and the corresponding output.
0 Ω
∂Ω
1
∂x
∂Ω
2
∂y
∂Ω
3
∂z
∂Ω
4
∂t
∂2 Ω
11
∂x2
∂2 Ω
12
∂x∂y
∂2 Ω
13
∂x∂z
∂2 Ω
14
∂x∂t
∂2 Ω
21
∂y∂x
∂2 Ω
22
∂y2
∂2 Ω
23
∂y∂z
∂2 Ω
24
∂y∂t
∂2 Ω
31
∂z∂x
∂2 Ω
32
∂z∂y
∂2 Ω
33
∂z2
∂2 Ω
34
∂z∂t
Applications 61
SUBROUTINE QUASIHAMILTONIAN(P1,P2,P3,P4)
1. REAL*8 P1: The time in equatorial J2000 reference frame
2. REAL*8 P2(48): Adimensional coordinates in form of a one dimensional array of
length 48 (3 for position, 3 for velocity, rest for variational equations
3. INTEGER P3: Integer variable N specifying whether only the vector field is
needed or the variational equations are needed as well. The variable N can
have two values: ‘6’ means only the vector field are returned, ‘48’ means the
vector field as well as the variational equations are computed and returned.
4. REAL*8 P4: An empty array of length 48 to hold the output of the function
This routine computes the value of quasi-periodic vector field at a given point. An
example of a call to the routine looks like,
CALL QUASIHAMILTONIAN(1000.D0, X, 48, F)
In this example , the routine will compute the value of the variational equations and
the vector fields on the date ‘1000’ based on the positions supplied in array X and will
return the output in the array F.
The routine QUASIHAMILTONIAN gives a quasi-periodic vector field. This vector field
can be integrated in and the routine can also produce variational equations. Both these
aspects of the routines were tested and implemented. The results and procedure are
shown in the following subsection.
5.3.1 Integration
The integrations in this routine were performed with the initial coordinates of Phobos on
the date ‘0’ in the Sun-Mars system. The integrations were performed for 2.18×10−02
days. The results of integrations are shown in the Figure H.9 in equatorial coordinates
and in Figure H.10 in adimensional coordinates. The code used can be found in the
file ‘/main/examples/TEST-INTQUASI/main int quasi.f’.
The results are shown in Table 5.2. The code used can be found in the folder ‘/main/exa
mples/TEST-VARIATIONALQUASI/main variational quasi.f’.
Table 5.2 Maximum Relative Errors for Variational Equations from QUASIHAMILTONIAN
One of the application of this package that we consider for this thesis is the refinement
of libration point orbits in two systems: Jupiter-Europa and Saturn-Titan. This section
will elaborate the generation of the initial guess for orbit refinement, the concept of
parallel shooting, and will finally present the results in the two aforementioned systems.
This section describes trajectory refinement using the concept of parallel shooting. For
numerical computation of orbit in a time period T we first divide this period into N parts
with steps of ∆t. Suppose the state at any point i, of these N points, Qi can be stated
as,
Qi = (ti , xi , yi , zi , ẋi , ẏi , żi )T (5.2)
Now, we define the term φ(Qi ) as the image of the point Qi integrated in a vector field
for the time ∆t. It is easy to see that the point φ(Qi ) must be same as the point Qi+1 .
As an example, we assume that our periodic orbit has been divided into four parts as
shown as in Figure 5.1.
When we integrate these points points for time ∆t then the image of point 1 is 1’,
the image of point 2 is 2’ and so on and so forth. In this example, the point 1’ must be
the same as the point 2’. Now suppose that if φ(Qi ) = Qi+1 for i = 1, 2, . . . , N − 1 then
we obtain our final refined orbit else we need to change the starting positions to fulfil
this condition. This will give us N − 1 non-linear equations, which can be expressed as
[10] [15],
and,
A1
A1
Dφ = .. (5.6)
.
AN−1
The transition matrices, Ai , are 6 by 6 at each step of the method. Thus, we get
(N −1)×6 number of equations and the number of unknowns is N. Since we have more
unknowns that the number of equations, we will not get a solution but a hyperplane of
solutions. Now, from these solutions the solution must be chosen such that the final
orbit is closer to the initial (seed) orbit. The ‘closeness’ will be judged by using a
64 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
The initial guess for parallel shooting routines is obtained by first expanding the equa-
tions of motion and then using the Lidnstedt-Poincaré method to solve these equations.
For the purpose of refinement of libration point orbits we use the restricted three body
model from Equations (1.74), (1.75), and (1.76). We can transform coordinates to li-
bration point coordinate system described in [13]. Thus, the equations of motion of the
restricted three body problem can be expressed as [14] [13],
1
ẍ − 2 ẏ = Ωx (5.7)
γ2
1
ÿ + 2 ẋ = Ωy (5.8)
γ2
1
z̈ = Ωz (5.9)
γ2
To expand the values of Ω x , Ωy , and Ωz we use Legendre Polynomials which are given
as,
1 1
= √
(x − A)2 + (y − B)2 + (z − C)2 A2 + B2 + C 2
p
(5.10)
∞
ρ Ax + By + Cz
X ! !
√ . Pn √
n=0 A2 + B2 + C 2 A2 + B2 + C 2
where,
ρ2 = x2 + y2 + z2 (5.11)
By further calculation, which are out of scope of this thesis, we obtain [14],
∂ X x
ẍ − 2 ẏ − (1 + 2 c2 ) x = cn ρn Pn (5.12)
∂x n≥3 ρ
∂X x
ÿ + 2 ẋ + (c2 − 1) y = cn ρn Pn (5.13)
∂y n≥3 ρ
∂ X x
z̈ + c2 z = cn ρn Pn (5.14)
∂x n≥3 ρ
Here, ρ is given by Equation (5.11) and the coefficients are expressed as [13],
1 (1 − µ) γn+1
!
j
cn = (±1) µ + (−1)
n n
, for L j , j=1,2 (5.15)
γ3 (1 ∓ γ j )n+1
and,
(−1)n µ γ3n+1
!
cn = 1−µ+ , for L3 (5.16)
γ33 (1 + γ3 )n+1
Applications 65
ẍ − 2 ẏ − (1 + 2 c2 ) x = 0 (5.17)
ÿ + 2 ẋ + (c2 − 1) y = 0 (5.18)
z̈ + c2 z = 0 (5.19)
where, v
t q
2 − c2 + 9 c22 − 8 c2
ω0 = (5.23)
2
√
ν0 = c2 (5.24)
− (ω0 + 1 + 2 c2 )
κ= (5.25)
2 ω0
The parameterα is the in plane amplitude, β is the out of plane amplitude, and φ1 and φ2
are the phases. Now when we add the non linear terms in the Equations (5.12), (5.13),
and (5.14) we have to look for solutions of the form,
∞
X X !
x(t) = xi jkm cos (k θ1 + m θ2 ) αi β j (5.26)
i, j=1 |k|≤i,|m|≤ j
∞
X X !
y(t) = yi jkm sin (k θ1 + m θ2 ) αi β j (5.27)
i, j=1 |k|≤i,|m|≤ j
∞
X X !
z(t) = zi jkm cos (k θ1 + m θ2 ) αi β j (5.28)
i, j=1 |k|≤i,|m|≤ j
where,
θ1 = ω t + φ1 , θ2 = ν t + φ2 (5.29)
∞
X ∞
X
ω= ωi j αi β j , ν = νi j αi β j (5.30)
i, j=0 i, j=0
obtained using program designed as part of the work in Reference [13]. They were
stored in a file and was used in inputs for routine DIBLIS to generate Lissajous orbits.
X
ẍ − 2 ẏ − (1 + 2 c2 ) x = cn+1 (n + 1) T n (5.31)
n≥2
X
ÿ + 2 ẋ + (c2 − 1) y = y cn+1 Rn−1 (5.32)
n≥2
X
z̈ + c2 z = z cn+1 Rn−1 (5.33)
n≥2
where,
x
T n (x, y, z) = ρn Pn (5.34)
ρ
1 ∂T n+1
Rn−1 (x, y, z) = (5.35)
y ∂y
also,
1 ∂T n+1
Rn−1 (x, y, z) = (5.36)
1 ∂z
∂T n+1
= (n + 1) T n (5.37)
∂z
These equations have to be changed to express the equations of halo orbits. We add
a term ∆z to the Equation (5.33), where,
∞
X
∆= di j α i β j (5.38)
i, j=0
The coefficient di j has to be computed numerically and iteratively. Thus, Equation (5.33)
can be re-written as,
X
z̈ + c2 z = z cn+1 Rn−1 + ∆ z (5.39)
n≥2
The term ∆z lets us force the out-of-plane frequency to be the same as the in-plane
one (as it must be for a periodic orbit). But then to keep the equation in the initial
form ∆ = 0 is required, so, in fact, Equation (5.38) represents a constraint between the
amplitudes α and β. The starting solution for the Lindstedt-Poincaré for the Halo orbit
can be used as Equations (5.17), (5.18), and,
z̈ + c2 z = d00 z (5.40)
Applications 67
where,
The parameter κ is the same as given by Equation (5.25), φ is the phase, and ω0 is
given as,
v
t q
9 c22 − 8 c2
ω0 = 2 − c2 + (5.45)
2
∞
X X !
x(t) = x(i j k) cos (k θ) αi β j (5.46)
i, j=1 |k|≤i+ j
X ∞ X !
y(t) = y(i j k) sin (k θ) αi β j (5.47)
i, j=1 |k|≤i+ j
X ∞ X !
z(t) = z(i j k) cos (k θ) αi β j (5.48)
i, j=1 |k|≤i+ j
As with the case of Lissajous orbits, the Lindstedt-Poincaré methodology provides the
computations of the coefficients xi jk , yi jk , zi jk , ωi j , and di j . These coefficients were again
obtained using program designed as part of the work in Reference [13] and were stored
in a file. This file was used as input for routine DIBHAL to generate Halo orbits.
DIBHAL
This routine that can be used to generate halo Orbit in Jupiter-Europa orbit around
L2. It is located in the folder ‘/parallelshooting/orbit − generators/halo/’. The user can
produce the sample orbit by first going to the directory and compiling the routine using
the ‘./make.csh’ script and then executing the executable file produced. The output is
written in a file named ‘rtbp-orbit.dat’ and is stored in the same directory. It is important
to note that the orbit is in adimensional RTBP reference frame with respect to the solar
system barycenter.
The output of this routine can be copied to the folder ‘/parallelshooting/’ and can be
68 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
DIBLIS
The routine that can be used to generate Lissajous Orbit in Saturn-Titan System about
L2. It is located in the folder ‘/parallelshooting/orbit − generators/liss/’. The user can
produce the orbit by first entering this directory and compiling the routine using the
‘./make.csh’ script and then executing the executable file produced. The output is stored
in a file named ‘rtbp-orbit.dat’ and is stored in the same directory. Again, it is impor-
tant to note that the orbit is in adimensional RTBP reference frame with respect to
the solar system barycenter. The output of this routine can be copied to the folder
‘/parallelshooting/’ and can be used as input to the routine CHANGECOORINDATES.
The parallel shooting package has been provided with the program designed as a part
of this thesis. The directory structure of the program has been shown in Figure 3.1.
The directory ‘/parallelshooting/orbit−generators/’ contains code to generate two differ-
ent orbits; one halo and one Lissajous. The root directory ‘/parallelshooting/’ contains
important routines which have been described in the following subsections.
This routine is the primary routine that can be used to perform parallel shooting and
refinement of orbits. TIRP performs integrations with respect to the solar system
barycenter whereas TIRP IBC performs integrations with respect to any body in the
solar system. It requires the output file produced by the routine CHANGECOORDI-
NATES as an input. The seed orbit can be in any type of coordinates such as the
equatorial, adimensional, or the coordinates in Lagrangian reference system defined
in Reference [13]. This routine will ask user for the input file and other parameters like
the coordinate reference frame of the output and the time step in terms of days required
for the integrations. The output is stored in the file name ‘/parallelshooting/dibx.dat’ in
terms of seven columns: one column for time, six columns for the components of the
positions (three positions and three velocities). It is important to note that if the user
wants to perform parallel shooting using TIRP IBC then the file ‘/parallelshooting/tirp
ibc. f ’ must be edited to point to initialise the particular IBC value. Particularly, the user
must look for line label 999 and change it. The line is a call to the routine NMODJPL.
CHANGECOORDINATES
This routine takes an input of a seed orbit in the RTBP adimensional reference frame
and generates the input for the parallel shooting routine TIRP and TIRP IBC. The in-
put file must have seven columns each containing the time, and six components of the
state (three positions, three velocities) for the nodes of the seed orbit . The routine
asks the user for the details of the input for example, the name of the file, the RTBP
system that the coordinates are referred to and the origin of the original equatorial ref-
erence frame. It also provides an option to the user to transform the reference frame
to equatorial reference frame or to change to a reference frame situated in some other
Applications 69
body in the solar system. After taking these inputs from the user it produces the output
file named ‘./output change.dat’ which has to be used as an input to the routine TIRP
or TIRP IBC depending on the reference frame.
To use the routine the user must execute the script called ‘./make change.csh’ and this
will generate an executable ‘./make-change.exe’. It is important to note that the stan-
dard length of the input file for this routine has been specified as ‘101’ in this routine.
Thus, if the number of nodes for the input file is different from this, the user must open
the file ‘./changecoordinates.f ’ and change the value of the parameter FILELENGTH
to the length of the input file. The user must then re-compile the routine.
70 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
Figure 5.2 Variation of Axis for Iterations of Parallel Shooting in Jupiter-Europa System
(a) X axis
(b) Y axis
(c) Z axis
The first example was using parallel shooting to refine a halo orbit around the L2
(Lagrangian) point in the Jupiter-Europa system. The calculations were performed
with respect to the solar system barycenter in the restricted three body adimensional
reference frame. Thus the routine TIRP was used for parallel shooting which in turn
uses the routine VFSSB. The iterations of the parallel shooting is shown in Figure 5.4.
Also, the variation of X, Y, and Z axis with adimensional time for different iterations is
Applications 71
shown in Figure 5.2. In both the figures the iterations are mostly overlapping.
Figure 5.3 Variation of Axis for Iterations of Parallel Shooting in Saturn-Titan System
(c) Z axis
CONCLUSION
This chapter presents the principal achievements of this master’s thesis. During the
thesis a stable package was developed which has the ability to:
3. perform numerical integrations to obtain orbits in the solar system w.r.t. the solar
system barycenter and any other inertial body centred frame. Also, it has ability
to perform numerical integrations in the quasi-periodic semi-analytical RTBP like
formulation of the restricted n-body problem.
4. return the values of State Transition Matrix using the variational equations. This
can be used to observe the change in orbits due to perturbations in three do-
mains: orbits w.r.t. solar system barycenter, w.r.t. any inertial body centred
frame, and in the quasi-periodic formulation of the restricted n-body problem.
5. perform trajectory refinement of Halo and Lissajous orbits using parallel shooting.
If the user can generate seed orbits for other systems, then this program can
perform parallel shooting in those domains as well.
6. compute the coefficients and values of the Lagrangian and Hamiltonian formula-
tion of restricted n-body problem
Some of the steps that can be performed as future work following this thesis:
3. Complete implementation of the gravity model can be performed. The idea has
been presented in this thesis but it has not been implemented yet. Once imple-
mented it can provide immense flexibility to the user to control the gravitational
model in real-time.
BIBLIOGRAPHY
Appendix A
A.1 Introduction
The aim of this chapter is to provide a basic introduction to Lagrangian and Hamilto-
nian Mechanics. Classical Mechanics is very important for applications into trajectory
prediction. This chapter will elaborate the concept of Lagrangian and the Hamiltonian
and will derive the equations of the same.
This section will present the concept of generalised coordinates. Use of generalised
coordinates make the expression of Lagrangian easy to formulate. Suppose we have
a set of 3n Cartesian coordinates in a three dimensional space. Let us assume that
we have a set of 3n generalised coordinates such that all the Cartesian coordinates
can be expressed in terms of these generalised coordinates and time. Thus any co-
ordinate in the Cartesian system can be expressed as a function of time and these
generalised coordinates as,
Vice-versa, it goes that all the generalised coordinates will be a function of the Carte-
sian coordinates. Therefore,
q~j = q j (~
r1 , r~2 , r~3 . . . , r~3n , t) (A.2)
Now, we can focus what happens if there is a change in one of the Cartesian coordi-
nates. Suppose the generalised coordinates are changed by a small amount δq j then
the change in the Cartesian coordinates (represented here forth as xk ) will be,
X ∂xk
δxk = δq j (A.3)
j
∂q j
Similarly, for any change in the Cartesian coordinates, the change in the generalised
coordinates is given by,
X ∂q j
δq j = δxk (A.4)
k
∂xk
It is important to point out that the change produced due to any change in time coordi-
nate has been considered to be zero.
80 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
∂U(x) X U(xk (q j )) ∂q j X ∂q j
Fk = − =− =− Qj (A.5)
∂xk j
∂q j xk j
∂xk
X ∂xk
Qj = Fk (A.6)
k
∂q j
L=T −U (A.7)
where, T is the kinetic energy of the system and U is the potential energy is the system.
Let’s consider a system given in Cartesian coordinates as,
m ẍi = Fi (A.8)
1
T= m ẋ2 (A.9)
2
and the potential energy is given by,
U = −F x (A.10)
∂T
pi = (A.11)
∂ ẋi
and, the Force F can be calculated by differentiating Equation (A.10) with respect to xi
∂U
F=− (A.12)
∂xi
Now, we will try to use Lagrangian equations to elaborate their usefulness. Differenti-
ating Equation (A.7) with respect to ẋi and then with respect to t we get,
d ∂L d ∂T d ∂U
= − (A.13)
dt ∂ ẋi dt ∂ ẋi dt ∂ ẋi
Putting the value of pi from Equation (A.11) and since force is the rate of change of
momentum with time we obtain,
Lagrangian and Hamiltonian Mechanics 81
d ∂L d ∂U
= Fi − (A.14)
dt ∂ ẋi dt ∂ ẋi
Now differentiating Equation (A.7) with respect to xi we get,
∂L ∂T ∂U
= − (A.15)
∂xi ∂xi ∂xi
In this equation if we use the value from Equation (A.12) we get,
∂L ∂T
= + Fi (A.16)
∂xi ∂xi
Subtracting Equation (A.14) from Equation (A.16) we obtain,
d ∂L ∂L d ∂U ∂T
− =− − (A.17)
dt ∂ ẋi ∂xi dt ∂ ẋi ∂xi
As can be seen from Equation (A.10), U is not a function of ẋi . Thus the derivative
of U with respect of ẋi will be zero. Also, from Equation (A.9), T is not a function of
xi . Thus its derivative with respect to xi will be zero too. Thus, the right hand side of
Equation (A.17) will be zero. Finally we obtain,
d ∂L ∂L
− =0 (A.18)
dt ∂ ẋi ∂xi
The importance of Lagrangian stems from the fact that once Lagrangian has been
made, Equation (A.18) can be used to express the system just based on one of the
variables.
The Lagrangian can also be expressed in terms of generalised coordinates and then
the Lagrangian will be a function of the generalised coordinates i.e. L(q, q̇, t). Then,
Equation (A.18) can be written as [11],
d ∂L ∂L
− =0 (A.19)
dt ∂q̇ j ∂qi
∂L
Pj = (A.20)
∂q̇ j
d ∂L ∂T ∂U
Pj = = − (A.21)
dt ∂q j ∂q j ∂q j
82 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
To see the variation of the Lagrangian with time we differentiate L with time t,
dL X ∂L dq j X ∂L dq̇ j ∂L
= + + (A.22)
dt j
∂q j dt j
∂q̇ j dt ∂t
dL d X ∂L ∂L
= q̇ j + (A.23)
dt dt j
∂q̇ j ∂t
Using the definition of generalised momentum from Equation (A.20) we can re-write
the definition of Hamiltonian as,
X
H(q, q̇, t) = q̇ j P j − L (A.25)
j
dH ∂L
=− (A.26)
dt ∂t
If the Lagrangian does not depend on time, then Hamiltonian is also conserved.
∂H ∂H ∂H ∂L
q̇ j = , Ṗ J = − , =− (A.29)
∂P j ∂q j ∂t ∂t
Variational Equations: N Body Problem 83
Appendix B
The aim of this chapter is to formulate the various equations required by Section 2.6.1
for the variational equations. From equation (1.39) we know,
n
X G m j r~i j
r~¨i =
j=1, j,i
ri3j
where,
r~i j = xi j î + yi j ĵ + zi j k̂
and,
xi j = x j − xi (B.1)
∂(r~¨i ) x n
3 xi2j 1
X " #
= G mj − (B.5)
∂xi j=1, j,i
ri5j ri3j
∂(r~¨i ) x n
X 3 G m j xi j yi j
= (B.6)
∂yi j=1, j,i
ri5j
∂(r~¨i ) x n
X 3 G m j xi j zi j
= (B.7)
∂zi j=1, j,i
ri5j
∂(r~¨i )y ∂(r~¨i ) x
= (B.8)
∂xi ∂yi
∂(r~¨i )y n " 2
3 yi j 1
X #
= G mj − (B.9)
∂yi j=1, j,i
ri5j ri3j
84 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
∂(r~¨i )y n
X 3 G m j y i j zi j
= (B.10)
∂zi j=1, j,i
ri5j
∂(r~¨i )z ∂(r~¨i ) x
= (B.11)
∂xi ∂zi
∂(r~¨i )z ∂(r~¨i )y
= (B.12)
∂yi ∂zi
∂(r~¨i )z n " 2
3 zi j 1
X #
= G mj − (B.13)
∂zi j=1, j,i
ri5j ri3j
∂(r~¨i ) x n
x˙j 3 xi j (xi j x˙j + yi j y˙j + zi j z˙j )
X " #
= G mj − (B.14)
∂t j=1, j,i
ri3j ri5j
∂(r~¨i )y n
y˙j 3 yi j (xi j x˙j + yi j y˙j + zi j z˙j )
X " #
= G mj − (B.15)
∂t j=1, j,i
ri3j ri5j
∂(r~¨i )y n
z˙j 3 zi j (xi j x˙j + yi j y˙j + zi j z˙j )
X " #
= G mj − (B.16)
∂t j=1, j,i
ri3j ri5j
where,
∂(r~¨i ) x
∂t
∂(r~¨ )
Vt = i y (B.18)
∂t
∂(r~¨i )z
∂t
and,
X16 X22 · · · X46
X˙13 X˙19 · · · X˙43
X17 X23 · · · X47
X˙14 X˙20 · · · X˙44
X18 X24 · · · X48
=
.. .. .. .. (B.19)
. . . . f1 f4 · · · f16
· · · f17
X˙18 X˙24 · · · X˙48 f2 f5
f3 f6 · · · f18
where,
Appendix C
C.1 Introduction
The aim of this chapter is to formulate the various equations required by Section 2.6.2
for the variational equations. From equation (1.45) we know,
G m j r~i n
r~ik r~k
X " #
r~¨i = − + G mj −
ri3 k=1,k,i, j
rik3 rk3
r~i = xi î + yi ĵ + zi k̂ (C.1)
r~ik = xik î + yik ĵ + zik k̂ (C.2)
r~k = xk î + yk ĵ + zk k̂ (C.3)
where,
xik = xk − xi (C.4)
yik = yk − yi (C.5)
zik = zk − zi (C.6)
G m j x~i n
x~ik x~k
X " #
(r~¨i ) x = − + G mj − (C.7)
ri3 k=1,k,i, j
rik3 rk3
G m j y~i n
y~ik y~k
X " #
(r~¨i )y = − + G mj − (C.8)
ri3 k=1,k,i, j
rik3 rk3
G m j z~i n
z~ik z~k
X " #
(r~¨i )z = − + G mj − (C.9)
ri3 k=1,k,i, j
rik3 rk3
∂(r~¨i ) x 1 3 xi2 n
3 xik2 1
" # X " #
= −G m j − + G mj − (C.10)
∂xi ri3 ri5 k=1,k,i, j
rik5 rik3
∂(r~¨i ) x 1 3 xi yi n
3 xik yik
" # X " #
= G mj − + G mj (C.11)
∂yi 3
ri ri5 k=1,k,i, j
rik5
88 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
∂(r~¨i ) x 1 3 xi zi n
3 xik zik
" # X " #
= G mj − + G mj (C.12)
∂zi ri3 ri5 k=1,k,i, j
rik5
∂(r~¨i )y ∂(r~¨i ) x
= (C.13)
∂xi ∂yi
∂(r~¨i )y 1 3 y2i n
3 y2ik 1
" # X " #
= −G m j − + G mj − (C.14)
∂yi ri3 ri5 k=1,k,i, j
rik5 rik3
∂(r~¨i )y 1 3 yi zi n
3 yik zik
" # X " #
= G mj − + G mj (C.15)
∂zi ri3
ri5 k=1,k,i, j
rik5
∂(r~¨i )z ∂(r~¨i ) x
= (C.16)
∂xi ∂zi
∂(r~¨i )z ∂(r~¨i )y
= (C.17)
∂yi ∂zi
∂(r~¨i )z 2 n " 2
1 3zi 3 zik 1
" # X #
= −G m j 3 − 5 + G mj − 3 (C.18)
∂zi ri ri k=1,k,i, j
rik5 rik
∂(r~¨i ) x n
xik (xik x˙k + yik y˙k + zik z˙k )
X "
= 3 G mj −
∂t k=1,k,i, j
rik5
(C.19)
xk (xk x˙k + yk y˙k + zk z˙k )
#
+
rk5
∂(r~¨i )y n
yik (xik x˙k + yik y˙k + zik z˙k )
X "
= 3 G mj −
∂t k=1,k,i, j
rik5
(C.20)
yk (xk x˙k + yk y˙k + zk z˙k )
#
+
rk5
Variational Equations: N-Body w.r.t. a Body in Solar System 89
∂(r~¨i )z n
zik (xik x˙k + yik y˙k + zik z˙k )
X "
= 3 G mj −
∂t k=1,k,i, j
rik5
(C.21)
zk (xk x˙k + yk y˙k + zk z˙k )
#
+
rk5
The variational matrix has been explained in Section 2.6.2. The variational equations
are exactly similar to those in Section B.1.
Variational Equations: Quasi Periodic Formulation of N-Body Problem 91
Appendix D
This chapter formulates the Variational equations for Quasi-Periodic formulation of the
restricted n-body problem. From Equations (1.141) to (1.143) we have,
∂Ω
~r¨ x = c1 + c4 ẋ + c5 ẏ + c7 x + c8 y + c9 z + c13 (D.1)
∂x
∂Ω
~r¨y = c2 − c5 ẋ + c4 ẏ + c8 x + c10 y + c11 z + c12 (D.2)
∂y
∂Ω
~r¨z = c3 − c6 ẏ + c4 ż + c9 x − c11 y + c12 z + c13 (D.3)
∂z
Differentiating Equation (D.1) with respect to x, y, z, ẋ, ẏ, and ż we obtain,
∂~r¨ x
= c7 + c13 Ω xx (D.4)
∂x
∂~r¨ x
= c8 + c13 Ω xy (D.5)
∂y
∂~r¨ x
= c9 + c13 Ω xz (D.6)
∂z
∂~r¨ x
= c4 (D.7)
∂ ẋ
∂~r¨ x
= c5 (D.8)
∂ẏ
∂~r¨ x
=0 (D.9)
∂ż
Furthermore, differentiating Equation (D.2) with respect to x, y, z, ẋ, ẏ, and ż we obtain,
∂~r¨y
= −c8 + c13 Ωyx (D.10)
∂x
∂~r¨y
= c10 + c13 Ωyy (D.11)
∂y
∂~r¨y
= c11 + c13 Ωyz (D.12)
∂z
∂~r¨y
= −c5 (D.13)
∂ ẋ
92 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
∂~r¨y
= c4 (D.14)
∂ẏ
∂~r¨y
= c6 (D.15)
∂ż
Also, differentiating Equation (D.3) with respect to x, y, z, ẋ, ẏ, and ż we obtain,
∂~r¨z
= c9 + c13 Ωzx (D.16)
∂x
∂~r¨z
= −c11 + c13 Ωzy (D.17)
∂y
∂~r¨z
= c12 + c13 Ωzz (D.18)
∂z
∂~r¨z
=0 (D.19)
∂ ẋ
∂~r¨z
= −c6 (D.20)
∂ẏ
∂~r¨z
= c4 (D.21)
∂ż
Further, differentiating Equations (D.1) to (D.3) with respect to t we get,
∂~r¨ x
= c˙1 + c˙4 ẋ + c˙5 ẏ + c˙7 x + c˙8 y + c˙9 z + c˙13 Ω x + c13 Ω xt (D.22)
∂t
∂~r¨y
= c˙2 − c˙5 ẏ + c˙4 ẏ + c˙6 ż − c˙8 x + c˙10 y + c˙11 z + c˙13 Ωy + c13 Ωyt (D.23)
∂t
∂~r¨z
= c˙3 − c˙6 ẏ + c˙4 ż + c˙9 x − c˙11 y + c˙12 z + c˙13 Ωz + c13 Ωzt (D.24)
∂t
For the equations above we require the differential of the coefficients of the quasi-
periodic formulation of the restricted three body problem. Differentiating Equations (1.147)
to (1.159) with respect to time we obtain,
...
~¨ ~¨ ˙ ~ . C1 )
( B . C1 ) k̇ − k ( B . C1 + B
c˙1 = (D.25)
k2 ...
(B~¨ . C2 ) k̇ − k ( B
~¨ . C˙2 + B~ . C2 )
c˙2 = (D.26)
k2 ...
(B~¨ . C3 ) k̇ − k ( B
~¨ . C˙3 + B~ . C3 )
c˙3 = (D.27)
k2
k̇2 k̈
!
c˙4 = 2 2 − (D.28)
k k
c˙5 = 2 (C˙1 . C˙2 + C¨1 . C2 ) (D.29)
c˙6 = 2 (C2 . C3 + C2 . C3 )
˙ ˙ ¨ (D.30)
Variational Equations: Quasi Periodic Formulation of N-Body Problem 93
...
k k − k̈k̇
!
c˙7 = 2 (C˙1 . C¨1 ) − (D.31)
k2
k̈k − k̇2 k̇ ...
!
c˙8 = 2 (C ˙1 . C2 ) + 2 (C˙1 . C˙2 + C¨1 . C2 ) + C¨1 . C˙2 + C1 . C2 (D.32)
k2 k
c˙9 = C˙1 . C¨3 + C¨1 . C˙3 (D.33)
...
k k − k̈k̇
c˙10 = 2 (C˙2 . C¨2 ) − (D.34)
k2
k̈k − k̇2 k̇ ...
!
c˙11 = 2 2
(C˙2 . C3 ) + 2 (C˙2 . C˙3 + C¨2 . C3 ) + C¨2 . C˙3 + C2 . C3 (D.35)
k k
...
k k − k̇k̈
!
c˙12 = 2 (C˙3 . C¨3 ) + (D.36)
k2
3 a3 k̇
c˙13 = − (D.37)
k2
... ... ...
The computation of C 1 , C 2 , and C 3 are shown in Appendix E.
1−µ µ
Ω(x, y, z) = p + p
(x − µ)2 + y2 + z2 (x − µ + 1)2 + y2 + z2
X µA
+
A(S ,E,M,P...P ),A,m ,m
||~r − r~A ||
k 1 2
∂Ω
" −3/2 # "
= −(1 − µ) (x − µ) + y + z
2 2 2
(x − µ) − µ (x − µ + 1)2 + y2
∂x
−3/2 # X "
+z 2
(x − µ + 1) − µA (x − xA )2 + (y − yA )2 (D.38)
A(S ,E,M,P...,Pk ),A,m1 ,m2
−3/2 #
+(z − zA ) 2
(x − xA )
∂Ω
" −3/2 # " −3/2 #
= −(1 − µ) (x − µ) + y + z
2 2 2
y − µ (x − µ + 1) + y + z
2 2 2
y
∂y
X " −3/2 # (D.39)
− µA (x − xA ) + (y − yA ) + (z − zA )
2 2 2
(y − yA )
A(S ,E,M,P...,Pk ),A,m1 ,m2
∂Ω
" −3/2 # " −3/2 #
= −(1 − µ) (x − µ) + y + z
2 2 2
z − µ (x − µ + 1) + y + z
2 2 2
z
∂z
X " −3/2 # (D.40)
− µA (x − xA ) + (y − yA ) + (z − zA )
2 2 2
(z − zA )
A(S ,E,M,P...,Pk ),A,m1 ,m2
∂2 Ω
" −3/2 −5/2 #
= −(1 − µ) (x − µ) + y + z
2 2 2
− 3 (x − µ) + y + z
2 2 2
(x − µ) 2
∂2 x2
" −3/2 −5/2 #
−µ (x − µ + 1) + y + z
2 2 2
− 3 (x − µ + 1) + y + z
2 2 2
(x − µ) 2
and,
∂2 Ω
" −5/2 # " −5/2
= 3 (1 − µ) y (x − µ) + y + z
2 2 2
[x − µ] + 3 µ y (x − µ + 1)2 + y2 + z2
∂x∂y
# X " −5/2
(x − µ + 1) + 3 µA (x − xA )2 + (y − yA )2 + (z − zA )2
A(S ,E,M,P...,Pk ),A,m1 ,m2
#
(y − yA )(x − xA )
(D.42)
and,
∂2 Ω
" −5/2 # " −5/2
= 3 (1 − µ) z (x − µ) + y + z
2 2 2
(x − µ) + 3 µ z (x − µ + 1)2 + y2 + z2
∂x∂z
# X " −5/2
(x − µ + 1) + 3 µA (x − xA )2 + (y − yA )2 + (z − zA )2
A(S ,E,M,P...,Pk ),A,m1 ,m2
#
(z − zA ) (x − xA )
(D.43)
∂2 Ω
" −3/2 #
= −(1 − µ) (x − µ) + y + z
2 2 2
− 3 (x − µ) + y + z ] y
2 2 2 −5/2 2
∂2 y2
" −3/2 −5/2 #
−µ (x − µ + 1) + y + z
2 2 2
− 3 (x − µ + 1) + y + z
2 2 2
y2
X " −3/2 (D.44)
− µA (x − xA )2 + (y − yA )2 + (z − zA )2 − 3 (x − xA )2 +
A(S ,E,M,P...,Pk ),A,m1 ,m2
−5/2 #
(y − yA ) + (z − zA )
2 2
(y − yA ) 2
∂2 Ω ∂2 Ω
= (D.45)
∂x∂x ∂y∂x
∂2 Ω
" −5/2 " −5/2 #
= 3 (1 − µ) z (x − µ) + y + z
2 2 2
y + 3 µ z (x − µ + 1) + y + z
2 2 2
y
∂y∂z
X " −5/2
+3 µA (x − xA )2 + (y − yA )2 + (z − zA )2 (D.46)
A(S ,E,M,P...,Pk ),A,m1 ,m2
#
(z − zA ) (y − yA )
∂2 Ω ∂2 Ω
= (D.47)
∂z∂x ∂x∂z
∂2 Ω ∂2 Ω
= (D.48)
∂z∂y ∂y∂z
∂2 Ω
" −3/2 −5/2 #
= −(1 − µ) (x − µ) + y + z
2 2 2
− 3 (x − µ) + y + z
2 2 2
z2
∂2 z2
" −3/2 −5/2 #
−µ (x − µ + 1) + y + z
2 2 2
− 3 (x − µ + 1) + y + z
2 2 2
z2
X " −3/2 (D.49)
− µA (x − xA )2 + (y − yA )2 + (z − zA )2 − 3 [x − xA )2
A(S ,E,M,P...,Pk ),A,m1 ,m2
−5/2 #
+(y − yA ) + (z − zA )
2 2
(z − zA )2
To find the dependence of time we need to differentiate Equation (D.38) with respect
to t. Doing this we get,
96 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
∂2 Ω X −3/2
= µA (x − xA )2 + (y − yA )2 + (z − zA )2 ẋA
∂x∂t A(S ,E,M,P...,Pk ),A,m1 ,m2
" −5/2
−3 (x − xA ) (x − xA )2 + (y − yA )2 + (z − zA )2 (x − xA ) x˙A (D.50)
#
+(y − yA ) y˙A + (z − zA ) z˙A
∂2 Ω X −3/2
= µA (x − xA )2 + (y − yA )2 + (z − zA )2 ẏA
∂y∂t A(S ,E,M,P...,Pk ),A,m1 ,m2
" −5/2
−3 (y − yA ) (x − xA )2 + (y − yA )2 + (z − zA )2 (x − xA ) x˙A (D.51)
#
+(y − yA ) y˙A + (z − zA ) z˙A
∂2 Ω X −3/2
= µA (x − xA )2 + (y − yA )2 + (z − zA )2 żA
∂z∂t A(S ,E,M,P...,Pk ),A,m1 ,m2
" −5/2
−3(z − zA ) (x − xA )2 + (y − yA )2 + (z − zA )2 (x − xA ) x˙A (D.52)
#
+(y − yA ) y˙A + (z − zA ) z˙A
X˙10
X˙11
Ẋ7
X˙12
Ẋ8
∂~r¨ x ∂~r¨ x ∂~r¨ x ∂~r¨ x ∂~r¨ x ∂~r¨ x 0
Ẋ9
= X7 + X8 + X9 + X10 + X11 + X12
+ 0
∂x ∂y ∂z ∂ ẋ ∂ẏ ∂ż (D.53)
X˙10
0
∂~r¨y ∂~r¨y ∂~r¨y ∂~r¨y ∂~r¨y ∂~r¨y
X˙11
X7 + X8 + X9 + X10 + X11 +
X12 Vt
∂x ∂y ∂z ∂ ẋ ∂ẏ ∂ż
X˙12
∂~r¨z ∂~r¨z ∂~r¨z ∂~r¨z ∂~r¨z ∂~r¨z
X7 + X8 + X9 + X10 + X11 +
X12
∂x ∂y ∂z ∂ ẋ ∂ẏ ∂ż
Variational Equations: Quasi Periodic Formulation of N-Body Problem 97
where,
∂~r¨ x
∂t
∂~r¨y
Vt = (D.54)
∂t
∂~r¨z
∂t
and,
where,
Appendix E
The aim of this chapter is to present the values of the third derivative of the matrix C
from Equation (1.10) with respect to time. The matrix C”’ will be given by,
C 000 = C1000 C2000 C3000 (E.1)
Here, C1000 can be obtained by differentiating Equation (1.33) with respect to t. It can be
expressed as,
00 000 0 00 0
k0 R~21 − R~21 k k2 k00 R~21 + k2 k0 R~21 − 2 k k0 2 R~21
!
C1000 = +2
k2 k4
(E.2)
k00 k − 2 k 02 !
k000 k00 (4 k0 + 3) 6 k02
!
0
+R~21 + R~21 − −
k ||R~21 ||22 k2 k3 k4
C3000 can be obtained by differentiating Equation (1.34) with respect to time. It can be
expressed as,
C3000 = e~f 0 − 2 ( C30 . C300 ) + C3 . e~F 0 + C30 . e~F C3 + C30 . C30 + C3 .e~F C3 (E.3)
where, e~F is given by Equation (1.36). Also, e~F 0 can be obtained by Equation (1.36)
with respect to time as,
1
"
0 000 0 000 0000
e0F = 0 R~21 × R~21 + R~21 × R~21 + R~21 × R~21
||R~21 × R~21 ||2
0 00 000 #
−2 RL (C1 × C1 ) + (R~21 × R~21 + R~21 × R~21 ) RL
0 00
(E.4)
1
"
00 0 00 000
− 0 C3 . (R~21 × R~21 ) R~21 × R~21 + R~21 × R~21
||R~21 × R~21 ||2
#
00
~ ~
−2 RL (R21 × R21 )
00
C3 . (R~21 × R~21 )
RL = 0 (E.5)
||R~21 × R~21 ||2
100 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
Differentiating this equation with respect to time we can get R0L as,
1
"
0 00 000
R0L = 0 C3 . (R~21 × R~21 + R~21 × R~21 )
||R~21 × R~21 ||2 (E.6)
#
00
+C30 . (R~21 × R~21 ) − R2L
In these equations k000 can be obtained by differentiating Equation (1.37) with respect
to time as,
3 ( R~21 00 . R~21 0 − k0 k00 ) + R~21 . R~21 000
k000 = (E.7)
k
C2000 can be obtained by differentiating Equation (1.35) with respect to time as,
Appendix F
MODELEPH.DAT FILE
’../../ephemerides/’
1 1 DE406s 0 !Mercury barycenter DE406s
2 1 DE406s 3 !Venus barycenter
3 1 DE406s 2 !Earth barycenter !Take the Earth respect SSB
4 1 DE406s 0 !Mars barycenter
5 1 DE406s 1 !Jupiter barycenter
6 1 DE406s 0 !Saturn barycenter
7 1 DE406s 0 !Uranus barycenter
8 1 DE406s 0 !Neptune barycenter
9 1 DE406s 0 !Pluto barycenter
301 1 DE406s !Moon
10 1 DE406s !Sun
199 1 DE406s !Mercury
299 1 DE406s !Venus
399 1 DE406s !Earth
499 0 DE406s !Mars
401 0 MAR085 !Phobos MAR085
402 0 MAR085 !Deimos
499 1 MAR085 !Mars
501 1 JUP230L !Io JUP230L
502 1 JUP230L !Europa
503 0 JUP230L !Ganymede
504 0 JUP230L !Callisto
505 0 JUP230L !Amalthea
514 0 JUP230L !Thebe
599 1 JUP230L !Jupiter
601 0 SAT317 !Mimas SAT317
602 0 SAT317 !Enceladus
603 0 SAT317 !Tethys
604 0 SAT317 !Dione
605 0 SAT317 !Rhea
606 1 SAT317 !Titan
607 0 SAT317 !Hyperion
608 0 SAT317 !Iapetus
609 0 SAT317 !Phoebe
612 0 SAT317 !Helene
613 0 SAT317 !Telesto
614 0 SAT317 !Calypso
632 0 SAT317 !Methon
699 1 SAT317 !Saturn
701 0 URA083 !Ariel URA083
102 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
Appendix G
This chapter lists the bodies in the JPL Ephemeris that will be used in this thesis.
G.1 Sun
Body Identifier
Sun 10
Solar System Barycenter 0
Body Identifier
Mercury Barycenter 1
Mercury 199
Body Identifier
Venus Barycenter 2
Venus 299
104 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
Body Identifier
Earth Barycenter 3
Moon 301
Earth 399
Body Identifier
Mars Barycenter 4
Phobos 401
Deimos 402
Mars 499
Body Identifier
Jupiter Barycenter 5
Io 501
Europa 502
Ganymede 503
Callisto 504
Amalthea 505
Thebe 514
Jupiter 599
Bodies in JPL Ephemeris DE406 105
Body Identifier
Saturn Barycenter 6
Mimas 601
Enceladus 602
Tethys 603
Dione 604
Rhea 605
Titan 606
Hyperion 607
Iapetus 608
Phoebe 609
Helene 612
Telesto 613
Calypso 614
Methon 632
Saturn 699
Body Identifier
Uranus Barycenter 7
Ariel 701
Umbriel 702
Titania 703
Oberon 704
Miranda 705
Uranus 799
106 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
Body Identifier
Neptune Barycenter 8
Triton 801
Nereid 802
Proteus 808
Neptune 899
Body Identifier
Pluto Barycenter 9
Charon 901
Nix 902
Hydra 903
Pluto 999
Test Results 107
Appendix H
TEST RESULTS
This chapter presents the results of integrations and variational equations using the
VFSSB and VFIBC performed in Chapter 4.
H.1 Integrations
H.1.1 VFSSB
Figure H.3 Results of Integration using VFSSB for Phobos: Equatorial Coordinates
110 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
Figure H.4 Results of Integration using VFSSB for Phobos: Adimensional Coordinates
Test Results 111
H.1.2 VFIBC
Figure H.7 VFIBC: Integrations in Equatorial Coordinates for Phobos w.r.t. Europa
114 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
Figure H.8 VFIBC: Integrations Adimensional in Coordinates for Phobos w.r.t. Europa
Test Results 115
H.1.3 QUASIHAMILTONIAN
H.2.1 VFSSB
Table H.1 Maximum Relative Errors for Variational Equations from VFSSB
H.2.2 VFIBC
Table H.2 Maximum Relative Errors for Variational Equations from VFIBC
Appendix I
I.1 Introduction
This chapter describes the new changes to the package, most importantly the grav-
ity model. Some important changes include the introduction of some new common
variables and addition of some new routines to the package.
One of the most important changes made to the package was change in common
variable GRAVLIST. Section 3.4.2 describes this variable to have length of 9. Now, in
the new version, it has a length of IMAX(i.e. total number of bodies: 53) and has two
columns. The first column will be exactly same as the common variable LIST. It will,
thus, contain all the bodies selected by the user. The second column will hold either a
‘1’ or a ‘0’. If the value is ‘1’ the body will be counted in the perturbations in equations
of motions otherwise it will not.
Gravity model has been completely implemented in the package. When the pertur-
bations of bodies are to be counted in the equations of motion, the vector fields call
the routine RETURNBODYSTATUS to get the gravity status of the body to consider
whether it must be used in the equations of motion or not.
As shown in Table 3.2 user can select the options for the barycentres. After the user
selects the gravity model in the file ‘./modeleph.dat’ and executes the routine NMOD-
JPL , the values to the common variable GRAVLIST are assigned by the routine AS-
SIGNGRAVITYSTATUS. It is important to note that some situations do exist in which
this routine will ignore the user selected gravity model. This has to explained clearly to
the user.
Firstly, the contributions of the secondary and primary must always be counted. Now,
suppose if the secondary is a barycentre then the contributions of the planet and satel-
lites in that system must be turned off. For example, if ICO is 5, then, the contribution
of the Jupiter barycentre must be counted as a whole and the contribution of Jupiter
and all its satellites must be ignored. This is to prevent the contributions to be counted
twice. Similarly, if the secondary is a planet, its barycentre has to be turned off. For
example, if ICO is 599, then Jupiter will be turned on by default and all its selected
120 Development of Models for the Equations of Motion in the Solar System: Implementations and Applications
satellites will be counted based on the gravity model. The Jupiter barycentre in this
example will be turned off, no matter what value the user selects in the gravity model.
1. INTEGER P1: ID of the barycentre for which the model has to changed.
This routine can be used by the user to change the gravity model in real time. This
routine performs numerous checks to make sure that the gravity model remains robust.
The user can use this anytime during the execution of the program.
1. INTEGER P1: ID of the body which has to be the centre of the reference frame
This routine basically assigns a new value to the common variable IBC. This routine is
present so that the user does not have to worry about common variables.