Smooth directional off-axis attenuation curve
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Maintainer-controlled web client version.
|
||||
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
|
||||
window.CHGRID_WEB_VERSION = "2026.02.22 R194";
|
||||
window.CHGRID_WEB_VERSION = "2026.02.22 R195";
|
||||
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
|
||||
window.CHGRID_TIME_ZONE = "America/Detroit";
|
||||
|
||||
@@ -111,7 +111,8 @@ function resolveDirectionalProfile(
|
||||
return { attenuationFactor: 1, offAxisRatio: 0 };
|
||||
}
|
||||
const span = Math.max(1, 180 - halfCone);
|
||||
const offAxisRatio = Math.max(0, Math.min(1, (diff - halfCone) / span));
|
||||
const linearRatio = Math.max(0, Math.min(1, (diff - halfCone) / span));
|
||||
const offAxisRatio = linearRatio * linearRatio * (3 - 2 * linearRatio);
|
||||
return {
|
||||
attenuationFactor: 1 - offAxisRatio * (1 - rearGain),
|
||||
offAxisRatio,
|
||||
|
||||
Reference in New Issue
Block a user