openstb.simulator.travel_time.iterative
Travel time calculation plugins for the openSTB simulator.
Classes:
| Name | Description |
|---|---|
Iterative |
Travel time including vehicle motion during the ping. |
Iterative
Iterative(max_iterations, tolerance)
Bases: TravelTime
Travel time including vehicle motion during the ping.
This uses an iterative approach to find the travel time. The initial guess is found with the assumption that the vehicle motion at the start of the ping is constant throughout the ping. The receiver position at the proposed reception time is found. From the corresponding path length an updated travel time is found. This continues to iterate until successive travel times are within the requested tolerance.
This uses the sound speed at the position of the vehicle and time of the ping transmission throughout the calculation, and assumes that the sound travels in a straight line to and from the targets.
If a proposed reception time is after the end of the trajectory, an exception will be raised. Ensure that your ping time plugin is configured to leave a suitable gap between the final ping and the end of the trajectory for the echoes to return.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
max_iterations
|
int
|
If a solution is not found within this many iterations, an exception will be raised. |
required |
tolerance
|
float
|
The tolerance in seconds. If the travel time estimated in successive iterations differ by less than this, they are considered successful. |
required |
Source code in openstb/simulator/travel_time/iterative.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |