This is a public repository to organize information pertaining to the cleaning, analysis, and visualization of ROV telemetry and spatial data, as well as preliminary information related to the % cover analyses (via CoralNet) of image stills derived from ROV video.
8
stars
0
forks
source link
Calculate area of seafloor filmed as a function of Ping Sonar Altimeter data #9
Given the published Field of View information about the GoPro 10, and given our Ping Sonar Altimeter values (i.e., the altitude of the ROV above the seafloor) recorded every 1s, we can calculate the height (m), width (m), and total area (m^2) captured throughout our ROV surveys. As an example, we read in simulated_2022_10_06_T4.csv, a ROV telemetry log from Magnolia, and use this script to perform the calculations.
There are only a couple of functions to walk through:
First, we must convert degrees to radians with to_rad(), as the built in tan() function requires radians.
Next, we use seafloor_area() to calculate a dataframe containing the height, width, and total area captured as a function of the input parameter ping. Note that ping can be a single value (i.e., ping=1 for 1m), or a simulated sequence (e.g., ping = seq(0.1, 2, by = 0.1), or a vector of values (e.g., ping = T1$avg_dist). The latter of which we use to perform the requisite calculation down a column for a ROV telemetry file.
Finally, we use combine.df() to add the newly calculate width, height, and total area values to an existing dataframe, i.e., an existing ROV telemetry file. This step is kept standalone as there are instances in which we don't want to append the seafloor_area area output to an existing dataframe.
A quick look at the output includes the following columns, with width and height in units of meters, and area in units of meters squared:
avg_dist
width
height
area
1.039667
2.915118
1.274217
3.714493
1.029556
2.886767
1.261825
3.642595
1.000111
2.804208
1.225738
3.437224
0.972222
2.726011
1.191557
3.248197
0.951667
2.668375
1.166364
3.112297
We can visualize the relationship between the Ping Sonar Altimeter data and the associated height, width, and area values by running seafloor_area on a simulated sequence of Ping values / input parameters:
Finally, we can also visualize the seafloor area surveyed per 1s (per every Ping Sonar Altimeter value):
Note the upwards and downwards "spike" . . . this is the ROV encountering a pipe (which first makes the sonar think the ROV is close to the seafloor, hence the downward spike, and then the pilot maneuvers the ROV above the pipe, hence the upwards spike, as the ROV then clears the pipe).
Given the published Field of View information about the GoPro 10, and given our Ping Sonar Altimeter values (i.e., the altitude of the ROV above the seafloor) recorded every 1s, we can calculate the height (m), width (m), and total area (m^2) captured throughout our ROV surveys. As an example, we read in simulated_2022_10_06_T4.csv, a ROV telemetry log from Magnolia, and use this script to perform the calculations.
There are only a couple of functions to walk through:
to_rad()
, as the built intan()
function requires radians.seafloor_area()
to calculate a dataframe containing the height, width, and total area captured as a function of the input parameterping
. Note thatping
can be a single value (i.e.,ping=1
for 1m), or a simulated sequence (e.g.,ping = seq(0.1, 2, by = 0.1)
, or a vector of values (e.g.,ping = T1$avg_dist
). The latter of which we use to perform the requisite calculation down a column for a ROV telemetry file.combine.df()
to add the newly calculate width, height, and total area values to an existing dataframe, i.e., an existing ROV telemetry file. This step is kept standalone as there are instances in which we don't want to append theseafloor_area
area output to an existing dataframe.https://github.com/zhrandell/Seattle_Aquarium_ROV_telemetry_imagery_analysis/blob/38c2cb54f5a10abcf0b93354c86c2c6337af6fef/code/seafloor_area.R#L22-L51
A quick look at the output includes the following columns, with
width
andheight
in units of meters, andarea
in units of meters squared:We can visualize the relationship between the Ping Sonar Altimeter data and the associated height, width, and area values by running
seafloor_area
on a simulated sequence of Ping values / input parameters:Finally, we can also visualize the seafloor area surveyed per 1s (per every Ping Sonar Altimeter value):
Note the upwards and downwards "spike" . . . this is the ROV encountering a pipe (which first makes the sonar think the ROV is close to the seafloor, hence the downward spike, and then the pilot maneuvers the ROV above the pipe, hence the upwards spike, as the ROV then clears the pipe).