Difference between PlanetTxtLogger and OrbitTxtLogger
Hi,
I've noticed that the PlanetTxtLogger
outputs the 0th step (so physical time 0) while OrbitTxtLogger
does not. It would be nice to have the output of the orbital elements also at physical time 0.
(Btw, this would be a great double check for our calculation of the planet's position and velocities from the input of orbital elements as done in Issue #495 (closed)).
I think that in PlanetTxtLogger
the first output for initial step is done here:
PlanetTxtLogger::onStartup() {
if (simulation().step() == 0) {
// not a restart
print();
}
}
These lines do not appear in OrbitTxtLogger
. I will try to make a branch and see if I can figure it out. But I don't know C++ so I can't guarantee that it will work.
Another small difference is that PlanetTxtLogger
seems to have a check for the case where the user asks for a planet tracker but there is no planetary system:
if (!simulation.disk().system()) {
simulation.disk().grid().log() << "Sorry, cannot ask for planet tracking when no planet are pre
simulation.disk().grid().comm().abort(-1);
}
and OrbitTxtLogger
does not.