Improve parallelism in measurements generation
Measurements generation supports multiple satellites handling thanks to
PropagatorsParallelizer (which was in fact precisely developed for this purpose) which relies on multi-threading. This support was designed with inter-satellites measurements in mind, so for each measurement, all the spacecraft states provided by the parallelized propagators are made available and put in a flat array. The measurement builder picks up the states it needs using an index in the array, using the
ObervableSatellite to get this index.
There is however another use case that was not foreseen: building lots of single satellite measurements for a full constellation, making sure that at any time, all the measurements corresponding to that time are available. A typical example is generating observation Rinex files. Each Rinex file correspond to one receiver only, but at any time it contains all the measurements corresponding to all GNSS satellites visible from this receiver. Hence, parallel measurements generation is needed there too.
The second use case can be handled using the current design, but it is clearly not efficient and does not fully take advantage of multi-threading. The reason is that despite the propagation itself is multi-threaded, the measurements generation is managed at top level by the
Generator class which creates the
PropagatorsParallelizer and a specialized
MultiSatStepHandler that gather all states before calling the various
Scheduler and ultimately the associated
MeasurementBuilder. When a measurement involving a single satellite is desired, it could be generated within the individual propagator thread that handles this satellite, instead of being managed in the main parallelizer thread.