See sonarlight for a Python alternative
Use the 'remotes' package to install the package from Github:
remotes::install_github('KennethTM/sonaR')
Reading and plotting data:
library(sonaR)
#Read .sl2/sl3 file
#Read function implemented using Rcpp to speed it up
sl <- sonar_read("Path to file")
#Inspect data
print(sl)
#Subset data
sl_sub <- sl[0:10000,]
#Get data from primary channel and plot it
sl_primary <- sonar_image(sl_sub, channel = "Primary")
sonar_show_image(sl_primary)
#Get data from sidescan channel and plot it
sl_sidescan <- sonar_image(sl_sub, channel = "Sidescan")
sonar_show_image(sl_sidescan)
Georeferencing data:
#Georefence sonar sidescan data
sl_geo <- sonar_sidescan_geo(sl_sub)
plot(sl_geo, col = heat.colors(10))