Integrating equations of motion with Earth perturbations

1. Feb 16, 2016

morinmau

Hello to everybody,

i have been programming an n-bodies integrator in MATLAB, in an earth-centric ECI perturbations framework. The main objective is to 'write down' in a procedure an interesting part of phisics, and secondly (at the very end of it) to get a complete integrator for meteor orbits determination from observations.
Given that, i had no problems in getting the right results (i'm testing with ISS) for additional (point mass) bodies and atmospheric drag. The issues i'm facing now regards the modelling of gravitational potential due to earth oblateness.
Honestly, I'm struggling a bit with the concept of switching from the conventional inertial ECI frame to an ECEF frame, not completely clear to me when this is definitely needed.
I so decided to implement only the zonal component J2: since the J2 effect on gravitational potential depends only on geocentric latitude, the earth rotation around z-axis should'nt have any effect on the inertial reference frame (skipping precession and nutation).
The problem is the following: when i integrate for few days the satellite position with J2 gravitational effect (whose accellerations are calculated in cartesian coordinates ECI frame, for what said above), the orbit shape is not changed (semimajor axis, eccentricity and inclination don't change) but the orbit's orientation moves anticlockwise. Actually, the line of nodes (longitude of ascending node) precesses on the equatorial plane.
That would be logical if the J2 accellerations would depend on the longitude and we integrate in the ECI coordinates, but it is not.
I checked formulas hundreds times, i used several different formulations of the J2 equations, but no change.
The code is very simply, anyway ...
Am I doing something logically wrong that passed undetected ?
Thanks in advance for any hints you can provide.

Maurizio

2. Feb 21, 2016