
Examples for Frequency Calibration and Location.

I have done coarse calibration before and reuse that value. Only fine calibration is done every time.

calfreq
Old Tack: 228

Tack: 208  Maximum: 1681
Tack: 209  Maximum: 1278
Tack: 210  Maximum: 1650
Tack: 211  Maximum: 1335
Tack: 212  Maximum: 1057
Tack: 213  Maximum: 1615
Tack: 214  Maximum: 965
Tack: 215  Maximum: 1211
Tack: 216  Maximum: 1022
Tack: 217  Maximum: 1328
Tack: 218  Maximum: 1432
Tack: 219  Maximum: 1910
Tack: 220  Maximum: 2684
Tack: 221  Maximum: 3382
Tack: 222  Maximum: 3779
Tack: 223  Maximum: 4408
Tack: 224  Maximum: 4999
Tack: 225  Maximum: 4933
Tack: 226  Maximum: 5179
Tack: 227  Maximum: 5228
Tack: 228  Maximum: 5148
Tack: 229  Maximum: 5135
Tack: 230  Maximum: 4988
Tack: 231  Maximum: 4690
Tack: 232  Maximum: 4537
Tack: 233  Maximum: 4332
Tack: 234  Maximum: 3224
Tack: 235  Maximum: 2854
Tack: 236  Maximum: 2424
Tack: 237  Maximum: 1837
Tack: 238  Maximum: 1421
Tack: 239  Maximum: 1164
Tack: 240  Maximum: 1012
Tack: 241  Maximum: 1124
Tack: 242  Maximum: 962
Tack: 243  Maximum: 1004
Tack: 244  Maximum: 1546
Tack: 245  Maximum: 1159
Tack: 246  Maximum: 1538
Tack: 247  Maximum: 1652
Tack: 248  Maximum: 1519
Current Tack: 227
 ok.

l Analog DC offset: 995 = 0,7287 V
Offset 16 ADC: 0,7287 V
Noise amplitude 667 ADC: 0,0036 V
Miminum value -19915 ADC: 0,6152 V
Maximum value 19405 ADC: 0,8393 V
Master pulse train at 39234 us with intensity 31199 found.
Slave  pulse train at 71284 us with intensity 2871 found.
Slave  pulse train at 55473 us with intensity 1153 found.
TDs: 32050 16239
 ok.
l Analog DC offset: 995 = 0,7287 V
Offset -15 ADC: 0,7287 V
Noise amplitude 386 ADC: 0,0021 V
Miminum value -16923 ADC: 0,6320 V
Maximum value 16499 ADC: 0,8225 V
Master pulse train at 6337 us with intensity 27019 found.
Slave  pulse train at 38391 us with intensity 2294 found.
Slave  pulse train at 22590 us with intensity 973 found.
TDs: 32054 16253
 ok.
l Analog DC offset: 994 = 0,7280 V
Offset 152 ADC: 0,7287 V
Noise amplitude 464 ADC: 0,0021 V
Miminum value -18582 ADC: 0,6218 V
Maximum value 19221 ADC: 0,8378 V
Master pulse train at 45344 us with intensity 31305 found.
Slave  pulse train at 2418 us with intensity 2887 found.
Slave  pulse train at 61597 us with intensity 1232 found.
TDs: 32064 16253
 ok.
l Analog DC offset: 994 = 0,7280 V
Offset 119 ADC: 0,7280 V
Noise amplitude 561 ADC: 0,0029 V
Miminum value -16161 ADC: 0,6357 V
Maximum value 16322 ADC: 0,8210 V
Master pulse train at 11906 us with intensity 28543 found.
Slave  pulse train at 43966 us with intensity 2638 found.
Slave  pulse train at 28068 us with intensity 1060 found.
TDs: 32060 16162
 ok.
l Analog DC offset: 995 = 0,7287 V
Offset 63 ADC: 0,7287 V
Noise amplitude 436 ADC: 0,0021 V
Miminum value -18041 ADC: 0,6262 V
Maximum value 18041 ADC: 0,8312 V
Master pulse train at 55482 us with intensity 31661 found.
Slave  pulse train at 12537 us with intensity 2825 found.
Slave  pulse train at 71644 us with intensity 1022 found.
TDs: 32045 16162
 ok.
  ok.

TD values are not stable due to low Lessay signal.

Now I changed antenna axis by roughly 90 degrees:
Please note that slave signal amplitude exchange:

  ok.
l Analog DC offset: 994 = 0,7280 V
Offset 82 ADC: 0,7280 V
Noise amplitude 702 ADC: 0,0036 V
Miminum value -10049 ADC: 0,6708 V
Maximum value 10901 ADC: 0,7902 V
Master pulse train at 23819 us with intensity 17359 found.
Slave  pulse train at 39969 us with intensity 2184 found.
Slave  pulse train at 55874 us with intensity 1458 found.
TDs: 16150 32055
 ok.
l Analog DC offset: 994 = 0,7280 V
Offset 143 ADC: 0,7287 V
Noise amplitude 1155 ADC: 0,0065 V
Miminum value -11876 ADC: 0,6606 V
Maximum value 12583 ADC: 0,7998 V
Master pulse train at 67389 us with intensity 17987 found.
Slave  pulse train at 8554 us with intensity 2409 found.
Slave  pulse train at 24454 us with intensity 1417 found.
TDs: 16155 32055
 ok.
l Analog DC offset: 995 = 0,7287 V
Offset 44 ADC: 0,7287 V
Noise amplitude 628 ADC: 0,0029 V
Miminum value -11182 ADC: 0,6650 V
Maximum value 11107 ADC: 0,7917 V
Master pulse train at 37181 us with intensity 17182 found.
Slave  pulse train at 53336 us with intensity 1996 found.
Slave  pulse train at 69236 us with intensity 1500 found.
TDs: 16155 32055
 ok.
l Analog DC offset: 995 = 0,7287 V
Offset 12 ADC: 0,7287 V
Noise amplitude 865 ADC: 0,0043 V
Miminum value -11450 ADC: 0,6635 V
Maximum value 11571 ADC: 0,7946 V
Master pulse train at 5359 us with intensity 18783 found.
Slave  pulse train at 21514 us with intensity 2626 found.
Slave  pulse train at 37404 us with intensity 1157 found.
TDs: 16155 32045
 ok.

Now TDs are mostly stable, as Lessay pulses get more amplitude.

Another run with antenna in earth-sky orientation, which should be
equally bad for all directions:

l Analog DC offset: 997 = 0,7302 V
Offset 31 ADC: 0,7302 V
Noise amplitude 613 ADC: 0,0029 V
Miminum value -13233 ADC: 0,6547 V
Maximum value 12480 ADC: 0,8012 V
Master pulse train at 21467 us with intensity 25605 found.
Slave  pulse train at 53523 us with intensity 1933 found.
Slave  pulse train at 37629 us with intensity 823 found.
TDs: 32056 16162
 ok.
l Analog DC offset: 997 = 0,7302 V
Offset 26 ADC: 0,7302 V
Noise amplitude 540 ADC: 0,0029 V
Miminum value -12924 ADC: 0,6569 V
Maximum value 13258 ADC: 0,8056 V
Master pulse train at 65122 us with intensity 26376 found.
Slave  pulse train at 22192 us with intensity 2386 found.
Slave  pulse train at 6288 us with intensity 1066 found.
TDs: 32060 16156
 ok.
l Analog DC offset: 997 = 0,7302 V
Offset 8 ADC: 0,7302 V
Noise amplitude 617 ADC: 0,0029 V
Miminum value -13927 ADC: 0,6511 V
Maximum value 13641 ADC: 0,8078 V
Master pulse train at 34113 us with intensity 27379 found.
Slave  pulse train at 66169 us with intensity 2147 found.
Slave  pulse train at 50255 us with intensity 1062 found.
TDs: 32056 16142
 ok.
l Analog DC offset: 997 = 0,7302 V
Offset 46 ADC: 0,7302 V
Noise amplitude 278 ADC: 0,0014 V
Miminum value -12820 ADC: 0,6569 V
Maximum value 12941 ADC: 0,8041 V
Master pulse train at 2848 us with intensity 26690 found.
Slave  pulse train at 34913 us with intensity 2053 found.
Slave  pulse train at 19004 us with intensity 1075 found.
TDs: 32065 16156
 ok.

This is due to orientation dependence of magnetic loop antennas.
Mine has ~ 46 cm diameter, 118 turns, no tuning capacitor, but an opamp bandpass filter instead.


Initial convolution frequency calibration:

Mecrisp-Stellaris 0.9 with Loran-C for STM32F407 by Matthias Koch
cold-ca Current q in use: 1000,00000 kHz
Time elapsed: 5577138 us
Shift: 408 samples
Frequency Offset: 0,07315 kHz
New q in use: 1000,07315 kHz
Crystal too fast, Tack: 227
 ok.
cold-ca Current q in use: 1000,07342 kHz
Mecrisp-Stellaris 0.9 with Loran-C for STM32F407 by Matthias Koch
cold-ca Current q in use: 1000,00000 kHz
Time elapsed: 5577130 us
Shift: 402 samples
Frequency Offset: 0,07208 kHz
New q in use: 1000,07208 kHz
Crystal too fast, Tack: 231
 ok.
Mecrisp-Stellaris 0.9 with Loran-C for STM32F407 by Matthias Koch
cold-ca Current q in use: 1000,00000 kHz
Time elapsed: 5577144 us
Shift: 423 samples
Frequency Offset: 0,07584 kHz
New q in use: 1000,07584 kHz
Crystal too fast, Tack: 219
 ok.
Mecrisp-Stellaris 0.9 with Loran-C for STM32F407 by Matthias Koch
cold-ca Current q in use: 1000,00000 kHz
Time elapsed: 5577119 us
Shift: 410 samples
Frequency Offset: 0,07351 kHz
New q in use: 1000,07351 kHz
Crystal too fast, Tack: 226
 ok.
Mecrisp-Stellaris 0.9 with Loran-C for STM32F407 by Matthias Koch
cold-ca Current q in use: 1000,00000 kHz
Time elapsed: 5577152 us
Shift: 423 samples
Frequency Offset: 0,07584 kHz
New q in use: 1000,07584 kHz
Crystal too fast, Tack: 219
 ok.
Mecrisp-Stellaris 0.9 with Loran-C for STM32F407 by Matthias Koch
cold-ca Current q in use: 1000,00000 kHz
Time elapsed: 5577130 us
Shift: 417 samples
Frequency Offset: 0,07476 kHz
New q in use: 1000,07476 kHz
Crystal too fast, Tack: 222
 ok.
Mecrisp-Stellaris 0.9 with Loran-C for STM32F407 by Matthias Koch
cold-ca Current q in use: 1000,00000 kHz
Time elapsed: 5577130 us
Shift: 417 samples
Frequency Offset: 0,07476 kHz
New q in use: 1000,07476 kHz
Crystal too fast, Tack: 222
 ok.

Initial convolution frequency calibration may cope with far off frequency, so it can only sum up very few GRIs, about 4. 
You cannot do this with 1 GRI period only, because dual-rate transmissions would give two equal intensity
pulse trains. More than 4 is not an good idea for cold calibration, because it may be far off, so that longer
summations will result in chaos in buffer.

After a rough estimation of crystal frequency is done, convolution calibration can be done over more GRIs,
with 32 being a good value in my experience.

ca Current q in use: 1000,07342 kHz
Time elapsed: 11151500 us
Shift: -4 samples
Frequency Offset: -0,00035 kHz
New q in use: 1000,07306 kHz
Crystal too fast, Tack: 228
 ok.
ca Current q in use: 1000,07309 kHz
Time elapsed: 11151745 us
Shift: 6 samples
Frequency Offset: 0,00053 kHz
New q in use: 1000,07363 kHz
Crystal too fast, Tack: 226
 ok.
ca Current q in use: 1000,07374 kHz
Time elapsed: 11151697 us
Shift: -8 samples
Frequency Offset: -0,00071 kHz
New q in use: 1000,07302 kHz
Crystal too fast, Tack: 228
 ok.
ca Current q in use: 1000,07309 kHz
Time elapsed: 11151749 us
Shift: 3 samples
Frequency Offset: 0,00026 kHz
New q in use: 1000,07336 kHz
Crystal too fast, Tack: 227
 ok.
ca Current q in use: 1000,07342 kHz
Time elapsed: 11151517 us
Shift: -5 samples
Frequency Offset: -0,00044 kHz
New q in use: 1000,07297 kHz
Crystal too fast, Tack: 228
 ok.

With 32 GRIs summed up, convolution calibration seems quite stable. 

Testing has to show which method is more accurate, but the
convolution approach has clear advantages:

           Signal amplitude   Convolution calibration
Initial:    several minutes        8 seconds
Adjust:      108 seconds           16 seconds
Noise:      Noise disturbs      Is ok with low SNR

But the convolution approach can only work if a clear signal is available,
and if the pulse trains of different stations have different signal amplitudes.

Signal amplitude approach is ok with any Loran-C signal, 
as long you have quite a good SNR.
