From d3f2fc5615ee5c751eaf2f5313b5a49c5046bc2c Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Sat, 10 Jan 2026 09:22:18 -0500 Subject: [PATCH] Add MP1 constituent --- packages/tide-predictor/src/constituents/MP1.ts | 14 ++++++++++++++ .../tide-predictor/test/constituents/index.test.ts | 5 +++++ 2 files changed, 19 insertions(+) create mode 100644 packages/tide-predictor/src/constituents/MP1.ts diff --git a/packages/tide-predictor/src/constituents/MP1.ts b/packages/tide-predictor/src/constituents/MP1.ts new file mode 100644 index 0000000..f6ef8e0 --- /dev/null +++ b/packages/tide-predictor/src/constituents/MP1.ts @@ -0,0 +1,14 @@ +import { defineCompoundConstituent } from "./definition.js"; +import M2 from "./M2.js"; +import P1 from "./P1.js"; + +/** + * Solar-lunar diurnal (MP1 = M2 - P1). + * Combined solar and lunar diurnal constituent from solar-lunar interaction. + * Amplitude typically small; usually <5% of K1. + * Rarely significant except in specialized harmonic analyses. + */ +export default defineCompoundConstituent("MP1", [ + { constituent: M2, factor: 1 }, + { constituent: P1, factor: -1 }, +]); diff --git a/packages/tide-predictor/test/constituents/index.test.ts b/packages/tide-predictor/test/constituents/index.test.ts index 47e4780..3028677 100644 --- a/packages/tide-predictor/test/constituents/index.test.ts +++ b/packages/tide-predictor/test/constituents/index.test.ts @@ -145,4 +145,9 @@ describe("Base constituent definitions", () => { expect(constituents["2MO5"]).toBeDefined(); expect(constituents["2MO5"].speed(testAstro)).toBeCloseTo(71.911244, 6); }); + + it("has correct properties for MP1 (solar-lunar diurnal)", () => { + expect(constituents.MP1).toBeDefined(); + expect(constituents.MP1.speed(testAstro)).toBeCloseTo(14.0251729, 7); + }); });