When working with multiple satellites (constellations, Monte Carlo simulations, etc.), propagating each satellite sequentially can be slow. The par_propagate_to function enables efficient parallel propagation by utilizing multiple CPU cores. The parallel propagation function uses Rayon's work-stealing thread pool, configured via brahe.set_num_threads().
When to Use Parallel Propagation
Propagating constellations (10s to 1000s of satellites)
importbraheasbh# Example propgator intiailizationkep_prop=bh.KeplerianPropagator.from_eci(epoch,state,60.0)sgp_prop=bh.SGPPropagator.from_tle(line1,line2,60.0)# This will raise TypeErrorbh.par_propagate_to([kep_prop,sgp_prop],target)
The parallel function clones each propagator before propagation, then updates the originals with final states. Memory usage scales linearly with the number of propagators.
For very large constellations (1000s of satellites), consider processing in batches and monitoring memory usage to avoid crashes from memory exhaustion.
If any propagator fails during parallel propagation, the function will panic (Rust) or raise an exception (Python). This can occur with SGP4 propagators when satellites decay below Earth's surface.