3.1 TOAMatrix
DetectionsList
objects can be easily converted into TOAMatrix
objects with get_toa
.
Detections which match a given tag_id
and occur within group_thresh
seconds of each other are grouped into an emission event for that tag.
The transmission_speed
parameter will be later used by the positioning models we’ll apply to this.
toa_hr <- get_toa(exdata_positioning, tag_id = "HR-53883",
group_thresh = 0.5, transmission_speed = 1420)
summary(toa_hr)
head(toa_hr, 10)
## TOAMatrix
## Tag ID: HR-53883
## Transmission speed: 1420.00 m s⁻¹
## Time zone: CET
## ------ Detections
## First Detection: 2021-05-08 20:41:34
## Last Detection: 2021-05-08 21:29:30
## Reference time: 2021-05-08 20:41:34
## Detection Period: 0.8 hours
## ------ Emissions
## Emissions: 419
## Detections per emission (proportional)
## 1 2 3 4
## 0.48 0.37 0.11 0.03
## ------ Receiver Positions
## x y
## 1 481460.3 6243492
## 2 481435.5 6243491
## 3 481446.8 6243518
## 4 481465.0 6243550
## 5 481433.3 6243530
## 6 481473.4 6243513
## 1 2 3 4 5 6 time
## 1 0.5225566 NA NA NA NA NA 2021-05-08 20:41:34
## 2 96.7468368 NA 96.72943 NA NA NA 2021-05-08 20:43:10
## 3 NA NA NA 106.8677 NA NA 2021-05-08 20:43:20
## 4 NA NA 113.54463 NA NA NA 2021-05-08 20:43:27
## 5 NA NA NA NA 160.4745 NA 2021-05-08 20:44:14
## 6 NA NA 165.53259 NA NA NA 2021-05-08 20:44:19
## 7 NA NA 175.42440 NA 175.4183 NA 2021-05-08 20:44:29
## 8 NA NA 208.82124 NA NA NA 2021-05-08 20:45:02
## 9 231.3057200 NA NA NA NA NA 2021-05-08 20:45:25
## 10 NA NA 310.46417 NA NA NA 2021-05-08 20:46:44
TOAMatrix
objects show relative detection times to make the underlying data more human readable.
The reference time stamp (0 seconds) is stored as the attribute "start_time"
.
In the case of composite tags composed of two tags operating at different frequencies, we can combine these detections into a single TOA matrix.
toa_ppm <- get_toa(exdata_positioning, tag_id = "PPM-53883",
group_thresh = 0.5, transmission_speed = 1420)
toa_comp <- c(toa_hr, toa_ppm)
summary(toa_comp)
## TOAMatrix
## Tag ID: Multiple tags
## Transmission speed: 1420.00 m s⁻¹
## Time zone: CET
## ------ Detections
## First Detection: 2021-05-08 20:41:34
## Last Detection: 2021-05-08 21:29:30
## Reference time: 2021-05-08 20:41:34
## Detection Period: 0.8 hours
## ------ Emissions
## Emissions: 448
## Detections per emission (proportional)
## 1 2 3 4 5
## 0.48 0.35 0.11 0.04 0.01
## ------ Receiver Positions
## x y
## 1 481460.3 6243492
## 2 481435.5 6243491
## 3 481446.8 6243518
## 4 481465.0 6243550
## 5 481433.3 6243530
## 6 481473.4 6243513
When using rbind()
to create composite TOA matrices, the results will automatically be time ordered for you.
If the TOAMatrix
objects have conflicting metadata, warnings will be shown.
Next, we can filter our TOA data using diagnostic measures. The detection period — difference between the first and last detection — can be used to filter out emissions that likely have large detection outliers resulting from multi-path reflections. We can also filter based on the number of detections per emission.
# Filter TOA using diagnostics
toa_filt <- subset(toa_comp, period < 0.1 & detections >= 3)
# Show diagnostics for filtered TOA data
plot(diagnostics(toa_filt))
## 1 2 3 4 5 6 time
## 1 802.0756 NA 802.0588 NA 802.0527 NA 2021-05-08 20:54:56
## 2 NA NA 811.9370 811.9134 811.9307 NA 2021-05-08 20:55:05
## 3 NA NA 859.0417 859.0194 859.0344 NA 2021-05-08 20:55:53
## 4 NA 892.6166 892.5793 892.5583 NA NA 2021-05-08 20:56:26
## 5 897.4366 NA 897.4177 897.3970 NA NA 2021-05-08 20:56:31
## 6 924.8140 NA 924.7947 NA 924.7864 NA 2021-05-08 20:56:58
The following sections will deal with applying positioning models to these TOAMatrix
objects.