Commit 456d4eb5 authored by Dorchies David's avatar Dorchies David
Browse files

refactor(TransfoParam_LRQ): extend range of K to [0;500000]

Refs HYCAR-Hydro/airgr#152, HYCAR-Hydro/airgr#153
parent 9eab0a15
No related merge requests found
Pipeline #38999 failed with stages
in 7 minutes and 19 seconds
Showing with 2 additions and 2 deletions
+2 -2
...@@ -23,12 +23,12 @@ TransfoParam_LRQ <- function(ParamIn, Direction) { ...@@ -23,12 +23,12 @@ TransfoParam_LRQ <- function(ParamIn, Direction) {
if (Direction == "TR") { if (Direction == "TR") {
ParamOut <- ParamIn ParamOut <- ParamIn
ParamOut[, 1] <- 20 * (ParamIn[, 1] + 10) / 20.0 ParamOut[, 1] <- 20 * (ParamIn[, 1] + 10) / 20.0
ParamOut[, 2] <- 20 * (ParamIn[, 2] + 10) / 20.0 ParamOut[, 2] <- 500000 * (ParamIn[, 2] + 10) / 20
} }
if (Direction == "RT") { if (Direction == "RT") {
ParamOut <- ParamIn ParamOut <- ParamIn
ParamOut[, 1] <- ParamIn[, 1] * 20.0 / 20 - 10 ParamOut[, 1] <- ParamIn[, 1] * 20.0 / 20 - 10
ParamOut[, 2] <- ParamIn[, 2] * 20.0 / 20 - 10 ParamOut[, 2] <- ParamIn[, 2] * 20.0 / 500000 - 10
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment