Propagation Modules: Fix LocalTime Calculation
By accident we have double-counted the local time consistently in all propagation modules. This worked the following way:
-
DepositedCharge
is looked at and prepared for propagation. -
An initial time is passed to the propagation algorithm, obtained via
deposit->getLocalTime()
// Get position and propagate through sensor auto [local_position, time, state] = propagate( event, deposit.getLocalPosition(), deposit.getType(), charge_per_step, deposit.getLocalTime(), px_map);
-
The propagation used this together with the Runge-Kutta timer to check for satisfaction of
initial_time + runge_kutta.getTime() < integration_time
-
At the end of the propagation, the code returned
initial_time + runge_kutta.getTime()
, which in the example code here is stored in the variabletime
-
The final
PropagatedCharge
module was created via:// Create a new propagated charge and add it to the list PropagatedCharge propagated_charge(local_position, global_position, deposit.getType(), std::move(px_map), deposit.getLocalTime() + time, deposit.getGlobalTime() + time, state, &deposit);
Hence, we double-counted the local time by adding it twice - initially and after the propagation has finished.
This MR corrects this behavior.