246 if (obs.size()<2 || obs[0].duration()>=40./24/60 || obs[0].name==
"SLEEP" || obs[1].name==
"SLEEP")
249 cout <<
"First source [" << obs[0].name <<
"] detected < 40min" << endl;
251 const double obs1_duration = obs[1].end - obs[0].begin - 40./24/60;
252 const double obs0_end = obs[0].begin + 40./24/60;
259 if (obs1_duration>=40./24/60 && obs[0].IsRangeValid(obs[0].
end, obs0_end))
261 obs[0].end = obs0_end;
262 obs[1].begin = obs0_end;
264 cout <<
"First source [" << obs[0].name <<
"] extended to 40min" << endl;
270 if (obs[1].IsRangeValid(obs[0].
begin, obs[0].end))
272 cout <<
"First source [" << obs[0].name <<
"] removed" << endl;
274 obs[1].begin = obs[0].begin;
275 obs.erase(obs.begin());
281 if (obs[0].IsRangeValid(obs[1].begin, obs[1].end))
283 cout <<
"Second source [" << obs[1].name <<
"] removed" << endl;
285 obs[0].end = obs[1].end;
286 obs.erase(obs.begin()+1);
288 if (obs.size()==0 || obs[0].name!=obs[1].name)
291 obs[0].end = obs[1].end;
292 obs.erase(obs.begin()+1);
294 cout <<
"Combined first two indentical sources [" << obs[0].name <<
"] into one observation" << endl;
299 cout <<
"No reschedule possible within limit." << endl;