1 Introduction

Modern orbitography software such as the French space agency Géodésie par Intégrations Numériques Simultanées GINS (Marty 2013) or NASA’s Mission Analysis, Operations, and Navigation Toolkit Environment MONTE (Evans et al. 2018) describe the motion of interplanetary spacecraft and near-Earth satellites using Newton’s theory of gravity supplemented with the so-called Einstein–Infeld–Hoffmann equations of motion (Einstein et al. 1938; Soffel and Han 2019). The dynamical equations of motion characterising spacecraft orbits are given in terms of gravitational and non-gravitational perturbations, denoted, respectively, \(f_{G}\) and \(f_{NG}\), which are linearly superimposed as small corrections to Newton’s universal law of gravitation. Classically, non-gravitational forces are derived analytically using simplified ideal physical models, for example, the so-called cannonball model, and are the main source of error in the orbit determination process (Vallado 2001). Examples of several gravitational and non-gravitational perturbations, and their respective orders of magnitude can be found in (Pireaux et al. 2006,  Table 1), and the reader is further referred to (Vallado 2001,  Chapter 9) for a detailed discussion on classical perturbation techniques.

Due to the complexity involved in accurately determining spacecraft orbits, the system of equations considered by modern orbitography software require advanced numerical procedures. There exists a multitude of open-source and commercial software suites (Hughes et al. 2014; Vallado et al. 2006; Evans et al. 2018) designed to determine spacecraft ephemerides subject to a surfeit of physical and dynamical configurations. Although many platforms differ in their initial formulation (special and general perturbation approaches (Vallado et al. 2006), semi-analytical techniques, etc.), we may mathematically formulate the problem as follows. The approximate position of spacecraft subject to gravitational and non-gravitational perturbations is determined through numerical integration of the first coordinate-time derivative of the spatial and velocity components, denoted \(x^i = (x^1, x^2, x^3)\) and \(v^i = (v^1, v^2, v^3)\), respectively, given by the initial value problem

$$\begin{aligned} \begin{aligned} \frac{\text {d} x^i}{\text {d}t}&= v^i, \quad x^i \left( t_0\right) = x^i_0, \\ \frac{\text {d} v^i}{\text {d}t}&= f^i_{G} + f^i_{NG}, \quad v^i \left( t_0\right) = v^i_0, \end{aligned} \end{aligned}$$
(1)

where we denote the initial position and velocity of the spacecraft at a given initial epoch \(t_0\) by \(x^i\left( t_0\right) = x^i_0\) and \(v^i\left( t_0\right) = v^i_0\). We note that the aforementioned time parameter is absolute and universal in the framework of Newtonian mechanics. The expressions \(f^i_G\) and \(f^i_{NG}\) are introduced for brevity and denote the i-th component of the individual gravitational and non-gravitational perturbations which are given explicitly by

$$\begin{aligned} f^i_G \equiv -\sum _{j=1}^n \left( \partial _i U \right) _j, \quad f^i_{NG} \equiv \sum _{k=1}^n \left( f^i_{NG} \right) _k, \end{aligned}$$
(2)

where the spatial gradient operator is given by \(\partial _i \equiv \partial /\partial x^i\), the Newtonian gravitational potential is given by U and the subscripts jk denote the j-th gravitational and k-th non-gravitational perturbation, respectively.

Owing to the increased accuracy requirements in fields such as astrometry (Soffel and Han 2019), geodesy (Müller et al. 2008; Soffel and Langhans 2012), the rapid improvements in time and frequency stability (Exertier et al. 2019), and further, the development and utilisation of advanced telecommunication systems for radio tracking of interplanetary probes, we require that Einstein’s general theory of relativity (d’Inverno 1992; Weinberg 1972) be taken into account for any mission requiring highly accurate orbit information and practically all astronomical and geodynamical observations (Brumberg et al. 1998). Within the Solar System, the so-called effects of general relativity are accounted for using the first post-Newtonian (PN) approximation (Soffel and Han 2019) and we refer the reader to the seminal papers Damour et al. (1991, 1992b, 1993, 1994) for extensive technical details.

The PN framework is a slow-motion, weak-field approximation to the Einstein field equations of gravitation and is a formal expansion of the metric tensor components in powers of order \(O(c^{-2})\), where c denotes the isotropic speed of light in vacuum. For an Earth-orbiting satellite, the typical relativistic effects considered by modern orbitography software are the contributions due to the Schwarzschild field of the Earth, and the DeSitter and Lense-Thirring effects (Misner et al. 1973). As an example, consider the Earth-orbiting Laser Geodynamics Satellite LAGEOS.Footnote 1 With respect to the aforementioned relativistic contributions, the additional perturbing effect of the Schwarzschild field is largest in magnitude, causing a decrease in semi-major axis by \(4.4 \text {mm}\) and a perigee advance of approximately \(9 \text {mas/day}\). The magnitude of the Lense-Thirring and DeSitter effects is considerably smaller and amount to a precession of the longitude of the ascending node by approximately 85 and \(53 \mu \text {as}/\text {day}\), respectively, with a further precession of the argument of perigee caused by the Lense-Thirring effect of the order \(31.6 \text {mas}/\text {year}\) (Hugentobler 2010; Combrinck 2012). The magnitude of the DeSitter and Lense-Thirring effects as predicted by the general theory of relativity was experimentally verified by the Gravity Probe B mission using IM Pegasi as a guide star where the reader is referred to Everitt et al. (2011) for further details.

The general relativistic corrections to Newton’s law of gravitation, denoted \(f_{GR}\), are derived analytically (to first PN order) and added linearly to Eq. (1)\(_b\). Hence, the complete system of equations of motion typically considered by modern orbitography software are given by

$$\begin{aligned} \frac{\text {d} v^i}{\text {d}t} = f^i_{G} + f_{GR}^i + f^i_{NG}. \end{aligned}$$
(3)

Again, we remind the reader, the expression \(f_{GR}\) is introduced for brevity and denotes the sum of the individual relativistic perturbations under consideration. The recommended analytical form for the general relativistic correction to Newton’s law of gravitation \(f_{GR}\) is maintained and published by the International Earth Rotation and Reference Systems Services (IERS) in a series of technical notes.Footnote 2 For the interested reader, derivations of the PN equations of motion can be readily found in the extensive literature (see, for example Damour et al. (1994); Brumberg (2004); Soffel (1989); Huang et al. (1990)). Although we may observe the correct dynamical contributions due to the general theory of relativity by numerically integrating (3), care must be taken. The naive process of linearly adding \(f_{GR}\) to Eq. (1) in order to account for the so-called relativistic effects introduces a Newton-esque, or, what is more commonly referred to in the literature, a neo-Newtonian interpretation of the general theory of relativity (Damour et al. 1991). As discussed by many authors previously (Damour et al. 1991; Damour 1987; Damour et al. 1992a; Soffel 2000), the aforementioned reduction of general relativity to the framework of Newtonian theory can lead to the derivation of erroneous equations of motion and the apparent appearance of illusory defects in material bodies (Damour 1987).

A further source of confusion may be linked to the recommendations of the International Astronomical Union (IAU) (Soffel et al. 2003), which, through a series of resolutions, suggest that all problems in the field of astronomy or astrodynamics be formulated within the framework of Einstein’s general theory of relativity. Specifically, this relates to the derivation of all dynamical equation of motion including those which model the propagation of electromagnetic waves in curved spacetime, the definition of reference frames and the corresponding four-dimensional spacetime transformations connecting them. In order for the IAU resolutions to be sufficiently reflected in the so-called “Newton \(+\) correction” framework would not only require additional corrections to standard Newtonian quantities, but would further require that we abolish the classical notion of absolute time resulting in an additional hybrid Newton–Einstein theory of celestial mechanics. Considering the aforementioned shortcomings of the “Newton \(+\) correction” approach, and the confusion arising in adopting the recommended IAU resolutions in a Newton-dominated theory, we believe the current approach is now reaching its limits in terms of complexity.

In this paper, we discuss the formulation of a new prototype orbitography software titled General Relativistic Accelerometer-based Propagation Environment (GRAPE), formally extending the proposed work of Pireaux et al. (2006). We suggest a novel technique for the propagation of interplanetary probes and near-Earth spacecraft using the full framework of general relativity by accounting for the spatial components of non-gravitational forces using either end-user supplied data from on-board accelerometers (Lenoir et al. 2011; Touboul et al. 1999) or specific force models with adjustable parameters. Accelerometer-based orbit determination has been successfully exploited by the geodesy community for a number of geopotential recovery missions (see, for example Kang et al. (2006); Van Helleputte and Visser (2008)), where the dynamical models used to approximately account for the non-gravitational perturbations \(f_{NG}\) are replaced with accelerometer data obtained in the local frame of the spacecraft. Hence, errors introduced by simplified dynamical models, omitted second-order perturbations and unaccounted anomalous forces are automatically included at the order of the measurement sensitivity of the on-board accelerometer.

General relativity provides our currently accepted theory of gravitation. Within the framework of general relativity, quantities constructed from the metric tensor components \(g_{\mu \nu }\) such as Christoffel symbols, curvature scalars and the Ricci, Riemann and Einstein tensors encode the geometry of spacetime which we associate with classical gravitational phenomenon. GRAPE assumes the local structure of spacetime is unperturbed by non-gravitational forces, and all associated gravitational effects are contained within the choice of spacetime metric. Consequently, the general relativistic analogue of the first two terms on the right-hand side of Eq. (3) is accounted for by a suitable choice of metric \(g_{\mu \nu }\). Further, we note the spacecraft equations of motion are always accompanied by a quadratic invariant quantity unique to general relativity; offering an opportunity to exploit sophisticated structure-preserving numerical integration techniques irrespective of whether non-gravitational perturbations are being considered (Hairer et al. 2006). Again, we note such an opportunity to exploit structure-preserving integration schemes is not readily available in classical Newtonian theory and is unique to the general theory of relativity which arises due to the orthogonality of four-velocity and acceleration. GRAPE employs a \(5\text {-stage}\), \(10^\text {th}\) order symplectic implicit Runge–Kutta scheme (Butcher 1964) to maintain the constancy of the quadratic invariant providing a consistent accuracy check over the considered numerical propagation arc. Additionally, given that the magnitude of the non-gravitational perturbations is measured in the local frame of the spacecraft, GRAPE utilises the so-called tetrad formalism (Weinberg 1972), introducing at each point in spacetime, a locally Minkowski frame, which we associate with the local frame of the spacecraft (up to a Lorentz boost), allowing for convenient transformations, which relate the dynamical quantities dynamical quantities between local and global frames (Brumberg 2017).

The paper is organised as follows: in Sect. 2, we provide an overview of the mathematics employed by the GRAPE orbitography software. We derive the equations of motion for near-Earth objects and interplanetary probes subject to non-gravitational perturbations and discuss the associated quadratic invariant for spacecraft whose wordline is parameterised by proper time \(\tau \). Further, we present a brief overview of the tetrad formalism and discuss a novel method to determine the magnitude of the global force components obtained using both Lorentz and tetrad transformations which does not appear to have been previously discussed in the literature. In Sects. 3 and 4, we derive the general relativistic extension of the classical accelerometer equation using a modified geodesic deviation approach (Pireaux et al. 2006) and give an overview of the structure-preserving symplectic numerical integration scheme implemented in GRAPE, respectively. In Sect. 5, we provide a specific illustrative example of the GRAPE tool and consider the perturbed motion of the NASA Parker Solar Probe (Fox et al. 2016), Mercury Planetary Orbiter (Novara 2002) and Molniya-like spacecraft (Daquin et al. 2021). Additionally, we show the conservation of the quadratic invariant in the local frame of each spacecraft whose motion is perturbed by a constant radiation-like non-gravitational force.

Unless otherwise stated, throughout the remainder of the manuscript we assume the Einstein summation convention for repeated indices, and the use of Latin indices \((i,j = 1,2,3)\) is reserved for spatial coordinates while Greek indices \((\alpha , \beta = 0,1,2,3)\) denote spacetime coordinates with the \(0^\text {th}\) coordinate being reserved for time so that \(x^\alpha = \left( ct, x^i \right) \). Finally, we assume a spacetime metric signature according to \(\left( +,-,-,-\right) \).

2 GRAPE: mathematical preliminaries

The worldline of a time-like test particle is described by the spacetime coordinates \(x^\alpha \left( \lambda \right) \), where \(\lambda \) is an arbitrary affine parameter. For a massive time-like particle, such as an interplanetary probe or near-Earth satellite, a common parameterisation of the spacecraft worldline is achieved using the proper time \(\tau \) (Poisson and Will 2014). However, spacecraft operators track satellites, interplanetary probes, large debris objects and planets with reference to an external coordinate time such as terrestrial, universal, ephemeris or barycentric times (see Vallado (2001) for further time scales and definitions). Hence, for operational purposes, it is convenient to modify the parameterisation and adopt a global coordinate time \(t_e = x^0/c\) common to all spacecraft instead of \(\tau \) as the integration variable. Each parameterisation offers different insight for perturbed spacecraft motion in the framework of general relativity. Accordingly, GRAPE numerically solves both systems of equations of motion and determines spacecraft orbits with respect to both proper time \(\tau \) and Solar System ephemeris time \(t_e\). We note for the purpose of the present paper, we define ephemeris time as the time read by a clock at spatial infinity, void of gravitational effects, and draw the readers attention to (Soffel and Han 2019,  Chapter 8) for formal operational details.

2.1 On the nature of non-gravitational forces in general relativity

Studies on the motion of near-Earth spacecraft and interplanetary probes subject to non-gravitational forces are ubiquitous in the literature and remain an active area of research for modern operational astrodynamics and celestial mechanics (Vallado 2001). However, the same treatment cannot be said for the general theory of relativity where the practical incorporation of non-gravitational forces for near-Earth objects remains somewhat elusive and requires elucidation. The approach adopted by GRAPE follows from the work of Lichnerowicz and Teichmann (1955); Burcev (1962); Charon (1963) which extend the standard geodesic equation of motion to include non-gravitational forces. While the extended equations of motion derived by Lichnerowicz and Teichmann (1955); Burcev (1962); Charon (1963) appear to have important practical implications for applied general relativity, the utility of their results appears to have gone largely unnoticed in the community which we re-derive herein.

Classical dynamical quantities associated with continuous matter distributions such as stresses and mass, energy and flux densities are coalesced into a single unified object in the general theory of relativity known as the energy momentum tensor \(T^{\alpha \beta }\) (Kopeikin 2007). To account for non-gravitational forces in the framework of general relativity, we decompose the energy-momentum tensor as follows

$$\begin{aligned} T^{\alpha \beta } = \varTheta ^{\alpha \beta } + {\mathcal {S}}^{\alpha \beta }, \end{aligned}$$
(4)

where we define the stress tensor according to \(S^{\alpha \beta }\) and we interpret \(\varTheta ^{\alpha \beta }\) as the energy-momentum of an isolated test particle or system of non-interacting test particles defined in terms of mass density \(\rho \) and test particle four-velocity \(u^\alpha \) according to \(\varTheta ^{\alpha \beta } \equiv \rho u^\alpha u^\beta \).

It is well established that the conservation equation

$$\begin{aligned} \nabla _{\alpha } T^{\alpha \beta } = 0, \end{aligned}$$
(5)

gives rise to the geodesic equation of motion in the absence of stresses \(({\mathcal {S}}^{\alpha \beta } \equiv 0)\). In the case where \({\mathcal {S}}^{\alpha \beta } \ne 0\), we find

$$\begin{aligned} \nabla _\alpha \varTheta ^{\alpha \beta } = \rho {\mathcal {K}}^\beta , \end{aligned}$$
(6)

where we have introduced the force density \({\mathcal {K}}^\beta \) associated with an arbitrary non-gravitational force \(f^\beta \) and we have \(\nabla _\alpha {\mathcal {S}}^{\alpha \beta } = - \rho {\mathcal {K}}^\beta \). Eq. (6) is equivalently expressed as

$$\begin{aligned} \rho u^\alpha \nabla _{\alpha } u^\beta + u^\beta \nabla _{\alpha }\left( \rho u^\alpha \right) = \rho {\mathcal {K}}^\beta , \end{aligned}$$
(7)

where the second term on the left hand side of Eq. (7) is a continuity-like equation which is defined in terms of the force density according to

$$\begin{aligned} u^\beta \nabla _{\alpha } \left( \rho u^\alpha \right) = \rho {\mathcal {K}}_\alpha u^\alpha u^\beta /c^2. \end{aligned}$$
(8)

Thus, the complete system of equations of motion describing the perturbed motion of spacecraft subject to an external perturbation \(f^\alpha \) employed in GRAPE are given by

$$\begin{aligned} f^\alpha \equiv u^\beta \nabla _{\beta } u^\alpha = {\mathcal {K}}_{\beta }\left( g^{\alpha \beta } - u^\alpha u^\beta /c^2\right) , \end{aligned}$$
(9)

where it is clear for \({\mathcal {K}}^\beta = 0\), Eq. (9) reduces to the equation of geodesic motion

$$\begin{aligned} \frac{\text {d}^2 x^\alpha }{\text {d}\tau ^2} = -\varGamma ^\alpha _{\beta \gamma }u^\beta u^\gamma , \end{aligned}$$
(10)

and we introduce the Christoffel symbols of the second kind according to \(\varGamma ^{\alpha }_{\beta \gamma } \equiv g^{\alpha \delta }\left( \partial _{\beta }g_{\gamma \delta } + \partial _{\gamma }g_{\delta \beta } - \partial _\delta g_{\beta \gamma } \right) /2\).

Following several applications of the chain rule so that

$$\begin{aligned} \frac{d x^\alpha }{dt_e} = \frac{d x^\alpha }{d\tau } \left( \frac{dt_e}{d\tau } \right) ^{-1}, \quad \frac{d^2x^\alpha }{dt_e^2} =\left( \frac{dt_e}{d\tau } \right) ^{-2} \left[ \frac{d^2 x^\alpha }{d\tau ^2} - \frac{d^2 t_e}{d\tau ^2} \left( \frac{dx^\alpha }{dt_e} \right) \right] , \qquad \end{aligned}$$
(11)

and using (9) in expressions (11), it can be readily shown that the perturbed equations of motion with respect to ephemeris time are given by

$$\begin{aligned} \frac{d^2 x^\alpha }{dt_e^2} = \left( \frac{\varGamma ^0_{\beta \gamma }}{c} \frac{dx^\alpha }{dt_{e}} - \varGamma ^{\alpha }_{\beta \gamma } \right) \frac{d x^\beta }{dt_{e}}\frac{dx^\gamma }{dt_{e}} - \left( \frac{f^0}{c} \frac{dx^\alpha }{dt_e} - f^\alpha \right) \left( \frac{d \tau }{dt_e} \right) ^2, \end{aligned}$$
(12)

where it is clear that the temporal component of (12) is identically zero. Hence, when integrated with respect to ephemeris time, the motion of spacecraft depends only on the spatial coordinates \(x^i\) and Eq. (12) may be equivalently expressed as

$$\begin{aligned} \begin{aligned} \frac{1}{c^2}\frac{d^2 x^i}{dt_e^2}&= -\varGamma ^{i}_{00} - 2\varGamma ^i_{0k} \beta ^k - \varGamma ^i_{jk} \beta ^j \beta ^k + \varGamma ^0_{00} \beta ^i + 2\varGamma ^0_{0k}\beta ^i\beta ^k \\&\quad +\varGamma ^0_{jk}\beta ^i\beta ^j\beta ^k - \frac{1}{c^2}\left( f^0 \beta ^i - f^i \right) \left( \frac{d\tau }{dt_e} \right) ^2, \end{aligned} \end{aligned}$$
(13)

where we have introduced the dimensionless quantity \(\beta ^i \equiv v^i/c\) and the contravariant components of the coordinate velocity are given by \(v^i = dx^i/dt_e\). We remind the reader that \(f^\alpha \) is defined according to Eq. (9). In addition, we make the observation that in the Newtonian limit of Eq. (13), we recover Newton’s universal law of gravitation perturbed by an arbitrary non-gravitational force \(f^i\).

Finally, it is interesting to note for an arbitrary non-affine parameter such as the proper time of an external Solar System probe or celestial body \(\sigma \), the resulting equations of motion are implicitly defined according to

$$\begin{aligned} \begin{aligned} \frac{\text {d}^2 x^\alpha }{\text {d}\sigma ^2} = -\varGamma ^\alpha _{\beta \gamma }\frac{\text {d}x^\beta }{\text {d}\sigma } \frac{\text {d}x^\gamma }{\text {d}\sigma } + \left[ f^\alpha - \frac{\text {d}x^\alpha }{\text {d}\sigma } \frac{\text {d}^2 \sigma }{\text {d}\tau ^2}\right] \left( \frac{\text {d}\tau }{\text {d}\sigma }\right) ^2, \end{aligned} \end{aligned}$$
(14)

where

$$\begin{aligned} \frac{\text {d}\tau }{\text {d}\sigma } = \left[ \frac{1}{c^2} g_{\mu \nu }\frac{\text {d}x^\mu }{\text {d}\sigma }\frac{\text {d}x^\nu }{\text {d}\sigma } \right] ^{1/2}, \end{aligned}$$
(15)

and

$$\begin{aligned} \frac{\text {d}^2 \sigma }{\text {d}\tau ^2} = -\frac{1}{c^2} \frac{\text {d}x^\mu }{\text {d}\sigma } \left[ \frac{1}{2}\frac{\partial g_{\mu \nu }}{\partial x^\alpha } \frac{\text {d}x^\alpha }{\text {d}\sigma } \frac{\text {d}x^\nu }{\text {d}\sigma } + g_{\mu \nu } \frac{\text {d}^2 x^\nu }{\text {d}\sigma ^2}\right] \left( \frac{\text {d}\sigma }{\text {d}\tau }\right) ^4, \end{aligned}$$
(16)

so that Eq. (14) must be solved iteratively.

2.2 General relativistic invariant

We note the explicit expression for the final quantity \(\left( d\tau /dt_e \right) \) arising in the right-hand side of Eq. (13) is determined by the differential relationship between the square of the magnitude of the invariant spacetime line element \(\left( ds\right) ^2\) and proper time namely

$$\begin{aligned} ds^2 \equiv c^2 d\tau ^2 = g_{\mu \nu } dx^\mu dx^\nu , \end{aligned}$$
(17)

and is given explicitly by

$$\begin{aligned} \frac{d\tau }{dt_e} = \left[ \frac{1}{c^2}g_{\mu \nu } \frac{dx^\mu }{dt_e}\frac{dx^\nu }{dt_e} \right] ^{1/2}. \end{aligned}$$
(18)

We further note, the components of the spacecraft four-velocity are equivalently expressed in terms of ephemeris time according to

$$\begin{aligned} u^\alpha = \frac{dt_e}{d\tau } \left( \frac{d x^\alpha }{dt_e}\right) = \frac{dt_e}{d\tau } \left( c,v^i\right) . \end{aligned}$$
(19)

Hence, on substituting Eq. (18) in (19), it can be readily shown that the particle tangent vector to the worldline satisfies the normalisation condition given by (Poisson and Will 2014)

$$\begin{aligned} {\mathcal {I}} \equiv g_{\mu \nu }u^{\mu }u{^\nu } = c^2. \end{aligned}$$
(20)

Equation (20) is an invariant of the motion and is defined implicitly in terms of numerically integrated spacetime coordinates arising in the metric tensor components and explicitly in terms of the spacecraft four-velocity vector (or, coordinate velocity if (19) is used) so that \({\mathcal {I}} \equiv {\mathcal {I}}\left( g_{\mu \nu }\left( x^\alpha \right) , u^\alpha \right) \). Eq. (20) remains valid when the spacecraft is subject to external perturbations and has no Newtonian analogue, giving rise to a unique opportunity for GRAPE to utilise symplectic integration schemes providing an accuracy check over the numerical integration span (see Sect. 4 for further details).

2.3 Tetrad formalism

GRAPE utilises the so-called tetrad formalism in order to relate dynamical quantities between local (known as the natural frame) and global frames. That is, at each point in spacetime, we can construct a pseudo-Cartesian reference system through the introduction of a tetradFootnote 3\(e^\mu _{\left( \nu \right) }\) so that (Brumberg 2017)

$$\begin{aligned} \eta _{\alpha \beta } = g_{\mu \nu } e^\mu _{\left( \alpha \right) } e^\nu _{\left( \beta \right) } , \quad g_{\mu \nu } = e^{\left( \alpha \right) }_\mu e^{\left( \beta \right) }_\nu \eta _{\alpha \beta }, \end{aligned}$$
(21)

where indices are manipulated using the components of the Minkowski metric \(\eta _{\alpha \beta }\) and it is clear for a diagonal metric we have the relations

$$\begin{aligned} e^\mu _{\left( 0 \right) }&= \left( \left( g_{00}\right) ^{-1/2},0,0,0\right) ,&\quad e^\mu _{\left( 1 \right) }&= \left( 0, \left( -g_{11}\right) ^{-1/2},0,0 \right) , \end{aligned}$$
(22)
$$\begin{aligned} e^\mu _{\left( 2 \right) }&= \left( 0,0,\left( -g_{22}\right) ^{-1/2},0\right) ,&\quad e^\mu _{\left( 3 \right) }&= \left( 0, 0,0, \left( -g_{33}\right) ^{-1/2}\right) . \end{aligned}$$
(23)

In the natural tetrad, all dynamical quantities have physical meaning, so that for example, the expressions

$$\begin{aligned} dx^{\left( 0 \right) } = e^{\left( 0 \right) }_{\mu } dx^\mu , \qquad dx^{\left( i \right) } = e^{\left( i \right) }_{\nu } dx^\nu , \end{aligned}$$
(24)

denote locally measured intervals of time and distance, respectively (Brumberg 2007). From Eqs. (24), it is clear that the transformations relating natural and global four-velocity components are given by the relations

$$\begin{aligned} u^{\left( \sigma \right) } = e^{\left( \sigma \right) }_{\mu }u^\mu , \qquad u^\nu = e^\nu _{\left( \sigma \right) } u^{\left( \sigma \right) }, \end{aligned}$$
(25)

and the corresponding transformations for the non-gravitational forces are given, respectively, by

$$\begin{aligned} \frac{D}{D \tau } u^{\left( \sigma \right) } = \frac{D}{D \tau } \left( e^{\left( \sigma \right) }_{\mu }u^\mu \right) , \qquad \frac{D}{D \tau } u^\nu = \frac{D}{D \tau } \left( e^\nu _{\left( \sigma \right) } u^{\left( \sigma \right) }\right) , \end{aligned}$$
(26)

where we have introduced \(D/D\tau \equiv u^\alpha \nabla _{\alpha }\) and \(\nabla _\alpha \) denotes the covariant derivative operator. Hence, the resulting expressions for the natural and global four-forces are given, respectively, by

$$\begin{aligned} f^{\left( \sigma \right) } = e^{\left( \sigma \right) }_{\mu }f^\mu , \qquad f^\nu = e^\nu _{\left( \sigma \right) } f^{\left( \sigma \right) }, \end{aligned}$$
(27)

where we have used

$$\begin{aligned} \nabla _{\alpha } e_\mu ^{(\sigma )} \equiv 0, \end{aligned}$$
(28)

known as the tetrad postulate (Yepez 2011).

2.4 Non-gravitational force transformations

Finally, we describe the method adopted by GRAPE in order to determine the components of the non-gravitational forces in the global frame. The covariant derivative of Eq. (20) is by definition (Poisson and Will 2014)

$$\begin{aligned} \frac{D {\mathcal {I}}}{d \tau } \equiv g_{\sigma \alpha } u^\alpha \nabla _{\beta }\left( u^\beta u ^\sigma \right) = 0, \end{aligned}$$
(29)

and using (9) simplifies to give the orthogonality constraint

$$\begin{aligned} u_\sigma f^\sigma = 0. \end{aligned}$$
(30)

The spatial components of the external force are measured by on-board accelerometers or modelled by dynamical equations in the local co-moving frame \(\left( L\right) \) of the spacecraft and provided to GRAPE by end-users. We have, by definition, in the rest frame of the spacecraft \(u_L^\alpha = \left( c,0,0,0 \right) \) so that in order to satisfy Eq. (30), we find \(f_L^\alpha = (0,f_L^i)\). Hence, there is no temporal component of the non-gravitational force in the co-moving frame of the spacecraft. At this point, we make the important observation that in the local rest frame of the spacecraft we have \(f_L^\alpha = {\mathcal {K}}_L^\alpha = \left( 0,{\mathcal {K}}_L^i\right) \). Thus, the components of the non-gravitational force density in the natural tetrad are obtained using a Lorentz transformation

$$\begin{aligned} {\mathcal {K}}^{(\alpha )} = \varLambda ^\alpha _{\beta }{\mathcal {K}}_L^\beta , \end{aligned}$$
(31)

where the components of \(\varLambda ^\alpha _{\beta } \left( v^i\right) \) are given by

$$\begin{aligned} \varLambda ^0_0 = \gamma , \quad \varLambda ^0_i = \gamma v_i/c, \quad \varLambda ^i_0 = \gamma v^i/c, \quad \varLambda ^j_i = \delta ^j_i + \left( \gamma - 1\right) v_i v^j/v^2, \end{aligned}$$
(32)

where the Lorentz factor is given by \(\gamma = \text {d}t_e/\text {d}\tau \), the magnitude of the relative frame velocity is given by v and the inverse transformation is given by \(\varLambda ^\beta _\alpha \left( -v^i\right) \). Finally, the global components of the non-gravitational force are obtained using Eqs. (27).

3 General relativistic accelerometer equations

Space-based accelerometer technology or drag-free satellites (Lange 1964) have been successfully utilised in space missions across a number of fields including geodesy (Touboul et al. 1999), planetary science (Lucchesi and Iafolla 2006) and gravitational-wave physics (Rodrigues and Touboul 2003). For near-Earth spacecraft, the analytical models for non-gravitational forces such as solar radiation pressure and atmospheric drag depend on the physical characteristics of individual spacecraft (for example the area-to-mass ratio and solar reflectivity parameters) and its attitude (for example the orientation of solar panels) which give rise to a number of technical issues in modern orbit determination and prediction software. Typically, the parameters associated with non-gravitational forces such as solar radiation and atmospheric drag coefficients (Vallado et al. 2006) are prescribed as solve-for parameters whose value minimises the residuals between measurement and predictions in the orbit determination process (Schutz et al. 2004). For the motion of spacecraft and interplanetary probes about central bodies other than the Earth, the accurate modelling of non-gravitational forces becomes increasingly difficult. In this section, we derive the so-called general relativistic accelerometer equations for spacecraft which are subject to non-gravitational forces and, using a post-Newtonian expansion of the resulting expressions, describe the approach adopted herein to determine the components of \(f^\alpha \).

Consider the perturbed motion of a spacecraft subject to the gravitational field of an arbitrary central body with spacetime coordinates given by \(x^\alpha \) and equations of motion prescribed according to Eq. (9). Likewise, consider the motion of a Test Mass (TM) located inside the spacecraft at \(x^\alpha _{TM} \equiv x^\alpha + \delta x^\alpha \), shielded from all non-gravitational forces so that the motion of the test mass follows a geodesic i.e. \(f^\alpha _{TM} \equiv 0\) in Eq. (9). Therefore, the relative acceleration between the spacecraft and test mass is given by

$$\begin{aligned} \frac{\text {d}^2 \xi ^\alpha }{\text {d}\tau ^2} = - \left( \partial _\mu \varGamma ^\alpha _{\beta \sigma }\right) u^\beta u^\sigma \xi ^\mu - 2 \left( \varGamma ^\alpha _{\beta \sigma } u^\beta \right) \frac{\text {d}\xi ^\sigma }{\text {d}\tau } - f^\alpha , \end{aligned}$$
(33)

where we have introduced \(\xi ^\alpha \equiv x^\alpha _{TM} - x^\alpha \) as the relative spacetime separation vector and we assume \(\xi ^0 = 0\). We note in the absence of non-gravitational forces \(f^\alpha \equiv 0\), Eq. (33) reduces to the so-called equation of geodesic deviation (d’Inverno 1992).

The IAU-recommended post-Newtonian metric tensor components \(g_{\mu \nu }\) are given by (Soffel et al. 2003)

$$\begin{aligned} g_{00} = 1 - \frac{2W}{c^2} + \frac{2W^2}{c^4}, \quad g_{ij} = -\delta _{ij} \left( 1 + \frac{2W}{c^2} \right) , \end{aligned}$$
(34)

where W is a scalar gravitational potential defined in the Geocentric Celestial Reference Frame which generalises the definition of the classical Newtonian potential where the reader is referred to Soffel and Han (2019); Soffel (2000) for further details. In general, there exists an additional general relativistic vector potential \(W^j\) in the off-diagonal time-space metric tensor components which accounts for the rotation of the central body. However, for the current analyses we assume a static spacetime so that \(W^j \equiv 0\). The invariant spacetime line element associated with Eqs. (34) is given explicitly by

$$\begin{aligned} \left( ds \right) ^2 = c^2 d\tau ^2 = \left( 1 - \frac{2W}{c^2} + \frac{2W^2}{c^4} \right) c^2 \text {d} T^2 - \delta _{ij}\left( 1 + \frac{2W}{c^2} \right) \text {d}X^i \text {d}X^j, \end{aligned}$$
(35)

where it is standard practice to denote spacetime coordinates in the local geocentric frame using upper case symbols. Hence, the differential relations between proper and coordinate time are given (to order \(O(c^{-2})\)) by

$$\begin{aligned} \text {d}\tau = \left( 1 - \frac{2W}{c^2} - \frac{V^2}{c^2} \right) ^{1/2} \text {d}T, \end{aligned}$$
(36)

which gives rise to the first- and second-order differential operators

$$\begin{aligned} \frac{\text {d}}{\text {d}\tau } = \left( 1 - \frac{2W}{c^2} - \frac{V^2}{c^2} \right) ^{-1/2} \frac{\text {d}}{\text {d}T}, \end{aligned}$$
(37)

and

$$\begin{aligned} \frac{\text {d}^2}{\text {d}\tau ^2} = \varSigma \frac{\text {d}^2}{\text {d}T^2} + \frac{2 V^i}{c^2} \frac{\text {d}V^i}{\text {d}T} \frac{\text {d}}{\text {d}T}, \end{aligned}$$
(38)

respectively, where we have introduced \(\varSigma \approx \left( 1 + 2W/c^2 + V^2/c^2 \right) \). Hence, the spatial components of the post-Newtonian accelerometer equation are given by

$$\begin{aligned} A^i = B^i + C^i + D^i, \end{aligned}$$
(39)

where

$$\begin{aligned} A^i&\approx \varSigma \frac{\text {d}^2 \xi ^i}{\text {d}T^2} + \frac{2 V^i}{c^2} \frac{\text {d}V^i}{\text {d}T} \frac{\text {d} \xi ^i}{\text {d}T}, \end{aligned}$$
(40)
$$\begin{aligned} B^i&\approx -\varSigma \left[ \left( \partial _j\partial _i W \right) \xi ^j + \left( \partial _l \varGamma ^i_{jk} \right) V^jV^k \xi ^l \right] , \end{aligned}$$
(41)
$$\begin{aligned} C^i&\approx -2 \varSigma \left( \varGamma ^i_{jk} V^j \frac{\text {d}\xi ^k}{\text {d}T}\right) , \end{aligned}$$
(42)
$$\begin{aligned} D^i&\approx -{\mathcal {K}}^i + \varSigma \left( \frac{V^i}{c}{\mathcal {K}}_0 + \frac{V^iV^j}{c^2}{\mathcal {K}}_j\right) = -f^i. \end{aligned}$$
(43)

The nonzero Christoffel symbols associated with the first post-Newtonian metric tensor components (34) are given by

$$\begin{aligned} \begin{aligned} \varGamma ^j_{00}&= -\frac{1}{c^2} \left( \partial _j W - \frac{1}{c^2} 4W \partial _j W \right) , \\ \varGamma ^j_{ik}&= \frac{1}{c^2} \left( \delta _{jk} \partial _i W +\delta _{ij} \partial _k W - \delta _{ik} \partial _j W \right) , \\ \varGamma ^0_{0j}&= -\frac{1}{c^2} \partial _j W, \end{aligned} \end{aligned}$$
(44)

where the reader is reminded that in the present manuscript we assume a static spacetime so that the so-called gravitomagnetic vector potential \(W^j \equiv 0\) (cf. O’Leary et al. (2018) for the explicit derivation of the Christoffel symbols when \(W^j \ne 0\)). The above expressions are obtained following direct application of the first- and second-order differential operators (37) and (38) to Eq. (33). The classical accelerometer equation is deduced in the weak field Newtonian limit (d’Inverno 1992) of expressions (40) to (43) and is given by

$$\begin{aligned} \frac{\text {d}^2 \xi ^i}{\text {d} t^2} = -\left( \partial _j \partial _i U \right) \xi ^j - \mathcal {K}^i, \end{aligned}$$
(45)

where, at the measurement accuracy of space-based accelerometers, the tidal effects contained in the expression \(\left( \partial _j \partial _i U \right) \xi ^j\) are negligible so that Eq. (45) is approximately given by

$$\begin{aligned} \frac{\text {d}^2 \xi ^i}{\text {d} t^2} = - \mathcal {K}^i. \end{aligned}$$
(46)

Hence, in the Newtonian limit, the relative acceleration between the test mass and the spacecraft is determined by the non-gravitational forces \(\mathcal {K}^i\) only.

4 GRAPE: structure-preserving integration scheme

In the framework of general relativity, the equations of motion for test particles are given by a system of four nonlinear, second-order, coupled differential equations. Although exact analytical expressions exist for the geodesic motion of test particles in Schwarzschild and Kerr geometries (Misner et al. 1973), the system of equations (9) are, in general, non-integrable and require numerical integration. Classical numerical procedures for the solution of differential equations (Butcher and Goodwin 2008) such as the family of explicit, single-step Runge–Kutta schemes do not preserve first integrals or phase-space volume (or, more generally, the Poincare integral invariants) and, as a result, are unsuitable for problems in orbitography or celestial mechanics requiring long-term stability.

Symplectic integration schemes (Hairer et al. 2006) are advanced numerical procedures which preserve the symplectic structure of Hamiltonian systems so that the so-called flow of the system defines a canonical transformation (Yoshida 1990). Symplectic integration algorithms belong to a class of numerical methods known as structure-preserving geometric integrators and have been successfully applied across a myriad of fields (Donnelly and Rogers 2005; Hairer et al. 2006) where the reader is referred to Kinoshita et al. (1991) for a detailed discussion on the merits of symplectic integration algorithms to problems in astronomy.

4.1 GRAPE: Gauss collocation procedure

In the celebrated work of Butcher (1964), the author discusses the properties of implicit Runge–Kutta schemes and presents the Butcher tableau coefficients for a series of s-stage, \(n^{th}\)-order algorithms known collectively as Gauss collocation methods (Hairer et al. 2006). The coefficients for the 5-stage, \(10^{\mathrm{th}}\)-order integration scheme implemented in GRAPE are given by

$$\begin{aligned} \begin{array} {c|ccccc} \alpha - \omega _2 &{} \omega _1 &{} \omega _1' - \omega _3 + \omega _4' &{} \beta - \omega _5 &{} \omega _1' - \omega _3 - \omega _4' &{} \omega _1 - \omega _6 \\ \alpha - \omega _2' &{} \omega _1 - \omega _3' + \omega _4 &{} \omega _1' &{} \beta - \omega _5' &{} \omega _1' - \omega _6' &{} \omega _1 - \omega _3' - \omega _4\\ \alpha &{} \omega _1 + \omega _7 &{}\omega _1' + \omega _7' &{} \beta &{} \omega _1' - \omega _7' &{} \omega _1 - \omega _7 \\ \alpha + \omega _2' &{} \omega _1 + \omega _3' + \omega _4 &{} \omega _1' + \omega _6' &{} \beta + \omega _5' &{} \omega _1' &{} \omega _1 + \omega _3' - \omega _4\\ \alpha + \omega _2 &{} \omega _1 + \omega _6 &{} \omega _1' + \omega _3 + \omega _4'&{} \beta + \omega _5 &{} \omega _1' + \omega _3 - \omega _4' &{} \omega _1 \\ \hline &{} 2\omega _1 &{} 2\omega _1' &{}\gamma &{} 2\omega _1' &{} 2\omega _1 \end{array} \end{aligned}$$

where the constants \(\alpha ,\beta ,\gamma \) are defined by \(\alpha = 1/2, \beta = 32/225, \gamma =64/225\) and the \(m=1,2,\ldots , 7\) components \(\omega _m, \omega '_m\) are defined according to (Butcher 1964)

$$\begin{aligned} \omega _1&= \frac{322 - 13 \delta }{3600},&\qquad \omega _1'&= \frac{322 + 13\delta }{3600}, \\ \omega _2&= \frac{1}{2}\sqrt{\frac{35+2\delta }{63}},&\qquad \omega _2'&= \frac{1}{2}\sqrt{\frac{35-2\delta }{63}}, \\ \omega _3&= \omega _2 \left( \frac{452+59\delta }{3240} \right) ,&\qquad \omega _3'&= \omega _2' \left( \frac{452- 59\delta }{3240} \right) , \\ \omega _4&= \omega _2 \left( \frac{64 + 11\delta }{1080} \right) ,&\qquad \omega _4'&= \omega _2' \left( \frac{64 - 11\delta }{1080} \right) , \\ \omega _5&= 8 \omega _2 \left( \frac{23 - \delta }{405} \right) ,&\qquad \omega _5'&= 8 \omega _2' \left( \frac{23 + \delta }{405} \right) , \\ \omega _6&= \omega _2 - 2\omega _3 - \omega _5,&\qquad \omega _6'&= \omega _2' - 2\omega _3' - \omega _5', \\ \omega _7&= \omega _2 \left( \frac{308 - 23\delta }{960} \right) ,&\qquad \omega _7'&= \omega _2' \left( \frac{308 + 23\delta }{960} \right) , \end{aligned}$$

where \(\delta = \sqrt{70}\). Hence, given an arbitrary system of N differential equations

$$\begin{aligned} \frac{\text {d} x^i}{\text {d}t} = f^i(t,x^j), \qquad x^i\left( t_n \right) = x^i_n, \qquad \left( i,j=1,2,\ldots , N\right) , \end{aligned}$$
(47)

the solution \(x_n \rightarrow x_{n+1}\) with integration step size h is given by

$$\begin{aligned}&x^i_{n+1} = x^i_{n} + h \sum _{j=1}^s b_j k^i_{j}, \end{aligned}$$
(48)
$$\begin{aligned}&k^i_j = f^i\left( t_n + c_j h,x^i_n + h\sum _{l=1}^s a_{jl}k^i_l\right) . \end{aligned}$$
(49)

We make the observation that Eqs. (49) are defined implicitly. At present, GRAPE determines the individual \(k^i_j\) using fixed-point iteration where the initial value is assumed zero everywhere so that \(\left( k_0 \right) ^i_j = 0\). In future studies, improved strategies will be employed to initialise the \(k^i_j\) which requires further investigation (Hairer et al. 2006).

4.2 Quadratic invariants

Central to the present paper is the conservation of first integrals associated with the perturbed motion of a test particle described by Eq. (9). General relativity gives rise to a unique dynamical quantity (20) known formally as a quadratic invariant (Hairer et al. 2006).

The coefficients \(b_i\), \(a_{ij}\) appearing in Butcher (1964) satisfy the constraint

$$\begin{aligned} b_{i} a_{ij} + b_j a_{ji} - b_i b_j = 0, \qquad (i,j = 1,2,\cdots s), \end{aligned}$$
(50)

which, as a result, indicates that Gauss collocation methods (Butcher 1964) are symplectic and preserve quadratic invariants completely (Cooper 1987; Butcher 2016). The proof is outlined below and the reader is referred to (Hairer et al. 2006,  Chapter 4) for complete details.

A first integral \({\mathcal {I}}(x^j)\) associated with an arbitrary system of differential equations (47) satisfies the following condition

$$\begin{aligned} \frac{\text {d}{\mathcal {I}}}{\text {d}t} = \frac{\partial {\mathcal {I}}}{ \partial x^i} f^i(t,x^j) = 0. \end{aligned}$$
(51)

We define a quadratic function of (47) according to

$$\begin{aligned} Q(x^k) = M_{ij} x^ix^j, \end{aligned}$$
(52)

where \(M_{ij}\) is an arbitrary square, symmetric matrix. Hence, \(Q(x^k)\) is a first integral of (47) if the following holds (Hairer et al. 2006)

$$\begin{aligned} M_{ij} x^i f^j(t,x^k) = 0. \end{aligned}$$
(53)

From the above, it is clear that we must have \(\text {d} M_{ij}/\text {d}t = 0\) which is demonstrated as follows

$$\begin{aligned} \frac{\text {d}}{\text {d}t}\left( M_{ij} x^i x^j \right) = \frac{\text {d}M_{ij}}{\text {d}t} x^i x^j + M_{ij}\frac{\text {d}x^i}{\text {d}t} x^j + M_{ij}x^i\frac{\text {d}x^j}{\text {d}t} = 0, \end{aligned}$$
(54)

and using the symmetry \(M_{ij} = M_{ji}\) we find

$$\begin{aligned} M_{ij} x^i \frac{\text {d}x^j}{\text {d}t} = M_{ij} x^i f^j = 0, \end{aligned}$$
(55)

if and only if \(M_{ij}\) is a constant.

According to Eq. (48) we have the following

$$\begin{aligned} \begin{aligned} M_{ij}x^i_{n+1} x^j_{n+1}&= M_{ij}x^i_{n} x^j_{n} + h \sum _{\ell =1}^s b_\ell M_{ij}x^i_n k^j_\ell + h \sum _{m=1}^s b_m M_{ij} k^i_m x^j_n \\&\quad + h^2 \sum _{\ell =1}^s \sum _{m=1}^s b_\ell b_m M_{ij} k^i_\ell k^j_m, \end{aligned} \end{aligned}$$
(56)

where it is important to note that Eq. (56) is obtained by squaring Eq. (48), \(x^i_n\) denotes the \(i^{\mathrm{th}}\) component of an arbitrary vector at time \(t = t_n\) and \(k^i_m\) denotes the \(m^{\mathrm{th}}\) approximate slope associated with the \(i^{\mathrm{th}}\) differential equation. In order for Eq. (52) to be classified as a first integral we must have \(Q_{n+1} = Q_n = ... = Q_0 = C, \forall n\) where \(Q_n \equiv Q(x^k_n)\) denotes the value of the quadratic function (52) at time \(t_n\) and C is an arbitrary constant. Hence, using Eq. (49), we can equivalently express Eq. (56) according to

$$\begin{aligned} \begin{aligned} M_{ij}x^i_{n+1} x^j_{n+1}&= M_{ij}x^i_{n} x^j_{n} + 2h \sum _{\ell =1}^s b_\ell M_{ij} X^i_\ell f^j \\&+ h^2 \sum _{\ell =1}^s \sum _{m=1}^s \left( b_\ell b_m - b_\ell a_{\ell m} - b_m a_{m \ell } \right) M_{ij}k^i_\ell k^j_m, \end{aligned} \end{aligned}$$
(57)

where, for brevity, we have introduced \(k^i_j = f^i \left( T, X^i_n \right) \) with \(T = t_n + c_j h\) and \(X^i_n = x^i_n + h\sum _{l=1}^s a_{jl}k^i_l\). Hence, according to Eqs. (53) and (50), the second and final terms on the right hand side of Eq. (57) are zero so that for Runge–Kutta methods satisfying (50), we have \(M_{ij}x^i_{n+1} x^j_{n+1} = M_{ij}x^i_{n} x^j_{n}\). Thus, with respect to the current problem

$$\begin{aligned} x^i = \begin{bmatrix} x^0 \\ x^1 \\ x^2 \\ x^3 \\ u^0 \\ u^1 \\ u^2 \\ u^3 \end{bmatrix}, \quad M_{ij} = \left[ \begin{array}{c|c} {\mathbf {0}} &{} {\mathbf {0}} \\ \hline {\mathbf {0}} &{} \eta _{\mu \nu } \end{array}\right] , \quad \eta _{\mu \nu } = \text {diag} \left( 1,-1,-1,-1\right) , \end{aligned}$$
(58)

which, when expressed according to Eq. (52), we find \(Q(x^k) = {\mathcal {I}} (\eta _{\mu \nu }(x^\alpha ),u^\alpha )\), where \({\mathcal {I}}\) is defined according to (20) and the condition (55) corresponds to the orthogonality condition (30) associated with the four-velocity and acceleration. It is important to note that in order to enforce strict symplecticity, we must express \({\mathcal {I}}\) in the natural tetrad so that at each numerical integration step the spacetime is assumed flat which is a formal requirement according to the condition \(\text {d} M_{ij}/\text {d}t\).

5 GRAPE: first results and discussion

In this section, we demonstrate the utility of the newly developed GRAPE software through a series of numerical simulations. We consider the motion of three test particles with orbital parameters assimilated to Molniya (M), Parker Solar Probe (PSP) and Mercury Planetary Orbiter (MPO)-like objects. We assume each test particle is initially located at apoapsis \(r_a\) so that the initial spacetime coordinates and four-velocity are given by \(x_0^\alpha = \left( 0,r_a,0,0 \right) \) and \(u_0^\alpha = \left( c,0, v_a \cos i, v_a \sin i\right) \), respectively, where \(v_a\) is the magnitude of the spacecraft velocity at apoapsis and the reader is referred to Table 1 for further details. The gravitational field of the respective central body is assumed to be modelled by the metric tensor components associated with the spherically symmetric Schwarzschild solution. While the choice of the underlying coordinate system is arbitrary, integration is performed in (Cartesian) isotropic coordinates which are easy to implement numerically.

For the benefit of the reader, and in order to facilitate future replications of the results presented in the current manuscript, we briefly outline the dynamical quantities used in the numerical simulations. The metric tensor components and corresponding invariant spacetime line element associated with the spherically symmetric Schwarzschild field of the central body are given by

$$\begin{aligned} g_{00} = \left( \frac{1-\rho _s/\rho }{1+\rho _s/\rho }\right) ^2, \qquad g_{ij} = \delta _{ij} \left( 1 + \rho _s/\rho \right) ^4, \end{aligned}$$
(59)

and

$$\begin{aligned} \left( \text {d}s \right) ^2 = \left( \frac{1-\rho _s/\rho }{1+\rho _s/\rho }\right) ^2 c^2 \text {d}t^2 - \left( 1 + \rho _s/\rho \right) ^4 \delta _{ij}\text {d}x^i \text {d}x^j, \end{aligned}$$
(60)

respectively, where \(\rho _s = r_s/4, \rho = (x_ix^i)^{1/2}\), the Schwarzschild radius is denoted \(r_s\) and \(x^i = \left( x,y,z\right) \) denote pseudo-Cartesian coordinates (Müller and Grave 2009).We transform dynamical quantities from global to natural frames using Eqs. (22) with the corresponding inverse transformations following trivially. The equations of motion used in the numerical simulation are given by

$$\begin{aligned} \frac{\text {d}^2 x^0}{\text {d}\tau ^2}&= -4\left( \frac{\rho _s}{\rho ^3}\right) \left( \frac{x_i u^i }{w_1}\right) u^0 + f^0, \end{aligned}$$
(61)
$$\begin{aligned} \frac{\text {d}^2 x^i}{\text {d}\tau ^2}&= -2 \rho _s \bigg \{ \rho ^3(\rho -\rho _s) w_2 \left( u_0 u^0\right) x^i - \left( \rho ^3 w_3 \right) ^{-1}\nonumber \\&\quad \times \bigg [\left( u_i u^i - u_ju^j\right) x^i + 2\left( x_j u^j\right) u^i \bigg ] \bigg \} + f^i, \end{aligned}$$
(62)

where in the above equations \( j \ne i \) and we define \(w_1 = 1-\left( \rho _s / \rho \right) ^2, w_2 = \left( \rho + \rho _s \right) ^{-7}, w_3 = 1 + \rho _s/\rho \) and the Christoffel symbols of the second kind required to derive Eqs. (61) and (62) are given explicitly in Müller and Grave (2009). Finally, we note, in each simulation, we assume a constant radiation-like four-force (in the direction opposite to central body) acting on the spacecraft measured in the local frame (see Sect. 2 for implementation details) where \(f^\alpha \sim 1 \times 10^{-6} \text {m/s}^2\). Again, it is important to note that the specific form of the external perturbation is selected arbitrarily and will be provided to GRAPE by end-users using either specific force models or data obtained from an accelerometer.

Fig. 1
figure 1

Evolution of spacecraft proper time with global coordinate time where \(\delta t \equiv t - \tau \)

Table 1 Molniya (M), Parker Solar Probe (PSP) and Mercury Planetary Orbiter (MPO) orbital inclination, i, period T, semi-major axis a and geocentric, heliocentric and hermiocentric apoapsis \(r_a\) and periapsis \(r_p\) radial distances, respectively

It is interesting to consider the evolution of the individual spacecraft proper time when compared with a derived coordinate time as per Fig. 1. Taking into account the order of magnitude and the nonlinear evolution of \(\delta t\), we can extract information regarding the orbit type. It is clear that Molniya spacecraft are in a highly eccentric orbit given the periodic oscillation occurring at perigee where special and general relativistic time dilation effects are greatest in magnitude. While the order of magnitude of the combined effects is low for the weak gravitational field of the Earth, we observe that for the PSP, the effects are increased by approximately six orders of magnitude due to the Schwarzschild field of the Sun and the high orbital velocity at perihelion.

Complete conservation (at the order \(10^{-32}\)) of the quadratic invariant (20) is achieved for the perturbed motion of the three test particles described in Table 1 and presented in Fig. 2. We simulate three orbits per test particle, selecting different integration time steps h which are typical in magnitude for practical operations. For example, consider the simulated orbit of the perturbed NASA Parker Solar Probe-like object. We assume a time step of approximately five minutes (given in black in Fig. 2) where the typical order of magnitude used for generating ephemerides for probes during interplanetary cruise is approximately ten minutes.

Fig. 2
figure 2

Relative frequency of quadratic invariant Eq. (20) for Mercury Planetary Orbiter (top), Molniya (middle) and Parker Solar Probe (bottom)-like objects. The individual orbits are propagated with integration time step h which is calculated with respect to the orbital period T. We define \(\delta {\mathcal {I}}\) according to \(\delta {\mathcal {I}} \equiv \left( {\mathcal {I}} - c^2\right) /c^2\) where \({\mathcal {I}}\) is calculated at each numerical integration step. Hence, for the perturbed motion of test particles subject to a locally measured radiation-like four-force, GRAPE preserves \({\mathcal {I}}\) at the order of \(10^{-32}\)

The standard “Newton \(+\) correction” approach for the numerical propagation of spacecraft is in conflict with the resolutions of the IAU which necessitate that all astrodynamical problems be formulated in the framework of Einstein’s general theory of relativity. Given the rapid increase in measurement technology, we reiterate the important point: modern orbitography software is approaching its limits in terms of complexity. The standard approach to include relativity as an effective force presents both technical and conceptual problems in modern orbitography. It ignores the fundamental principles of relativity and gives rise to opportunities to duplicate or ignore relativistic effects. Further, as precision increases in measurement technology, propagation tools need to be continuously updated in order to account for additional relativistic effects and changes in conventions; increasing opportunities for human error.

We have presented a novel approach to propagate the motion of test particles subject to non-gravitational forces in the complete framework of general relativity which does not appear to have been exploited in the literature. GRAPE accounts for all relativistic contributions and all non-gravitational forces at the order of the chosen spacetime metric and the measurement sensitivity of the on-board accelerometer, respectively. Further, due to the existence of the unique general relativistic quadratic invariant (20), the integration procedure adopted in GRAPE provides an additional layer of security and an accuracy check during the propagation interval. We note that given the order of magnitude of the relativistic contributions arising in the PN metric tensor components, GRAPE employs 128-bit (quadruple) precision to perform calculations. While 64-bit (double) precision is less computationally demanding, we conjecture that high-order relativistic contributions will appear as noise at this level of precision.

It is of interest to the present authors to investigate and perform comparisons with alternative integration procedures in future implementations of GRAPE. We note the truncation error of integration procedures is of a mathematical origin, where the accumulation of round-off errors is intrinsically linked with the machine architecture. Hence, the optimal time step required is machine-precision dependent, and is obtained as a trade-off between truncation and round-off errors. Ideally, the optimal time step must be determined using a reference integration scheme built with respect to a representation of floating numbers with a higher number of bits with respect to the method to be assessed in order to reduce the numerical round-off noise to nearly zero (Balmino and Barriot 1990). Given that GRAPE is currently utilising 128- bit precision necessitates a reference integrator with 256- bit (octuple) precision which is rarely used in practice. A typical reference integrator is the classical Bulirsch and Stoer algorithm with Richardson extrapolation (see Stoer and Bulirsch (2013) and Press et al. (2007) for implementation details). More recently, there has been renewed interest in utilising high-order, adaptive integration procedures based on Taylor’s method (Biscani and Izzo 2021) which have been shown to be competitive with and in some cases superior to symplectic and non-symplectic schemes.

The coefficients of the implicit Runge–Kutta integration scheme currently implemented in GRAPE are analytically derived in Butcher (1964) up to order 10. While higher order methods allow for a larger time step h and a reduction in computational demand, their derivation is complex. The construction of higher order implicit Runge–Kutta methods which also satisfy the highly nonlinear constraint (50) is a non-trivial task and the reader is referred to Yoshida (1990) and Hairer et al. (2006) for further technical details which are beyond the scope of the current paper.

As a final remark, we outline an approach to extend GRAPE for practical mission planning and compatibility with NASA’s SPICE kernels (Acton 1997). This will be formally addressed in a future manuscript and we expect the important results of the Cassini-Huygens (Bertotti et al. 2003) and BepiColumbo (Serra et al. 2018; Iess et al. 2021) radioscience experiments to serve as important verification tests for future versions of GRAPE. When complete, GRAPE will utilise the PN IAU operational-ready spacetime metrics for both geocentric and barycentric studies and will calculate important light-time observables (Cappuccio et al. 2021) associated with interplanetary probes. The complete \(n-\)body barycentric metric tensor components are given by (Damour et al. 1991; Soffel 2000)

$$\begin{aligned} g_{00} = 1 - \frac{2w}{c^2} + \frac{2w^2}{c^4}, \quad g_{0j} = 4 w^j/c^3, \quad g_{jk} =-\delta _{jk}\left( 1 + 2w/c^2 \right) , \end{aligned}$$
(63)

where, for consistency we have adopted the opposite metric signature to Soffel (2000) and w is defined in terms of the individual contributions due to monopole \(w_0\) and higher order post-Newtonian multipole \(w_L\) moments of the \(A=1,\ldots ,N\) Solar System bodies and an additional post-Newtonian contribution \(\Delta \) so that

$$\begin{aligned} w = \sum _{A}^n \left[ \left( w_0\right) _A + \left( w_L \right) _A + \Delta _A/c^2\right] , \end{aligned}$$
(64)

and the vector potential \(w^i\) accounts for the motion (rotational and translational) of the respective Solar System bodies. Again, we note that for consistency the above definitions (63) and (64) are defined using the opposite metric signature to Soffel (2000). At this point, we refrain from providing explicit definitions of the individual terms as they are dependent on the accuracy required for the specific mission and refer the reader to Soffel (2000) for further details. However, we make the observation that \(\Delta _A\) is defined in terms of Solar System body position, velocity and acceleration which are provided to GRAPE via SPICE kernels. Hence, the resulting equations of motion will be defined implicitly and will need to be solved by iteration, which, in the monopole approximation, is equivalent to the EIH approach discussed in Standish et al. (1992). Finally, we note the analytical computation of the Christoffel symbols associated with (63) can be calculated using computer algebra software packages to avoid computationally demanding numerical differentiation.