Generator only work for one time

Hello orekit community,

When I tried to generate the simulated measurements using the org.orekit.estimation.measurements.generation.Generator class, I find a weird phenomenon that the generator can only work for one time. Once I tried to run the generator for the second time, it would come to a deadlock keep running forever.

Here is part of my code (using Matlab)

    % for the first tracklet
    generator1 = Generator();
    localSat = generator1.addPropagator(targetSatelliteAll(1).propagator);
    remoteSat1 = generator1.addPropagator(observeSatelliteAll(1).propagator);
    interSatellitesRangeBuilder1 = InterSatellitesRangeBuilder([], localSat, remoteSat1, 0, 0, 1);
    selector1 = FixedStepSelector(timeStep, []);
    selector1.selectDates(initialDate, finalDate) 
    scheduler1 = ContinuousScheduler(interSatellitesRangeBuilder1, selector);
    measurements1 = generator1.generate(initialDate, finalDate);

    % for the second tracklet
    generator2 = Generator(); 
    remoteSat2 = generator2.addPropagator(observeSatelliteAll(2).propagator);
    interSatellitesRangeBuilder2 = InterSatellitesRangeBuilder([], localSat, remoteSat2, 0, 0, 1);
    selector2 = FixedStepSelector(timeStep, []);
    scheduler2 = ContinuousScheduler(interSatellitesRangeBuilder2, selector2);
    measurements2 = generator2.generate(initialDate, finalDate);

In this code, measurements1 for the first tracklet can be generated successfully, but the second tecklet (measurements2) met a deadlock. I can’t understand why because generator1 and generator2 are totally different.

In fact, if I tried to run ‘generator1.generate(initialDate, finalDate)’ for the second time, it comes to a deadlock, too.

Why the geneartor can only work for one time? I’m confused of it. Do you have any idea?

Thank you very much for any help.

Xuefeng Tao.

Hi @taoxuefeng11,

I’m not sure but could it be related to this issue with the PropagatorsParallelizer?
If yes, the issue was solved and will be available in version 12.