From f02901d64c00c0fd8f2f5337138f3f2c94fc6cca Mon Sep 17 00:00:00 2001 From: Henrik Baktoft Date: Thu, 3 Oct 2019 20:23:25 +0200 Subject: [PATCH] fix issue for large BI rbi transmitters --- DESCRIPTION | 2 +- src/yaps.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9a411b1..05d2307 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: yaps Title: Track estimation using YAPS (Yet Another Positioning Solver) -Version: 1.1.0 +Version: 1.1.1 Authors@R: person("Henrik", "Baktoft", email = "hba@aqua.dtu.dk", role = c("aut", "cre")) Description: Estimate track from acoustic data using YAPS (doi:10.1038/s41598-017-14278-z). Depends: R (>= 3.4.3) diff --git a/src/yaps.cpp b/src/yaps.cpp index 158318a..3d70a0c 100644 --- a/src/yaps.cpp +++ b/src/yaps.cpp @@ -120,7 +120,7 @@ Type objective_function::operator() () } } else if(pingType == "rbi"){ for(int i = 1; i < np; ++i) { - nll -= dnorm(top(i), top(i-1) + (rbi_max - rbi_min)/2, Type(30.0), true); + nll -= dnorm(top(i), top(i-1) + (rbi_max - rbi_min)/2, (rbi_max-rbi_min)/2, true); nll += bi_penalty * (softplus((top(i) - top(i-1)) - rbi_max, bi_epsilon) + softplus(rbi_min - (top(i) - top(i-1)), bi_epsilon)); } }