|
|
|
# Creation of matrices for offset calculations
|
|
|
|
|
|
|
|
This document refers to the [solve](https://gitlab.com/emirror-de/artoa_4/blob/master/lib/+artoa/+offsets/solve.m) function that is used for the determination of offsets and/or soundspeed.
|
|
|
|
|
|
|
|
## Matrix descriptions
|
|
|
|
|
|
|
|
When calculated, the matrices can be found in the global "artoaWorkspace" variable and can be pulled by the following lines of code.
|
|
|
|
```matlab
|
|
|
|
global artoaWorkspace;
|
|
|
|
% Resulting tables:
|
|
|
|
artoaWorkspace.editOffsets.A
|
|
|
|
artoaWorkspace.editOffsets.B
|
|
|
|
artoaWorkspace.editOffsets.X
|
|
|
|
% Unfiltered tables:
|
|
|
|
artoaWorkspace.editOffsets.unfilteredA
|
|
|
|
artoaWorkspace.editOffsets.unfilteredB
|
|
|
|
```
|
|
|
|
|
|
|
|
| Name | Description |
|
|
|
|
| ---- | ----------- |
|
|
|
|
| A | Lines correspond to the known SATFIXes. The columns can vary, based on the results that want to be received. The first column is the distance between SATFIX and soundsource position. The last two columns belong to the float offset and drift. All in between correspond to the soundsource offset and drift. |
|
|
|
|
| B | The corresponding TOA to the lines in A. |
|
|
|
|
| C | Contains the reference time corresponding to the soundsource. |
|
|
|
|
| X | Contains the result after the calculations |
|
|
|
|
|
|
|
|
## Algorithm
|
|
|
|
|
|
|
|
*As stated above, this refers to the [solve](https://gitlab.com/emirror-de/artoa_4/blob/master/lib/+artoa/+offsets/solve.m) function.*
|
|
|
|
|
|
|
|
- The following informations are being collected for every soundsource in preparation for the creation of A, B and C ([createCalculationTables](https://gitlab.com/emirror-de/artoa_4/blob/master/lib/+artoa/+offsets/createCalculationTables.m) function):
|
|
|
|
|
|
|
|
1. Calculation of TOA by [predictFromGps](https://gitlab.com/emirror-de/artoa_4/blob/master/lib/+artoa/+toa/predictFromGps.m) function.
|
|
|
|
1. Calculation of days since start of the soundsource.
|
|
|
|
1. Calculation of distance using the [calculateGeodist](https://gitlab.com/emirror-de/artoa_4/blob/master/lib/+artoa/+data/calculateGeodist.m) function.
|
|
|
|
1. Collection of corresponding measured TOA.
|
|
|
|
|
|
|
|
- After the initial creation of the tables, the known offsets (specified in "Empirical Offset" in the offset details window) are being subtracted from the B matrix.
|
|
|
|
- Then, the known drifts (specified in "Empirical Drift" in the offset details window) are being subtracted from the B matrix.
|
|
|
|
- The matrix A is being filtered for the calculations, meaning the known columns are being removed.
|
|
|
|
- The reference time (from matrix C) is being subtracted from the B matrix.
|
|
|
|
- If the soundspeed is set in offset details window, the column is removed as well and the given soundspeed is being subtracted from B, multiplied by the distances before subtraction.
|
|
|
|
- The matrix X is being calculated using
|
|
|
|
```matlab
|
|
|
|
X = A \ B;
|
|
|
|
``` |
|
|
\ No newline at end of file |