Get DateDetector (without predefined dates)

Hi,

I am using orekit with Matab and want to setup a DateDetector.

However the constructor complains if I do not give it a list of dates.

This does not work:
trigger_date = DateDetector();
trigger_date = DateDetector([epoch.shiftedBy(0)]);

It only works if I give two! AbsoulteDates as an input.:
trigger_date = DateDetector([epoch.shiftedBy(0),epoch.shiftedBy(1)]);

Problem is: you cant remove dates from the detector. So how do I setup a empty one where I can later add the dates one by one?

Cheers, Alex

Could you try

epochs = javaArray('org.orekit.time.AbsoluteDate', 1)
epochs(1) = epoch
trigger_date = DateDetector(epochs)

Bryan

If it doesn’t work, please try

epochs = javaArray('org.orekit.time.TimeStamped', 1)

1 Like