Repository navigation
First and last epoch in timeSeriesOrbitRevolutions
#426
|
Dear GROOPS team, I have come across a problem when I used I do not think this is the intended behavior and have modified the code to include these two epochs: std::vector<Time> times;
if(orbit.size()>0 && orbit.at(0).time.isInInterval(timeStart, timeEnd))
times.push_back(orbit.at(0).time);
for(UInt i=0; i<orbit.size()-1; i++)
if((orbit.at(i).position.phi() < 0) && (orbit.at(i+1).position.phi() > 0))
{
const Double deltaPhi = Double(orbit.at(i+1).position.phi())-Double(orbit.at(i).position.phi());
const Time time = orbit.at(i).time + (Double(orbit.at(i).position.phi())/deltaPhi) * (orbit.at(i+1).time-orbit.at(i).time);
if(time.isInInterval(timeStart, timeEnd))
times.push_back(time);
}
if(orbit.size()>1 && orbit.at(orbit.size()-1).time.isInInterval(timeStart, timeEnd))
times.push_back(orbit.at(orbit.size()-1).time);
return times;I am happy to make a pull request for this change, but I wanted to discuss it first with a wider audience to make sure it does not break the processing of anyone else. |
Replies: 2 comments 2 replies
|
Dear Andre, You don’t need to change the code. I'm not sure either whether that's always the intended behavior. You can simply add additional time points in the GUI, e.g. using timeSeries:irregular or timeSeries:instrumentArcIntervals. The order doesn't matter, as the time series is automatically sorted in ascending order. Best regards |
|
Hi @AndreHauschild, a question about the code for calculating the epoch of ascending equator crossing:
as the latitude before the crossing ( |
Dear Andre,
You don’t need to change the code. I'm not sure either whether that's always the intended behavior.
You can simply add additional time points in the GUI, e.g. using timeSeries:irregular or timeSeries:instrumentArcIntervals. The order doesn't matter, as the time series is automatically sorted in ascending order.
Best regards
Torsten