@cyanheads/astronomy-mcp-server 0.2.0 → 0.2.1
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/AGENTS.md +1 -1
- package/CLAUDE.md +1 -1
- package/README.md +7 -4
- package/changelog/0.2.x/0.2.1.md +14 -0
- package/dist/mcp-server/tools/definitions/get-ephemeris.tool.d.ts +16 -0
- package/dist/mcp-server/tools/definitions/get-ephemeris.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-ephemeris.tool.js +68 -8
- package/dist/mcp-server/tools/definitions/get-ephemeris.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-satellite-passes.tool.d.ts +7 -2
- package/dist/mcp-server/tools/definitions/get-satellite-passes.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-satellite-passes.tool.js +10 -4
- package/dist/mcp-server/tools/definitions/get-satellite-passes.tool.js.map +1 -1
- package/dist/services/satellite/satellite-service.d.ts +20 -2
- package/dist/services/satellite/satellite-service.d.ts.map +1 -1
- package/dist/services/satellite/satellite-service.js +85 -6
- package/dist/services/satellite/satellite-service.js.map +1 -1
- package/package.json +1 -1
- package/server.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** astronomy-mcp-server
|
|
4
|
-
**Version:** 0.2.
|
|
4
|
+
**Version:** 0.2.1
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.11.0`
|
|
6
6
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
|
package/CLAUDE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** astronomy-mcp-server
|
|
4
|
-
**Version:** 0.2.
|
|
4
|
+
**Version:** 0.2.1
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.11.0`
|
|
6
6
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/astronomy-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/astronomy-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -94,9 +94,9 @@ Time-series ephemeris for a small body or spacecraft via the keyless JPL Horizon
|
|
|
94
94
|
- **Periodic comet** — DES + closest-apparition flag: `"DES=1P;CAP"` (Halley), `"DES=2P;CAP"` (Encke)
|
|
95
95
|
- **Spacecraft** — negative SPK-ID: `"-48"` (Hubble)
|
|
96
96
|
- A bare name like `"433 Eros"` or `"1P/Halley"` returns no match or an ambiguous record list and is rejected. Look up designations at [ssd.jpl.nasa.gov/tools/sbdb_lookup.html](https://ssd.jpl.nasa.gov/tools/sbdb_lookup.html).
|
|
97
|
-
- `start`/`stop` are ISO 8601 UTC
|
|
98
|
-
- Supplying observer `latitude`/`longitude` yields topocentric coordinates and adds alt/az
|
|
99
|
-
- Large spans truncate inline at 200 rows
|
|
97
|
+
- `start`/`stop` are ISO 8601 UTC and `stop` must be after `start`; `step` is a positive count plus a unit of `m`, `h`, `d`, `mo`, or `y` (`"10m"`, `"1h"`, `"1d"`)
|
|
98
|
+
- Supplying observer `latitude`/`longitude` yields topocentric coordinates and adds alt/az — pass both or neither; one alone is rejected rather than silently downgraded to a geocentric query
|
|
99
|
+
- Large spans truncate inline at 200 rows, and the disclosure carries the instant the returned rows end at. Re-call with `start` at that instant, or split the range into smaller adjacent spans — keep the same `step` and repeat until `truncated` is `false`, which reconstructs every sample. Widening the step discards samples the original range asked for
|
|
100
100
|
|
|
101
101
|
---
|
|
102
102
|
|
|
@@ -107,6 +107,9 @@ Visible passes of a satellite over an observer. Registered only when `ASTRONOMY_
|
|
|
107
107
|
- Fetches the current TLE from CelesTrak by NORAD catalog number (e.g. `25544` for the ISS) and propagates it with SGP4 in-process
|
|
108
108
|
- Returns each pass's rise, peak, and set times with azimuths and the peak elevation
|
|
109
109
|
- Only naked-eye-plausible passes are returned — the satellite must be sunlit at peak while the observer's sky is dark
|
|
110
|
+
- Every returned pass rises inside the requested window. A pass already underway at `start` is omitted rather than reported with `start` as its `rise_utc`; move `start` earlier to see it. A pass rising exactly at `start` is kept, so feeding a reported `rise_utc` back as `start` never loses it
|
|
111
|
+
- An element set that will not propagate to the window is rejected by name — as a reentry when the window sits near the element set's epoch, otherwise as a `start` too far from it — so an empty `passes` list means only "no visible passes in this window"
|
|
112
|
+
- `start` must be within about a month of today: an element set describes the orbit for weeks around its epoch, and CelesTrak publishes only current ones
|
|
110
113
|
- NORAD catalog numbers are found at [celestrak.org](https://celestrak.org) or [heavens-above.com](https://heavens-above.com)
|
|
111
114
|
- Searches the next `days` (default 7, max 10); optional observer-local pass times
|
|
112
115
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "astronomy_get_ephemeris dropped its truncation notice and let a lone observer coordinate, backwards time range, or malformed step reach Horizons; astronomy_get_satellite_passes reported a mid-pass start as a false acquisition time and returned an empty pass list for element sets that can't reach the requested window — all fixed."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.2.1 — 2026-07-30
|
|
8
|
+
|
|
9
|
+
## Fixed
|
|
10
|
+
|
|
11
|
+
- **`astronomy_get_ephemeris`** — the truncation-disclosure notice was computed but never reached a client: it wasn't declared in the `enrichment` block, so the effective-output parse stripped it from both `structuredContent` and `content[]`. `notice` is now a declared enrichment field, populated via `ctx.enrich.truncated({ shown, cap, guidance })`; the guidance names the exact instant the returned rows end at and tells the caller to re-call from there or split the range into smaller adjacent spans at the same step, rather than widening the step and losing samples. ([#11](https://github.com/cyanheads/astronomy-mcp-server/issues/11))
|
|
12
|
+
- **`astronomy_get_ephemeris`** — a lone `latitude` or `longitude` silently fell through to a geocentric query, dropping the observer and its alt/az columns; a `stop` at or before `start` and a malformed `step` were both forwarded to Horizons instead of rejected locally. All three now fail fast with dedicated `incomplete_observer`, `invalid_time_range`, and `invalid_step` contract entries before any upstream request. The step pattern accepts every calendar unit Horizons supports — `m`, `h`, `d`, `mo`, `y` — not just the three the description previously used as examples. ([#13](https://github.com/cyanheads/astronomy-mcp-server/issues/13))
|
|
13
|
+
- **`astronomy_get_satellite_passes`** — a window opening mid-pass reported `start` as the pass's `rise_utc` with a clipped duration instead of the satellite's real acquisition time. `predictPasses` now requires a genuine below-to-above transition (checking the sample one step before `start`) before opening a pass, so a pass already underway is omitted — a pass rising exactly at `start` is still kept, so feeding a previously reported `rise_utc` back in as `start` never loses it. ([#12](https://github.com/cyanheads/astronomy-mcp-server/issues/12))
|
|
14
|
+
- **`astronomy_get_satellite_passes`** — an element set SGP4 can no longer propagate (a reentered object, or a `start` outside the set's validity window) silently produced `passes: []`, indistinguishable from "nothing visible tonight." `predictPasses` now probes the first instant of the window and rejects up front, naming the cause by epoch distance: `object_decayed` when the window sits within about a month of the element set's epoch, `time_out_of_range` when `start` is further out. `communityDecayCheckEnabled: true` is set on every `propagate()` call. ([#17](https://github.com/cyanheads/astronomy-mcp-server/issues/17))
|
|
@@ -43,6 +43,21 @@ export declare const getEphemerisTool: import("@cyanheads/mcp-ts-core").ToolDefi
|
|
|
43
43
|
readonly code: JsonRpcErrorCode.InvalidParams;
|
|
44
44
|
readonly when: "The start or stop timestamp is not a parseable ISO 8601 instant.";
|
|
45
45
|
readonly recovery: "Pass start and stop as ISO 8601 UTC timestamps, e.g. 2024-01-01T00:00:00Z, then retry.";
|
|
46
|
+
}, {
|
|
47
|
+
readonly reason: "invalid_time_range";
|
|
48
|
+
readonly code: JsonRpcErrorCode.InvalidParams;
|
|
49
|
+
readonly when: "The resolved stop instant is at or before the resolved start instant.";
|
|
50
|
+
readonly recovery: "Pass a stop that is later than start, or omit stop for a 24-hour span, then retry.";
|
|
51
|
+
}, {
|
|
52
|
+
readonly reason: "incomplete_observer";
|
|
53
|
+
readonly code: JsonRpcErrorCode.InvalidParams;
|
|
54
|
+
readonly when: "Exactly one of latitude and longitude was supplied.";
|
|
55
|
+
readonly recovery: "Supply latitude and longitude together for a topocentric ephemeris, or omit both for a geocentric one.";
|
|
56
|
+
}, {
|
|
57
|
+
readonly reason: "invalid_step";
|
|
58
|
+
readonly code: JsonRpcErrorCode.InvalidParams;
|
|
59
|
+
readonly when: "The step is not a positive count followed by a unit of m, h, d, mo, or y.";
|
|
60
|
+
readonly recovery: "Pass step as a count plus m, h, d, mo, or y — for example \"10m\", \"1h\", or \"1d\" — then retry.";
|
|
46
61
|
}, {
|
|
47
62
|
readonly reason: "body_not_found";
|
|
48
63
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
@@ -58,5 +73,6 @@ export declare const getEphemerisTool: import("@cyanheads/mcp-ts-core").ToolDefi
|
|
|
58
73
|
readonly truncated: z.ZodBoolean;
|
|
59
74
|
readonly shown: z.ZodNumber;
|
|
60
75
|
readonly cap: z.ZodNumber;
|
|
76
|
+
readonly notice: z.ZodOptional<z.ZodString>;
|
|
61
77
|
}>;
|
|
62
78
|
//# sourceMappingURL=get-ephemeris.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-ephemeris.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-ephemeris.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"get-ephemeris.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-ephemeris.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAiBjE,eAAO,MAAM,eAAe;;;;;;;;;;;iBA8B1B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAElE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuN3B,CAAC"}
|
|
@@ -9,6 +9,16 @@ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
|
9
9
|
import { getHorizonsService } from '../../../services/horizons/horizons-service.js';
|
|
10
10
|
/** Inline ephemeris-row cap disclosed via enrichment — mirrors HorizonsService MAX_ROWS. */
|
|
11
11
|
const INLINE_ROW_CAP = 200;
|
|
12
|
+
/**
|
|
13
|
+
* Accepted `step` shape: a positive count followed by one of Horizons' calendar step
|
|
14
|
+
* units — m (minutes), h (hours), d (days), mo (months), y (years). `mo` precedes `m`
|
|
15
|
+
* in the alternation so "1mo" reads as months rather than a minute step with a stray
|
|
16
|
+
* character. An optional single space is tolerated because Horizons itself writes
|
|
17
|
+
* "1 d". Anything else — a bare number, an unsupported unit, or free text — is a
|
|
18
|
+
* caller mistake that would otherwise be spent on an upstream request and come back
|
|
19
|
+
* mislabelled as a Horizons outage.
|
|
20
|
+
*/
|
|
21
|
+
const STEP_PATTERN = /^[1-9]\d* ?(?:mo|[mhdy])$/i;
|
|
12
22
|
export const EphemerisOutput = z.object({
|
|
13
23
|
designation: z.string().describe('The body designation echoed from the request.'),
|
|
14
24
|
points: z
|
|
@@ -36,7 +46,7 @@ export const EphemerisOutput = z.object({
|
|
|
36
46
|
});
|
|
37
47
|
export const getEphemerisTool = tool('astronomy_get_ephemeris', {
|
|
38
48
|
title: 'astronomy-mcp-server: get small-body ephemeris',
|
|
39
|
-
description: 'Fetch a time-series ephemeris for a small body (asteroid or comet) or spacecraft from JPL Horizons — RA/Dec, distance, and apparent magnitude over a span, optionally with observer-relative altitude/azimuth. This covers objects the in-process major-body set cannot. The designation is passed to Horizons verbatim, so it must be in a form Horizons resolves to a single record: a numbered asteroid takes a trailing-semicolon record lookup (e.g. "433;" for Eros, "1;" for Ceres), and a periodic comet takes the DES + closest-apparition form (e.g. "DES=1P;CAP" for Halley) — a bare name like "433 Eros" or "1P/Halley" returns no match or an ambiguous record list and is rejected. Spacecraft take their negative SPK-ID. `start` and `stop` are ISO 8601 UTC
|
|
49
|
+
description: 'Fetch a time-series ephemeris for a small body (asteroid or comet) or spacecraft from JPL Horizons — RA/Dec, distance, and apparent magnitude over a span, optionally with observer-relative altitude/azimuth. This covers objects the in-process major-body set cannot. The designation is passed to Horizons verbatim, so it must be in a form Horizons resolves to a single record: a numbered asteroid takes a trailing-semicolon record lookup (e.g. "433;" for Eros, "1;" for Ceres), and a periodic comet takes the DES + closest-apparition form (e.g. "DES=1P;CAP" for Halley) — a bare name like "433 Eros" or "1P/Halley" returns no match or an ambiguous record list and is rejected. Spacecraft take their negative SPK-ID. `start` and `stop` are ISO 8601 UTC and `stop` must be after `start`; `step` is a count plus a unit of m, h, d, mo, or y, such as "1d", "1h", or "10m". Supplying observer latitude/longitude yields topocentric coordinates and adds alt/az — supply both or neither. This is a gated, network-backed extension (JPL Horizons is keyless but rate-limited and best-effort); large spans truncate inline at 200 rows, and the truncation notice carries the instant to resume from — re-call from there, or split the range into smaller adjacent spans, keeping the same step so no sample is lost.',
|
|
40
50
|
annotations: { readOnlyHint: true, openWorldHint: true, idempotentHint: true },
|
|
41
51
|
input: z.object({
|
|
42
52
|
designation: z
|
|
@@ -48,13 +58,13 @@ export const getEphemerisTool = tool('astronomy_get_ephemeris', {
|
|
|
48
58
|
.min(-90)
|
|
49
59
|
.max(90)
|
|
50
60
|
.optional()
|
|
51
|
-
.describe('Observer latitude in decimal degrees — supply with longitude for topocentric coordinates and alt/az.'),
|
|
61
|
+
.describe('Observer latitude in decimal degrees — supply together with longitude for topocentric coordinates and alt/az. Supplying one without the other is rejected.'),
|
|
52
62
|
longitude: z
|
|
53
63
|
.number()
|
|
54
64
|
.min(-180)
|
|
55
65
|
.max(180)
|
|
56
66
|
.optional()
|
|
57
|
-
.describe('Observer longitude in decimal degrees.'),
|
|
67
|
+
.describe('Observer longitude in decimal degrees. Supply together with latitude; one without the other is rejected.'),
|
|
58
68
|
elevation: z
|
|
59
69
|
.number()
|
|
60
70
|
.default(0)
|
|
@@ -66,17 +76,21 @@ export const getEphemerisTool = tool('astronomy_get_ephemeris', {
|
|
|
66
76
|
stop: z
|
|
67
77
|
.string()
|
|
68
78
|
.optional()
|
|
69
|
-
.describe('Ephemeris stop as an ISO 8601 UTC string. Defaults to 24 hours after start.'),
|
|
79
|
+
.describe('Ephemeris stop as an ISO 8601 UTC string, and must be later than start. Defaults to 24 hours after start.'),
|
|
70
80
|
step: z
|
|
71
81
|
.string()
|
|
72
82
|
.default('1h')
|
|
73
|
-
.describe('
|
|
83
|
+
.describe('Step size as a positive count plus a unit of m (minutes), h (hours), d (days), mo (months), or y (years), e.g. "10m", "1h", "1d". Default "1h".'),
|
|
74
84
|
}),
|
|
75
85
|
output: EphemerisOutput,
|
|
76
86
|
enrichment: {
|
|
77
87
|
truncated: z.boolean().describe('True when Horizons returned more rows than the inline cap.'),
|
|
78
88
|
shown: z.number().describe('Number of ephemeris rows returned.'),
|
|
79
89
|
cap: z.number().describe('The inline row cap that was applied.'),
|
|
90
|
+
notice: z
|
|
91
|
+
.string()
|
|
92
|
+
.optional()
|
|
93
|
+
.describe('How to retrieve the omitted rows, present only when the result was truncated.'),
|
|
80
94
|
},
|
|
81
95
|
errors: [
|
|
82
96
|
{
|
|
@@ -85,6 +99,24 @@ export const getEphemerisTool = tool('astronomy_get_ephemeris', {
|
|
|
85
99
|
when: 'The start or stop timestamp is not a parseable ISO 8601 instant.',
|
|
86
100
|
recovery: 'Pass start and stop as ISO 8601 UTC timestamps, e.g. 2024-01-01T00:00:00Z, then retry.',
|
|
87
101
|
},
|
|
102
|
+
{
|
|
103
|
+
reason: 'invalid_time_range',
|
|
104
|
+
code: JsonRpcErrorCode.InvalidParams,
|
|
105
|
+
when: 'The resolved stop instant is at or before the resolved start instant.',
|
|
106
|
+
recovery: 'Pass a stop that is later than start, or omit stop for a 24-hour span, then retry.',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
reason: 'incomplete_observer',
|
|
110
|
+
code: JsonRpcErrorCode.InvalidParams,
|
|
111
|
+
when: 'Exactly one of latitude and longitude was supplied.',
|
|
112
|
+
recovery: 'Supply latitude and longitude together for a topocentric ephemeris, or omit both for a geocentric one.',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
reason: 'invalid_step',
|
|
116
|
+
code: JsonRpcErrorCode.InvalidParams,
|
|
117
|
+
when: 'The step is not a positive count followed by a unit of m, h, d, mo, or y.',
|
|
118
|
+
recovery: 'Pass step as a count plus m, h, d, mo, or y — for example "10m", "1h", or "1d" — then retry.',
|
|
119
|
+
},
|
|
88
120
|
{
|
|
89
121
|
reason: 'body_not_found',
|
|
90
122
|
code: JsonRpcErrorCode.NotFound,
|
|
@@ -115,7 +147,25 @@ export const getEphemerisTool = tool('astronomy_get_ephemeris', {
|
|
|
115
147
|
}
|
|
116
148
|
const start = input.start ?? new Date().toISOString();
|
|
117
149
|
const stop = input.stop ?? new Date(new Date(start).getTime() + 24 * 3600 * 1000).toISOString();
|
|
118
|
-
|
|
150
|
+
if (new Date(stop).getTime() <= new Date(start).getTime()) {
|
|
151
|
+
throw ctx.fail('invalid_time_range', `stop "${stop}" is not after start "${start}".`, {
|
|
152
|
+
...ctx.recoveryFor('invalid_time_range'),
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* A lone coordinate used to fall through to a geocentric query, silently dropping
|
|
157
|
+
* the observer the caller asked for along with the alt/az columns it would have
|
|
158
|
+
* produced. Reject the pair instead of reinterpreting the request.
|
|
159
|
+
*/
|
|
160
|
+
const hasLatitude = input.latitude !== undefined;
|
|
161
|
+
const hasLongitude = input.longitude !== undefined;
|
|
162
|
+
if (hasLatitude !== hasLongitude) {
|
|
163
|
+
throw ctx.fail('incomplete_observer', `Observer ${hasLatitude ? 'latitude' : 'longitude'} was supplied without ${hasLatitude ? 'longitude' : 'latitude'}.`, { ...ctx.recoveryFor('incomplete_observer') });
|
|
164
|
+
}
|
|
165
|
+
if (!STEP_PATTERN.test(input.step)) {
|
|
166
|
+
throw ctx.fail('invalid_step', `Invalid step "${input.step}". Expected a positive count plus m, h, or d, e.g. "10m".`, { ...ctx.recoveryFor('invalid_step') });
|
|
167
|
+
}
|
|
168
|
+
const observer = input.latitude !== undefined && input.longitude !== undefined
|
|
119
169
|
? { latitude: input.latitude, longitude: input.longitude, elevation: input.elevation }
|
|
120
170
|
: undefined;
|
|
121
171
|
const result = await svc.ephemeris(input.designation, start, stop, input.step, ctx, observer);
|
|
@@ -127,10 +177,20 @@ export const getEphemerisTool = tool('astronomy_get_ephemeris', {
|
|
|
127
177
|
* Emit the truncation enrichment on every call — the declared block requires
|
|
128
178
|
* `truncated`/`shown`/`cap`, so a non-truncated result must still populate them
|
|
129
179
|
* or the effective-output parse fails. INLINE_ROW_CAP mirrors the service's MAX_ROWS.
|
|
180
|
+
* The truncated branch goes through `ctx.enrich.truncated`, which writes those
|
|
181
|
+
* three fields plus the `notice` carrying the retrieval loop.
|
|
130
182
|
*/
|
|
131
|
-
ctx.enrich({ truncated: result.truncated, shown: result.points.length, cap: INLINE_ROW_CAP });
|
|
132
183
|
if (result.truncated) {
|
|
133
|
-
|
|
184
|
+
// A truncated result is a full page, so its last row is the exact resume instant.
|
|
185
|
+
const resumeFrom = result.points.at(-1)?.timeUtc;
|
|
186
|
+
ctx.enrich.truncated({
|
|
187
|
+
shown: result.points.length,
|
|
188
|
+
cap: INLINE_ROW_CAP,
|
|
189
|
+
guidance: `Capped at ${INLINE_ROW_CAP} rows${resumeFrom ? `, ending at ${resumeFrom}` : ''}. To retrieve the omitted samples, re-call with start set to that instant, or split the requested range into smaller adjacent spans; keep the same step either way and repeat until truncated is false. Widening the step is not equivalent — it discards samples the original range asked for.`,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
ctx.enrich({ truncated: false, shown: result.points.length, cap: INLINE_ROW_CAP });
|
|
134
194
|
}
|
|
135
195
|
const out = {
|
|
136
196
|
designation: result.designation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-ephemeris.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-ephemeris.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,4FAA4F;AAC5F,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;IACjF,MAAM,EAAE,CAAC;SACN,KAAK,CACJ,CAAC;SACE,MAAM,CAAC;QACN,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;QAC9D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAA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AC,CAAC,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,CACzL,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -58,13 +58,18 @@ export declare const getSatellitePassesTool: import("@cyanheads/mcp-ts-core").To
|
|
|
58
58
|
}, {
|
|
59
59
|
readonly reason: "time_out_of_range";
|
|
60
60
|
readonly code: JsonRpcErrorCode.InvalidParams;
|
|
61
|
-
readonly when: "The start instant is outside the SGP4 high-accuracy span (≈1900–2100).";
|
|
62
|
-
readonly recovery: "
|
|
61
|
+
readonly when: "The start instant is outside the SGP4 high-accuracy span (≈1900–2100), or too far from the epoch of the current element set for SGP4 to reach.";
|
|
62
|
+
readonly recovery: "Request a start within about a month of today — element sets only describe the orbit for weeks around their epoch.";
|
|
63
63
|
}, {
|
|
64
64
|
readonly reason: "tle_not_found";
|
|
65
65
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
66
66
|
readonly when: "CelesTrak has no current element set for the NORAD ID.";
|
|
67
67
|
readonly recovery: "Verify the catalog number at celestrak.org; the object may have decayed or never been catalogued.";
|
|
68
|
+
}, {
|
|
69
|
+
readonly reason: "object_decayed";
|
|
70
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
71
|
+
readonly when: "A current element set will not propagate to a window near its own epoch — the signature of an object that has reentered.";
|
|
72
|
+
readonly recovery: "Pick an object that is still in orbit; confirm its status at celestrak.org before requesting passes.";
|
|
68
73
|
}, {
|
|
69
74
|
readonly reason: "celestrak_unavailable";
|
|
70
75
|
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-satellite-passes.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-satellite-passes.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKjE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;iBAqDhC,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE9E,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"get-satellite-passes.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-satellite-passes.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKjE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;iBAqDhC,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE9E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2JjC,CAAC"}
|
|
@@ -53,7 +53,7 @@ export const SatellitePassesOutput = z.object({
|
|
|
53
53
|
});
|
|
54
54
|
export const getSatellitePassesTool = tool('astronomy_get_satellite_passes', {
|
|
55
55
|
title: 'astronomy-mcp-server: get satellite passes',
|
|
56
|
-
description: "Predict visible passes of a satellite (e.g. the ISS, NORAD 25544) over an observer in the next `days`. Fetches the current TLE from CelesTrak, propagates it with SGP4 in-process, and returns each pass's rise, peak, and set times with azimuths and the peak elevation. Only passes that are naked-eye-plausible are returned — the satellite must be sunlit at peak while the observer's sky is dark. NORAD catalog numbers are found at celestrak.org or heavens-above.com. This is a gated, network-backed extension (CelesTrak is keyless but rate-limited; TLEs are cached briefly). Default elevation 0 m; pass an IANA timezone for observer-local pass times.",
|
|
56
|
+
description: "Predict visible passes of a satellite (e.g. the ISS, NORAD 25544) over an observer in the next `days`. Fetches the current TLE from CelesTrak, propagates it with SGP4 in-process, and returns each pass's rise, peak, and set times with azimuths and the peak elevation. Only passes that are naked-eye-plausible are returned — the satellite must be sunlit at peak while the observer's sky is dark. Every returned pass rises within the requested window: a pass already underway at `start` is omitted rather than reported with `start` as its rise, so back up `start` to see it. An element set that will not propagate to the window is rejected by name rather than returning an empty list, so an empty `passes` means only that nothing was visible. `start` must be within about a month of today — an element set describes the orbit for weeks around its epoch and cannot be propagated further. NORAD catalog numbers are found at celestrak.org or heavens-above.com. This is a gated, network-backed extension (CelesTrak is keyless but rate-limited; TLEs are cached briefly). Default elevation 0 m; pass an IANA timezone for observer-local pass times.",
|
|
57
57
|
annotations: { readOnlyHint: true, openWorldHint: true, idempotentHint: true },
|
|
58
58
|
input: z.object({
|
|
59
59
|
norad_id: z
|
|
@@ -85,7 +85,7 @@ export const getSatellitePassesTool = tool('astronomy_get_satellite_passes', {
|
|
|
85
85
|
start: z
|
|
86
86
|
.string()
|
|
87
87
|
.optional()
|
|
88
|
-
.describe('Search start as an ISO 8601 UTC string. Defaults to now.'),
|
|
88
|
+
.describe('Search start as an ISO 8601 UTC string, within about a month of today — the current element set cannot be propagated further. Defaults to now.'),
|
|
89
89
|
timezone: z
|
|
90
90
|
.string()
|
|
91
91
|
.optional()
|
|
@@ -105,8 +105,8 @@ export const getSatellitePassesTool = tool('astronomy_get_satellite_passes', {
|
|
|
105
105
|
{
|
|
106
106
|
reason: 'time_out_of_range',
|
|
107
107
|
code: JsonRpcErrorCode.InvalidParams,
|
|
108
|
-
when: 'The start instant is outside the SGP4 high-accuracy span (≈1900–2100).',
|
|
109
|
-
recovery: '
|
|
108
|
+
when: 'The start instant is outside the SGP4 high-accuracy span (≈1900–2100), or too far from the epoch of the current element set for SGP4 to reach.',
|
|
109
|
+
recovery: 'Request a start within about a month of today — element sets only describe the orbit for weeks around their epoch.',
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
112
|
reason: 'tle_not_found',
|
|
@@ -114,6 +114,12 @@ export const getSatellitePassesTool = tool('astronomy_get_satellite_passes', {
|
|
|
114
114
|
when: 'CelesTrak has no current element set for the NORAD ID.',
|
|
115
115
|
recovery: 'Verify the catalog number at celestrak.org; the object may have decayed or never been catalogued.',
|
|
116
116
|
},
|
|
117
|
+
{
|
|
118
|
+
reason: 'object_decayed',
|
|
119
|
+
code: JsonRpcErrorCode.NotFound,
|
|
120
|
+
when: 'A current element set will not propagate to a window near its own epoch — the signature of an object that has reentered.',
|
|
121
|
+
recovery: 'Pick an object that is still in orbit; confirm its status at celestrak.org before requesting passes.',
|
|
122
|
+
},
|
|
117
123
|
{
|
|
118
124
|
reason: 'celestrak_unavailable',
|
|
119
125
|
code: JsonRpcErrorCode.ServiceUnavailable,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-satellite-passes.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-satellite-passes.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CA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,CAAC,gEAAgE,CAAC,CAC9E;SACA,QAAQ,CACP,kGAAkG,CACnG;CACJ,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,gCAAgC,EAAE;IAC3E,KAAK,EAAE,4CAA4C;IACnD,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"get-satellite-passes.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-satellite-passes.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mDAAmD,CAAC;IAClF,cAAc,EAAE,CAAC;SACd,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,mDAAmD,CAAC;IAChE,MAAM,EAAE,CAAC;SACN,KAAK,CACJ,CAAC;SACE,MAAM,CAAC;QACN,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,CAAC,6DAA6D,CAAC;QAC1E,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;QAC3E,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qDAAqD,CAAC;QACnF,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,8EAA8E,CAC/E;QACH,UAAU,EAAE,CAAC;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AAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -4,8 +4,12 @@
|
|
|
4
4
|
* process per CelesTrak's refetch guidance), propagates with SGP4 via satellite.js
|
|
5
5
|
* (offline), and returns above-horizon passes. A pass is "visible" only when the
|
|
6
6
|
* satellite is sunlit at peak AND the observer's sky is dark — the ground-darkness
|
|
7
|
-
* gate reuses the core sun-altitude logic.
|
|
8
|
-
*
|
|
7
|
+
* gate reuses the core sun-altitude logic. A pass already underway when the window
|
|
8
|
+
* opens is omitted rather than reported with the query boundary as its rise, and an
|
|
9
|
+
* element set that will not propagate to the window is rejected — naming the object
|
|
10
|
+
* or the requested instant, whichever the epoch distance implicates — rather than
|
|
11
|
+
* yielding no passes. Network-touching code carries its own timeout + retry boundary
|
|
12
|
+
* and degrades loudly; it never substitutes core output.
|
|
9
13
|
* @module services/satellite/satellite-service
|
|
10
14
|
*/
|
|
11
15
|
import type { Context } from '@cyanheads/mcp-ts-core';
|
|
@@ -33,8 +37,22 @@ export declare class SatelliteService {
|
|
|
33
37
|
* Predict visible passes over the next `days` from `start`. Steps the orbit with
|
|
34
38
|
* SGP4, brackets above-horizon intervals, and keeps passes whose peak is sunlit
|
|
35
39
|
* and over a dark-enough ground.
|
|
40
|
+
*
|
|
41
|
+
* Throws when the element set will not propagate to the requested window — as
|
|
42
|
+
* `object_decayed` if the window sits near the element set's epoch, otherwise as
|
|
43
|
+
* `time_out_of_range`. Without that check either condition reaches the caller as
|
|
44
|
+
* `passes: []`, which reads identically to "nothing visible tonight".
|
|
36
45
|
*/
|
|
37
46
|
predictPasses(tle: Tle, noradId: number, observer: ObserverInput, days: number, start: Date, formatLocal?: (d: Date) => string): SatellitePassResult;
|
|
47
|
+
/**
|
|
48
|
+
* Name the reason SGP4 refused the first instant of the window. The refusal on its own
|
|
49
|
+
* is ambiguous: a reentered object and a start far from the element set's epoch both
|
|
50
|
+
* leave the mean elements unable to describe an orbit. Epoch distance separates them —
|
|
51
|
+
* within the horizon the element set is current, so the object is what changed; beyond
|
|
52
|
+
* it the request is, and calling a satellite that is still in orbit decayed would be a
|
|
53
|
+
* false statement with an unfollowable recovery.
|
|
54
|
+
*/
|
|
55
|
+
private classifyPropagationFailure;
|
|
38
56
|
/** Compute look angles (az/el) of the satellite from the observer at one instant. */
|
|
39
57
|
private lookAngles;
|
|
40
58
|
/** True when the satellite is in sunlight (not in Earth's umbra) at the given time. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"satellite-service.d.ts","sourceRoot":"","sources":["../../../src/services/satellite/satellite-service.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"satellite-service.d.ts","sourceRoot":"","sources":["../../../src/services/satellite/satellite-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAqBtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAiB,mBAAmB,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAiC1E,qBAAa,gBAAgB;IAIzB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAL7B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgC;IAEtD,YACmB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EACjC;IAEJ,0EAA0E;IACpE,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CA0C1D;IAED;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IAmB1B,mFAAmF;IACnF,OAAO,CAAC,QAAQ;IA4BhB;;;;;;;;;OASG;IACH,aAAa,CACX,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,IAAI,EACX,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,MAAM,GAChC,mBAAmB,CAuGrB;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,0BAA0B;IAyBlC,qFAAqF;IACrF,OAAO,CAAC,UAAU;IAalB,uFAAuF;IACvF,OAAO,CAAC,QAAQ;IAQhB,+FAA+F;IAC/F,OAAO,CAAC,YAAY;CAMrB;AAMD,6FAA6F;AAC7F,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAEjG;AAED,8DAA8D;AAC9D,wBAAgB,mBAAmB,IAAI,gBAAgB,CAKtD"}
|
|
@@ -4,15 +4,37 @@
|
|
|
4
4
|
* process per CelesTrak's refetch guidance), propagates with SGP4 via satellite.js
|
|
5
5
|
* (offline), and returns above-horizon passes. A pass is "visible" only when the
|
|
6
6
|
* satellite is sunlit at peak AND the observer's sky is dark — the ground-darkness
|
|
7
|
-
* gate reuses the core sun-altitude logic.
|
|
8
|
-
*
|
|
7
|
+
* gate reuses the core sun-altitude logic. A pass already underway when the window
|
|
8
|
+
* opens is omitted rather than reported with the query boundary as its rise, and an
|
|
9
|
+
* element set that will not propagate to the window is rejected — naming the object
|
|
10
|
+
* or the requested instant, whichever the epoch distance implicates — rather than
|
|
11
|
+
* yielding no passes. Network-touching code carries its own timeout + retry boundary
|
|
12
|
+
* and degrades loudly; it never substitutes core output.
|
|
9
13
|
* @module services/satellite/satellite-service
|
|
10
14
|
*/
|
|
11
|
-
import { JsonRpcErrorCode, McpError, notFound, serviceUnavailable, } from '@cyanheads/mcp-ts-core/errors';
|
|
15
|
+
import { invalidParams, JsonRpcErrorCode, McpError, notFound, serviceUnavailable, } from '@cyanheads/mcp-ts-core/errors';
|
|
12
16
|
import { fetchWithTimeout, requestContextService, withRetry } from '@cyanheads/mcp-ts-core/utils';
|
|
13
17
|
import { Body, Equator, Horizon, MakeTime, Observer } from 'astronomy-engine';
|
|
14
18
|
import { ecfToLookAngles, eciToEcf, gstime, jday, propagate, shadowFraction, sunPos, twoline2satrec, } from 'satellite.js';
|
|
15
19
|
const DEG = 180 / Math.PI;
|
|
20
|
+
/**
|
|
21
|
+
* Opt in to satellite.js's community decay check on every propagation. Reference SGP4
|
|
22
|
+
* already refuses most element sets that no longer describe an orbit (eccentricity out
|
|
23
|
+
* of range, or its own decay test), and does so before this check would; the check adds
|
|
24
|
+
* the residual cases where the reference model still returns a numerically well-formed
|
|
25
|
+
* but physically meaningless position. It deviates from reference SGP4 by design — a
|
|
26
|
+
* pass prediction from meaningless state vectors is worse than no prediction.
|
|
27
|
+
*/
|
|
28
|
+
const PROPAGATE_OPTIONS = { communityDecayCheckEnabled: true };
|
|
29
|
+
/** Julian date of the Unix epoch — converts `satrec.jdsatepoch` to milliseconds. */
|
|
30
|
+
const JD_UNIX_EPOCH = 2440587.5;
|
|
31
|
+
/**
|
|
32
|
+
* How far the requested window may sit from the element set's epoch before a refused
|
|
33
|
+
* propagation is attributed to the request rather than to the object. CelesTrak serves
|
|
34
|
+
* element sets refreshed within hours and SGP4 stops describing the orbit within weeks
|
|
35
|
+
* of epoch, so a month comfortably covers any window anchored near the present.
|
|
36
|
+
*/
|
|
37
|
+
const MAX_EPOCH_DISTANCE_DAYS = 30;
|
|
16
38
|
/** Minimum peak elevation (deg) for a pass to count — below this it grazes the horizon. */
|
|
17
39
|
const MIN_PEAK_ELEVATION = 10;
|
|
18
40
|
/** Propagation step in seconds while scanning for passes. */
|
|
@@ -119,9 +141,23 @@ export class SatelliteService {
|
|
|
119
141
|
* Predict visible passes over the next `days` from `start`. Steps the orbit with
|
|
120
142
|
* SGP4, brackets above-horizon intervals, and keeps passes whose peak is sunlit
|
|
121
143
|
* and over a dark-enough ground.
|
|
144
|
+
*
|
|
145
|
+
* Throws when the element set will not propagate to the requested window — as
|
|
146
|
+
* `object_decayed` if the window sits near the element set's epoch, otherwise as
|
|
147
|
+
* `time_out_of_range`. Without that check either condition reaches the caller as
|
|
148
|
+
* `passes: []`, which reads identically to "nothing visible tonight".
|
|
122
149
|
*/
|
|
123
150
|
predictPasses(tle, noradId, observer, days, start, formatLocal) {
|
|
124
151
|
const satrec = twoline2satrec(tle.line1, tle.line2);
|
|
152
|
+
/**
|
|
153
|
+
* Probe the first instant of the window before scanning it. SGP4 refuses an element
|
|
154
|
+
* set it can no longer turn into an orbit by answering null, and the scan loop would
|
|
155
|
+
* silently skip every such timestep and return an empty, falsely-successful pass
|
|
156
|
+
* list. Reject up front instead, naming which of the two causes applies.
|
|
157
|
+
*/
|
|
158
|
+
if (!propagate(satrec, start, PROPAGATE_OPTIONS)) {
|
|
159
|
+
throw this.classifyPropagationFailure(satrec, noradId, start);
|
|
160
|
+
}
|
|
125
161
|
const observerGd = {
|
|
126
162
|
longitude: (observer.longitude * Math.PI) / 180,
|
|
127
163
|
latitude: (observer.latitude * Math.PI) / 180,
|
|
@@ -137,6 +173,18 @@ export class SatelliteService {
|
|
|
137
173
|
let peakAz = 0;
|
|
138
174
|
let peakTime = null;
|
|
139
175
|
let lastAz = 0;
|
|
176
|
+
/**
|
|
177
|
+
* A rise is a below→above transition. When the window opens with the satellite
|
|
178
|
+
* already up, the first sample is the query boundary, not an acquisition —
|
|
179
|
+
* reporting it as `riseUtc` would misstate the rise time, the rise azimuth, and the
|
|
180
|
+
* duration, so that leading partial pass is omitted and reporting starts at the
|
|
181
|
+
* first complete one. Deciding that needs the step *before* `start`: a satellite
|
|
182
|
+
* below the horizon there is rising exactly at `start`, which is a genuine
|
|
183
|
+
* acquisition, and dropping it would lose the pass for any caller who took a
|
|
184
|
+
* previously reported `riseUtc` and passed it back as `start`.
|
|
185
|
+
*/
|
|
186
|
+
const priorLook = this.lookAngles(satrec, new Date(start.getTime() - STEP_SECONDS * 1000), observerGd);
|
|
187
|
+
let sawBelowHorizon = priorLook !== null && priorLook.elevation <= 0;
|
|
140
188
|
for (let i = 0; i <= totalSteps; i++) {
|
|
141
189
|
const t = new Date(start.getTime() + i * STEP_SECONDS * 1000);
|
|
142
190
|
const look = this.lookAngles(satrec, t, observerGd);
|
|
@@ -145,6 +193,8 @@ export class SatelliteService {
|
|
|
145
193
|
const elevationDeg = look.elevation * DEG;
|
|
146
194
|
const azimuthDeg = (((look.azimuth * DEG) % 360) + 360) % 360;
|
|
147
195
|
if (elevationDeg > 0) {
|
|
196
|
+
if (!sawBelowHorizon)
|
|
197
|
+
continue;
|
|
148
198
|
if (!inPass) {
|
|
149
199
|
inPass = true;
|
|
150
200
|
riseTime = t;
|
|
@@ -160,7 +210,10 @@ export class SatelliteService {
|
|
|
160
210
|
}
|
|
161
211
|
lastAz = azimuthDeg;
|
|
162
212
|
}
|
|
163
|
-
else
|
|
213
|
+
else {
|
|
214
|
+
sawBelowHorizon = true;
|
|
215
|
+
if (!inPass)
|
|
216
|
+
continue;
|
|
164
217
|
// Pass just ended at the previous step.
|
|
165
218
|
inPass = false;
|
|
166
219
|
if (riseTime && peakTime && peakElevation >= MIN_PEAK_ELEVATION) {
|
|
@@ -194,9 +247,35 @@ export class SatelliteService {
|
|
|
194
247
|
}
|
|
195
248
|
return { noradId, ...(tle.name ? { satelliteName: tle.name } : {}), passes };
|
|
196
249
|
}
|
|
250
|
+
/**
|
|
251
|
+
* Name the reason SGP4 refused the first instant of the window. The refusal on its own
|
|
252
|
+
* is ambiguous: a reentered object and a start far from the element set's epoch both
|
|
253
|
+
* leave the mean elements unable to describe an orbit. Epoch distance separates them —
|
|
254
|
+
* within the horizon the element set is current, so the object is what changed; beyond
|
|
255
|
+
* it the request is, and calling a satellite that is still in orbit decayed would be a
|
|
256
|
+
* false statement with an unfollowable recovery.
|
|
257
|
+
*/
|
|
258
|
+
classifyPropagationFailure(satrec, noradId, start) {
|
|
259
|
+
const epochMs = (satrec.jdsatepoch - JD_UNIX_EPOCH) * 86400000;
|
|
260
|
+
const distanceDays = Math.abs(start.getTime() - epochMs) / 86400000;
|
|
261
|
+
if (distanceDays > MAX_EPOCH_DISTANCE_DAYS) {
|
|
262
|
+
return invalidParams(`The requested start is ${distanceDays.toFixed(0)} days from the epoch of the current element set for NORAD ID ${noradId}; SGP4 cannot propagate it that far.`, {
|
|
263
|
+
reason: 'time_out_of_range',
|
|
264
|
+
recovery: {
|
|
265
|
+
hint: 'An element set describes the orbit for weeks either side of its epoch — request a start within about a month of today.',
|
|
266
|
+
},
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
return notFound(`NORAD ID ${noradId} has decayed — SGP4 cannot propagate its current element set to the requested window.`, {
|
|
270
|
+
reason: 'object_decayed',
|
|
271
|
+
recovery: {
|
|
272
|
+
hint: 'Pick an object that is still in orbit; confirm its status at celestrak.org before requesting passes.',
|
|
273
|
+
},
|
|
274
|
+
});
|
|
275
|
+
}
|
|
197
276
|
/** Compute look angles (az/el) of the satellite from the observer at one instant. */
|
|
198
277
|
lookAngles(satrec, date, observerGd) {
|
|
199
|
-
const pv = propagate(satrec, date);
|
|
278
|
+
const pv = propagate(satrec, date, PROPAGATE_OPTIONS);
|
|
200
279
|
if (!pv)
|
|
201
280
|
return null;
|
|
202
281
|
const gmst = gstime(date);
|
|
@@ -206,7 +285,7 @@ export class SatelliteService {
|
|
|
206
285
|
}
|
|
207
286
|
/** True when the satellite is in sunlight (not in Earth's umbra) at the given time. */
|
|
208
287
|
isSunlit(satrec, date) {
|
|
209
|
-
const pv = propagate(satrec, date);
|
|
288
|
+
const pv = propagate(satrec, date, PROPAGATE_OPTIONS);
|
|
210
289
|
if (!pv)
|
|
211
290
|
return false;
|
|
212
291
|
const sun = sunPos(jday(date));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"satellite-service.js","sourceRoot":"","sources":["../../../src/services/satellite/satellite-service.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"satellite-service.js","sourceRoot":"","sources":["../../../src/services/satellite/satellite-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,kBAAkB,GACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAClG,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EACL,eAAe,EACf,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,SAAS,EAET,cAAc,EACd,MAAM,EACN,cAAc,GACf,MAAM,cAAc,CAAC;AAItB,MAAM,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC;AAC1B;;;;;;;GAOG;AACH,MAAM,iBAAiB,GAAG,EAAE,0BAA0B,EAAE,IAAI,EAAW,CAAC;AACxE,oFAAoF;AACpF,MAAM,aAAa,GAAG,SAAS,CAAC;AAChC;;;;;GAKG;AACH,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,2FAA2F;AAC3F,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,6DAA6D;AAC7D,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,qGAAqG;AACrG,MAAM,mBAAmB,GAAG,CAAC,CAAC,CAAC;AAO/B,MAAM,OAAO,gBAAgB;IAIR,OAAO;IACP,SAAS;IACT,UAAU;IALZ,KAAK,GAAG,IAAI,GAAG,EAAqB,CAAC;IAEtD,YACmB,OAAe,EACf,SAAiB,EACjB,UAAkB;uBAFlB,OAAO;yBACP,SAAS;0BACT,UAAU;IAC1B,CAAC;IAEJ,0EAA0E;IAC1E,KAAK,CAAC,QAAQ,CAAC,OAAe,EAAE,GAAY;QAC1C,MAAM,MAAM,GAAG,IAA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@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyanheads/astronomy-mcp-server",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"mcpName": "io.github.cyanheads/astronomy-mcp-server",
|
|
5
5
|
"description": "What's in the sky, computed offline — planet and moon positions, rise/set, phases, eclipses, and seasons for any place and time via MCP. STDIO or Streamable HTTP.",
|
|
6
6
|
"type": "module",
|
package/server.json
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
"url": "https://github.com/cyanheads/astronomy-mcp-server",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.1",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
14
14
|
"identifier": "@cyanheads/astronomy-mcp-server",
|
|
15
15
|
"runtimeHint": "bun",
|
|
16
|
-
"version": "0.2.
|
|
16
|
+
"version": "0.2.1",
|
|
17
17
|
"packageArguments": [
|
|
18
18
|
{
|
|
19
19
|
"type": "positional",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
63
63
|
"identifier": "@cyanheads/astronomy-mcp-server",
|
|
64
64
|
"runtimeHint": "bun",
|
|
65
|
-
"version": "0.2.
|
|
65
|
+
"version": "0.2.1",
|
|
66
66
|
"packageArguments": [
|
|
67
67
|
{
|
|
68
68
|
"type": "positional",
|