@justair/justair-library 7.3.0-alpha.0df53d8 → 7.3.0-alpha.57848e2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -151,10 +151,11 @@ export const PARAMETERS = {
|
|
|
151
151
|
origin: null,
|
|
152
152
|
impacts: null,
|
|
153
153
|
},
|
|
154
|
-
//
|
|
155
|
-
//
|
|
156
|
-
//
|
|
157
|
-
//
|
|
154
|
+
// ---- Meteorological parameters (T, RH, DP and their _AMB pairs) ----
|
|
155
|
+
// JA-3058: bare ids (T/RH/DP) are enclosure-internal, for corrections and fog detection only.
|
|
156
|
+
// The _AMB ids are true ambient and the only ones safe for public display or Heat Index. Never
|
|
157
|
+
// substitute one for the other. Caveat: five suppliers still write outdoor dew point into DP;
|
|
158
|
+
// JA-3061 re-points them. See "Ambient vs internal met parameters" in CLAUDE.md before wiring up.
|
|
158
159
|
DP: {
|
|
159
160
|
id: "DP",
|
|
160
161
|
label: "Dew Point",
|
|
@@ -69,6 +69,20 @@ function sharedAssertions(constants) {
|
|
|
69
69
|
|
|
70
70
|
describe("PARAMETERS", () => {
|
|
71
71
|
sharedAssertions(PARAMETERS);
|
|
72
|
+
|
|
73
|
+
// JA-3060: Processing-Engine hardcodes these ids, so lock the ambient/internal pairing.
|
|
74
|
+
const ambientKeys = Object.keys(PARAMETERS).filter((key) => key.endsWith("_AMB"));
|
|
75
|
+
|
|
76
|
+
test("every met parameter has an ambient counterpart", () => {
|
|
77
|
+
expect(ambientKeys.sort()).toEqual(["DP_AMB", "RH_AMB", "T_AMB"]);
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
test.each(ambientKeys)("%s pairs with its bare parameter on unit and type", (key) => {
|
|
81
|
+
const bare = PARAMETERS[key.replace(/_AMB$/, "")];
|
|
82
|
+
expect(bare).toBeDefined();
|
|
83
|
+
expect(PARAMETERS[key].unit).toBe(bare.unit);
|
|
84
|
+
expect(PARAMETERS[key].type).toBe(bare.type);
|
|
85
|
+
});
|
|
72
86
|
});
|
|
73
87
|
|
|
74
88
|
describe("HEAVY_METALS", () => {
|