2.4 Correcting receiver coordinates

The function fit_receiver_positions will try to estimate the true receiver positions. Here, receivers will be moved around until the mean sync-tag transmission latencies for each receiver pair matches well with the expected values. The function simply fits receiver position offset values using R’s optim function.

For this to work, we have to first select at least two receivers as our reference points with ref_receivers. Alternatively, you can specify which receivers you want to estimate offsets for with adj_receivers

# Estimate receiver coordinate offsets
ref_recs = c("2", "5")
pos_offsets <- fit_receiver_positions(sync_model, ref_receivers = ref_recs, 
  estimate_transmission_speed = T)
# Show results
print(pos_offsets)
## --- Kaltoa receiver position model
## 
## Fitted transmission speed:
## 1469.19 m s⁻¹, SE: 6.46
## 
## Estimated offsets:
##               x offset |   y offset
##             Mean | SE       Mean | SE   
##          1  1.88   0.17    -0.35   0.17 
##          2  0.00   0.00     0.00   0.00 
##          3 -3.13   0.11    -2.13   0.08 
##          4 -0.55   0.16    -2.01   0.18 
##          5  0.00   0.00     0.00   0.00 
##          6  2.96   0.42     4.06   0.43
plot(pos_offsets)

# Save in KaltoaClockSync model
position_offsets(sync_model) <- pos_offsets
# Show newest diagnostic plot
plot(sync_model, type = 'error')

Almost all the bias is now gone from the sync-tag latency plots.