baktoft / yaps

YAPS - Yet Another Positioning Solver
GNU General Public License v3.0
19 stars 4 forks source link

Include soundspeed data #3

Closed JennaVergeynst closed 5 years ago

JennaVergeynst commented 5 years ago

Hi again @baktoft ,

Is there a way to include soundspeed data when using the package?

Thanks, Jenna

baktoft commented 5 years ago

Hi @JennaVergeynst At the moment, sound speed is estimated by the model. However, there are situations where it would be beneficial to use recorded water temperature and sound speeds estimated from that as input to the model instead. I can include the option for doing that - when do you need it? Cheers, \hb

JennaVergeynst commented 5 years ago

Well ... My collaborator is waiting for my tracks so it would be nice to have that option... I'm not sure if it will bring a great improvement of course, but it can be good to test, since we have those data available. So whenever you have time...

JennaVergeynst commented 5 years ago

Hi @baktoft,

A question related to the above... In the function "getInp", n_ss is specified, I suppose this is the number of soundspeed estimations? Should this not always be equal to the number of pings, or the lenght of the track, i.e. one soundspeed estimation for each transmission?

Btw, do you have some documentation on the functions getInp and runTmb?

Jenna

baktoft commented 5 years ago

n_ss is indeed number of sound speeds to be estimated. It started as one per ping, but I included this option to estimate fewer ss for situations where you don't have that much data and therefore want to reduce number of estimates needed. In most cases, one estimate of SS per hour or so is enough.

As for the documentation... It used to work as standard R-help would, but apparently not anymore. I got some issues with this as well... How did you install yaps? Any errors?

Cheers, \hb

JennaVergeynst commented 5 years ago

Ah ok!

I installed it as:

install.packages('devtools')
devtools::install_github("baktoft/yaps")

I did not get any errors. But indeed, R-help says "No documentation for ... in specified package and libraries."

baktoft commented 5 years ago

Seems like I managed to get man pages into .gitignore, so they were not uploaded. Should work now, so please try again. Cheers, \hb

JennaVergeynst commented 5 years ago

Yes, thanks, that works now!

baktoft commented 5 years ago

Hi Jenna, I tried to implement the option to use SS from measured water temperature - branch use_ss-data. Could you take it for a spin? Install using devtools::install_github("baktoft/yaps", ref="use_ss-data") and see the README.md from that branch for example using this option.

Cheers, \hb

JennaVergeynst commented 5 years ago

Thanks Henrik, I tested this branch and it works smoothly. However for these data the difference with modelled soundspeed is very small. The modelled errors are even slightly larger when including measured soundspeed... I will test it also for the PPM data later on!

baktoft commented 5 years ago

Thanks for testing 👍 In cases with decent number of hydros detecting the pings, SS can be estimated very well. Obviously, at some threshold it will be better to use measured SS, so good to have the option ready. As for larger errors when using measured... I think the SS estimation capture a bit of variation that otherwise end up in the residuals/error estimates. Perhaps left-overs from non-perfect hydro synchronization...

baktoft commented 5 years ago

Option to use SS-data from measure water temperature added. Thanks to @JennaVergeynst for suggestion, feedback and test.