Measurement Generation

Hi all,

Is there a way to generate two different types of measurements at the same time stamp?

// in a loop that go through the ground stations
final TDOABuilder tdoaBuilder = new TDOABuilder(null, primary,secondary,0.0,1.0,satellite);
final RangeRateBuilder rangeRateBuilder = new RangeRateBuilder(null,primary,true,0.0,1.0,satellite);

generator.addScheduler( new ContinuousScheduler<>(tdoaBuilder,new FixedStepSelector(step, TimeScalesFactory.getUTC()););
generator.addScheduler( new ContinuousScheduler<>(rangeRateBuilder,new FixedStepSelector(step, TimeScalesFactory.getUTC());));

// after the loop to generate measurements.
final SortedSet<ObservedMeasurement<?>> measurements = generator.generate(t0, t1);

Currently I am adding the measurement builders to the same generator with same date selector. Would this guarantee that the measurements are generated at the same timestamp for both types ? Also it seems the each scheduler requires a new selector. Is that correct ?

Also, how does the scheduler create timestamp ? It seems the scheduler does not start creating measurement exactly at the given start date.

Thank you.

Hi @niluj

Yes it is possible to generate simultaneously two types of measurements. Did you execute your code to see if measurements are at the same time?

A good example for simultaneous generation of measurements is the GeneratorTest class of Orekit. It presents simultaneous generation of station based measurements (i.e., AzEl and Range) based on event detection. At the end, the generator generated the same number of measurements.

The example also presents that the measurement buildees are added to the same generator.

Yes you need a selector to know the frequency of generation. For the scheduler, you can create a variable and add this variable to both schedulers

FixedStepSelector selector = FixedStepSelector(step, TimeScalesFactory.getUTC());

generator.addScheduler( new ContinuousScheduler<>(tdoaBuilder,selector));
generator.addScheduler( new ContinuousScheduler<>(rangeRateBuilder,selector));

I hope this will be useful

Best regards,
Bryan

Hi ,

Thank you for the clarification. I was able to get the measurement generator working without errors. :slight_smile:
However I noticed that the measurements generation does not exactly start at the given start date . (Unless the time stamp is zero. eg ā€œ2022-11-16T00:00:00.000Zā€).
Is this the normal behaviors of the step generation?

Thank you.

The second argument used when building FixedStepSelector was used in the example Bryan proposed to enforce alignment of measurements with whole steps. If you use a step of 60s, the measurements will be aligned to whole minutes in UTC time scale, If you use a step of 10s, the measurements will occur at 0s, 10s, 20s, 30, 40s and 50s in UTC minutes.

If you prefer to have measurements scheduled relative to the start date which may be out of alignment, just use null as the second argument.