Hello,
This is a basic usage question, please forgive my ignorance, I am still very new to Orbital mechanics.
I have an array of three PVCordinates objects that I would like to propagate. I create KeplerianOrbit objects and store them in a list.
List<KeplerianOrbit> svs = new ArrayList<>();
// Create orbit list
for (int i = 0; i < 3; i++) {
PVCoordinates sv_new = new PVCoordinates(rs[i], vs[i]);
// Orbits are immutable, so we create a new orbit with the new state vector.
KeplerianOrbit orbit_new = new KeplerianOrbit(
sv_new,
inertialFrame,
t_new,
Constants.EGM96_EARTH_MU);
svs.add(orbit_new);
}
I then pass the List to a method for propagation.
public boolean validate_propagation(List<KeplerianOrbit> states,KeplerianOrbit orb, int targetTime, int searchTime) {
// propagate at the targetTime
KeplerianPropagator propagator0 = new KeplerianPropagator(states.get(0));
KeplerianPropagator propagator1 = new KeplerianPropagator(states.get(1));
KeplerianPropagator propagator2 = new KeplerianPropagator(states.get(2));
double step = 1.0;
AbsoluteDate targetDate = orb.getDate().shiftedBy(targetTime);
SpacecraftState state = propagator0.propagate(targetDate);
Do I have to create an instance of a KeplerianOrbit for every unique position and velocity pair? If the same initial conditions apply to each object I am trying to propagate, can’t I use the same KeplerianOrbit object for all three propagations? I think the answer is yet, but can’t see why.
Thank you so much.
sg