Linear drift and piecewise linear drift seem to be accepted. Polynomial drift has been requested by DEPAS. Below are proposed structures:
Linear drift correction
type: "linear"
start_sync_reference: '2015-04-22T09:21:00Z'
start_sync_instrument: '2015-04-22T09:21:00Z'
end_sync_reference: '2016-05-28T22:59:00.1843Z'
end_sync_instrument: '2016-05-28T22:59:02Z'
If there is assumed to be clock drift but some or all of values were not measured, each missing value should be represented by 'None'
Piecewise correction
type: "piecewise"
interpolation: 'linear' # 'linear' or 'cubic'
syncs_reference:
- '2015-04-22T09:21:00Z'
- '2016-05-28T22:59:00.1843Z'
syncs_instrument:
- '2015-04-22T09:21:00Z'
- '2016-05-28T22:59:02Z'
This gives the same output as "linear' if there are only two syncs and interpolation='linear'
Polynomial correction
Wayne made this up without checking with someone who's actually done this.
type: "polynomial"
start_sync_reference: '2015-04-22T09:21:00Z'
a = [0, 1.1e-9, 1.5e-6, 2.45e-18]
checks:
start_sync_instrument: '2015-04-22T09:21:00Z'
end_sync_reference: '2016-05-28T22:59:00.1843Z'
end_sync_instrument: '2016-05-28T22:59:02Z'
corrected_time would equal instrument_time + a[0] + a[1]*dTime + a[2]*dTime^2 + a[3]*dTime^3 ...
where dTime = instrument_time - start_sync_instrument
- start_sync_instrument provides a check on a[0]
- end_sync_reference and end_sync_instrument provide a check on the offset at the end of the experiment
Optional parameters
The following parameters may be included for more information:
time_base: 'Seascan MCXO, 1e-8 nominal drift'
reference: 'GPS'
These structures are embedded in the StationXML file as a JSON-coded string in a <Comment>
field with subject="Clock Drift"
In the future, a separate namespace may be created to allow a more specific and structured representation
Below is an example of the first proposition in a <Comment>
field:
<Comment subject=”Clock Drift”>
<Value>“{type: linear, start_sync_reference: 2015-04- 22T09:21:00Z,start_sync_instrument: 0, end_sync_reference: 2016-05- 28T22:59:00.1843Z,end_sync_instrument: 2016-05-28T22:59:02Z}}”</Value> </Comment>