Skip to content

Commit d3f2fc5

Browse files
committed
Add MP1 constituent
1 parent 88cc90d commit d3f2fc5

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineCompoundConstituent } from "./definition.js";
2+
import M2 from "./M2.js";
3+
import P1 from "./P1.js";
4+
5+
/**
6+
* Solar-lunar diurnal (MP1 = M2 - P1).
7+
* Combined solar and lunar diurnal constituent from solar-lunar interaction.
8+
* Amplitude typically small; usually <5% of K1.
9+
* Rarely significant except in specialized harmonic analyses.
10+
*/
11+
export default defineCompoundConstituent("MP1", [
12+
{ constituent: M2, factor: 1 },
13+
{ constituent: P1, factor: -1 },
14+
]);

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,9 @@ describe("Base constituent definitions", () => {
145145
expect(constituents["2MO5"]).toBeDefined();
146146
expect(constituents["2MO5"].speed(testAstro)).toBeCloseTo(71.911244, 6);
147147
});
148+
149+
it("has correct properties for MP1 (solar-lunar diurnal)", () => {
150+
expect(constituents.MP1).toBeDefined();
151+
expect(constituents.MP1.speed(testAstro)).toBeCloseTo(14.0251729, 7);
152+
});
148153
});

0 commit comments

Comments
 (0)