Skip to content

Instantly share code, notes, and snippets.

@Myfanwy
Created July 12, 2019 21:57
Show Gist options
  • Save Myfanwy/a14c5bc2bcdde2a52d65fc78ea95004d to your computer and use it in GitHub Desktop.
Save Myfanwy/a14c5bc2bcdde2a52d65fc78ea95004d to your computer and use it in GitHub Desktop.
How to drift-correct or time-correct a .csv file from a VUE .vdb
If the original vrl files are unavailable, a drift-correction needs to be performed on the .csv file for each receiver in a deployment. You will need at least a .vdb with the receiver log of interest to be able to do this.
To do this, access the events tab in VUE for a receiver download. Export it to a csv.
Open it in Excel. Make sure the PC Time (very last cell in the Description column) is in an acceptable date/time format. Do this by copying and pasting it to the cell below it, and using the custom m/d/yyyy hh:mm:ss.00 format.
Events Tab:
In a new column, calculate the time between initialization and end time (days). Do this by subtracting A1 from the final cell in the A column. This is done in J2 in the example
Covert J2 to seconds (multiply by 84600). This is done in K2.
Calculate receiver clock drift in seconds by subtracing the final receiver time (A351) from the end PC time (D352), and multiplying by 86400. This is done in M2. This is the total difference in time between your PC and your receiver, over the entire deployment's duration.
Calculate the time coefficient (factor) by dividing the clock drift by the total time elapsed in seconds (K2). This is the amount you will end up multiplying each detection by in the detections tab. This is done in K6.
Detections Tab:
Copy the receiver start time from the events tab (A2) into a new cell (K2 in the example).
In L3, we have calculated the difference between the receiver start time (events) and the first detection. This is propogated down L column.
In M3, we apply the time factor (coefficient) to the difference between the receiver start time and each detection. This is done by multiplying the L column by the time coefficient (K6 in the events tab). Propagate down M column.
Finally, we add the time factor correction back to the actual detection value to get a new column of detection times. This is done by converting M3 to seconds (dividing it by 86400) and adding the recorded detection time (A3 in the detection tab). Propagate that down, and you have a column of time-corrected detection times (N in the template).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment