-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
562 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: yaps | ||
Title: Track Estimation using YAPS (Yet Another Positioning Solver) | ||
Version: 1.2.5.9100 | ||
Version: 2.0.0.9000 | ||
Authors@R: c( person("Henrik", "Baktoft", email = "[email protected]", role = c("cre", "aut"), comment=c(ORCID = "0000-0002-3644-4960")), | ||
person("Karl", "Gjelland", role=c("aut"), comment=c(ORCID = "0000-0003-4036-4207")), | ||
person("Uffe H.", "Thygesen", role=c("aut"), comment=c(ORCID = "0000-0002-4311-6324")), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
#' Internal function. Apply linear correction matrix to epofrac before sync | ||
#' @inheritParams getInpSync | ||
#' @noRd | ||
#' @export | ||
applyLinCor <- function(hydros, dat_sync, sync_params){ | ||
if(is.na(sync_params$lin_corr[1])){ | ||
lin_corr <- matrix(0, nrow=nrow(hydros), ncol=2, byrow=TRUE) | ||
rownames(lin_corr) <- hydros$h_sn | ||
attr(dat_sync, 'lin_corrected') <- FALSE | ||
} else { | ||
lin_corr <- sync_params$lin_corr | ||
attr(dat_sync, 'lin_corrected') <- TRUE | ||
} | ||
|
||
h_sns <- hydros$h_sn | ||
|
||
for(h in 1:length(h_sns)){ | ||
sn_h <- h_sns[h] | ||
dat_sync[h_sn == sn_h, epofrac := epofrac - lin_corr[rownames(lin_corr) == sn_h, 1] - epofrac * lin_corr[rownames(lin_corr) == sn_h, 2]] | ||
} | ||
|
||
|
||
dat_sync[] | ||
return(dat_sync) | ||
} | ||
|
Oops, something went wrong.