get_satellite_position
Track and retrieve the real-time position of a satellite based on an observer's location using latitude, longitude, and NORAD ID; supports future prediction up to 300 seconds.
Instructions
Get current position of a satellite relative to an observer location
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| noradId | Yes | NORAD catalog number of the satellite | |
| observerAlt | No | Observer altitude in meters above sea level | |
| observerLat | Yes | Observer latitude in degrees | |
| observerLng | Yes | Observer longitude in degrees | |
| seconds | No | Number of seconds in the future for prediction (max 300) |
Implementation Reference
- src/server.ts:922-941 (handler)The main handler function that validates the input arguments, fetches the satellite positions using N2YOClient, and returns the result as JSON.private async getSatellitePosition(args: any): Promise<CallToolResult> { SatelliteValidator.validatePositionRequest(args); const positions = await this.n2yoClient.getPositions( args.noradId, args.observerLat, args.observerLng, args.observerAlt || 0, args.seconds || 0 ); return { content: [ { type: "text", text: JSON.stringify({ positions, count: positions.length }, null, 2), }, ], }; }
- src/server.ts:140-172 (schema)Input schema defining parameters for the tool including noradId, observer location, and optional altitude/seconds.inputSchema: { type: "object", properties: { noradId: { type: "string", description: "NORAD catalog number of the satellite", }, observerLat: { type: "number", description: "Observer latitude in degrees", minimum: -90, maximum: 90, }, observerLng: { type: "number", description: "Observer longitude in degrees", minimum: -180, maximum: 180, }, observerAlt: { type: "number", description: "Observer altitude in meters above sea level", default: 0, }, seconds: { type: "number", description: "Number of seconds in the future for prediction (max 300)", default: 0, maximum: 300, }, }, required: ["noradId", "observerLat", "observerLng"],
- src/server.ts:136-174 (registration)Tool registration in getTools() method, defining name, description, and input schema.{ name: "get_satellite_position", description: "Get current position of a satellite relative to an observer location", inputSchema: { type: "object", properties: { noradId: { type: "string", description: "NORAD catalog number of the satellite", }, observerLat: { type: "number", description: "Observer latitude in degrees", minimum: -90, maximum: 90, }, observerLng: { type: "number", description: "Observer longitude in degrees", minimum: -180, maximum: 180, }, observerAlt: { type: "number", description: "Observer altitude in meters above sea level", default: 0, }, seconds: { type: "number", description: "Number of seconds in the future for prediction (max 300)", default: 0, maximum: 300, }, }, required: ["noradId", "observerLat", "observerLng"], }, },
- src/server.ts:447-449 (helper)Switch case dispatcher in callTool() that routes the tool invocation to the handler method.case "get_satellite_position": return await this.getSatellitePosition(args);