Skip to content

Commit 7497ba2

Browse files
committed
Correct MA2 and MB2
1 parent 0a707d8 commit 7497ba2

3 files changed

Lines changed: 17 additions & 12 deletions

File tree

packages/tide-predictor/src/constituents/MA2.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import nc from "../node-corrections/index.js";
33

44
/**
55
* Lunar variational semi-diurnal constituent (μ2, mu2).
6-
* Doodson Number: 237.555
6+
* Doodson Number: 545.555
77
* Derived from Moon's orbital parameter variations; speed 27.968°/h with period ~12.87 hours.
88
* Uses M2 nodal factors with complex variable modulation.
99
*
@@ -12,4 +12,4 @@ import nc from "../node-corrections/index.js";
1212
*
1313
* @see https://iho.int/en/standards-and-specifications/standards/s-14 IHO Tidal Constituent Bank
1414
*/
15-
export default defineConstituent("MA2", [2, -2, 2, 0, 0, 0, 0], nc.uM2, nc.fM2);
15+
export default defineConstituent("MA2", [2, 0, -1, 0, 0, 0, 0], nc.uM2, nc.fM2);

packages/tide-predictor/src/constituents/MB2.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@ import nc from "../node-corrections/index.js";
33

44
/**
55
* Lunar elliptic constituent from parameter variations.
6-
* Doodson Number: ~237 (lunar parameter variant)
6+
* Doodson Number: ~565.555
77
* Speed ~27.9°/h with period ~12.9 hours.
88
* Uses M2 nodal factors (fM2/uM2).
99
*
10-
* Warning: Not consistently defined across all sources; may be regional or application-specific.
11-
* Definition and amplitude vary significantly between NOAA, IHO, and Schureman references.
10+
* From https://iho.int/mtg_docs/com_wg/IHOTC/IHOTC_Misc/TWCWG_Constituent_list.pdf:
11+
*
12+
* > MB2 was originally called Ma2 but this became ambiguous when spoken, or typed on
13+
* > computers without lower case, and so it was initially changed to MA2*. However, this
14+
* > in turn was thought to be clumsy and hence MB2 was finally adopted. Although
15+
* > theoretically they should have the same values of u and f as M2, they are so small
16+
* > that they are commonly treated as having values of u = 0 and f = 1.
1217
*
1318
* @see Schureman, P. (1958). Manual of Harmonic Analysis and Prediction of Tides
1419
*/
15-
export default defineConstituent("MB2", [2, -2, 2, 0, 0, 0, 0], nc.uM2, nc.fM2);
20+
export default defineConstituent("MB2", [2, 0, 1, 0, 0, 0, 0], nc.uM2, nc.fM2);

packages/tide-predictor/test/constituents/index.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ describe("Base constituent definitions", () => {
5151
});
5252

5353
it("has correct properties for MA2 (lunar variational semi-diurnal, mu2)", () => {
54-
// MA2: [2, 0, -2, 1, 0, 0, 0]
55-
// Speed: 2(T+h-s) - 2h + p ≈ 27.968208°/h
54+
// MA2: [2, 0, -1, 0, 0, 0, 0]
55+
// Speed: 2(T+h-s) - 2h + p ≈ 28.943°/h
5656
expect(constituents.MA2).toBeDefined();
57-
expect(constituents.MA2.speed(testAstro)).toBeCloseTo(27.968208, 2);
57+
expect(constituents.MA2.speed(testAstro)).toBeCloseTo(28.943, 3);
5858
expect(constituents.MA2.u(testAstro)).toBeCloseTo(constituents.M2.u(testAstro), 2);
5959
expect(constituents.MA2.f(testAstro)).toBeCloseTo(constituents.M2.f(testAstro), 3);
6060
});
6161

6262
it("has correct properties for MB2 (lunar elliptic parameter variation)", () => {
63-
// MB2: [2, 0, -3, 1, 0, 1, 0]
64-
// Speed: 2(T+h-s) - 3h + p + p' ≈ 27.968°/h
63+
// MB2: [2, 0, 1, 0, 0, 0, 0]
64+
// Speed: 2(T+h-s) - 3h + p + p' ≈ 29.025°/h
6565
expect(constituents.MB2).toBeDefined();
66-
expect(constituents.MB2.speed(testAstro)).toBeCloseTo(27.968, 2);
66+
expect(constituents.MB2.speed(testAstro)).toBeCloseTo(29.025, 2);
6767
expect(constituents.MB2.u(testAstro)).toBeCloseTo(constituents.M2.u(testAstro), 2);
6868
expect(constituents.MB2.f(testAstro)).toBeCloseTo(constituents.M2.f(testAstro), 3);
6969
});

0 commit comments

Comments
 (0)