Iterative Solution of Location
For a given starting point and number of unknowns
an iterative solution is carried out in which the solution is repeatedly
shifted slightly to reduce the travel time residuals for the defining phases.
Each iteration includes reidentification (id_pha
), residual calculation (calc_resid
), and weighting (calc_weight
) of the phases in use. The solution is then carried out (solve
) and a number of checks made to see if the solution is diverging or has already converged sufficiently to stop the process (decide_iter
). A minimum of 2 iterations is required and a maximum number of iterations is set in config.txt
- after this many tries it is assumed that convergence will never be reached.
The solution
structure has 6 members containing the current solution:
-
time - source time in seconds since the epoch defined in iscloc.h. Set in init_sol
then reset in solve.
-
lat - source latitude in degrees. Set in init_sol
then reset in solve.
-
lon - source longitude in degrees. Set in init_sol
then reset in solve.
-
dircos - array of direction cosines giving source location. Set in init_sol
then reset in solve.
-
depth - depth of source in km. Set in init_sol
then reset in solve.
-
covar - covariance matrix for solution. Set in solve.
The solution
structure has 7 members related to iteration control:
-
iteration - number of current iteration. Loop counter in main.
-
diverging - 0/1. 1 if solution is diverging. Set to 0 in init_sol, set to 1 in decide_iter
if solution diverging.
- alpha
- measure of average weighted residual. Set in weighting
function.
- sigma
- measure of standard deviation of weighted residuals. Set in calc_weight.
There are 6 external variables related to iteration control assigned in
read_config
and corresponding lines in
config.txt:
-
max_iter - the number of iterations carried out before it is assumed that a solution will not converge and the next option is tried.
-
avg_weight_thresh - if the average phase weight is less than this threshold the solution is considered to be diverging.
-
alpha_thresh - threshold that the absolute value of alpha
must be below for the solution to be considered converged.
-
dalpha_thresh - if alpha
changed by more than this amount since the last iteration the solution may be considered to be diverging.
-
dsigma_low - negative change in sigma
since last iteration that must be exceeded for the solution to be considered converged.
-
dsigma_high - change in sigma
since last iteration that cannot be exceeded for the solution to be considered converged.
There is 1 external variables related to the solution process assigned in
read_config
and corresponding lines in
config.txt
-
max_err_factor - factor used to calculate the thresholds that diagonal
elements of the normal equation matrix must be greater than for the solution
to continue.