Geometry and visibility¶
Two families of tools cover this:
- Scalar at one epoch — Observation geometry: angular separation, angular size, light time, range rate, sub-observer point, phase angle, illumination fraction
- Windows over a range — Geometry finder: find intervals where a relational constraint is satisfied
When is the Moon visible above 10° from my site?¶
{
"searchWindow": {
"start": { "dateTime": "2024-01-01T00:00:00", "kind": "UTC" },
"end": { "dateTime": "2024-01-08T00:00:00", "kind": "UTC" }
},
"body": "EARTH",
"latitude": 0.7853981633974483,
"longitude": 0.0,
"altitude": 0.0,
"target": "MOON",
"relationalOperator": "Greater",
"value": 0.17453292519943295,
"aberration": "LT+S"
}
Tool: FindElevationFromSiteConstraint. Returns a list of { start, end } windows.
For named DSN ground stations, use the DSN site tools instead.
When does Earth pass between the Moon and the Sun (a lunar eclipse)?¶
{
"searchWindow": {
"start": { "dateTime": "2024-01-01T00:00:00", "kind": "UTC" },
"end": { "dateTime": "2024-12-31T00:00:00", "kind": "UTC" }
},
"observerName": "MOON",
"occultedBody": "SUN",
"occultingBody": "EARTH",
"occultingKind": "Any",
"aberrationCorrection": "None"
}
Tool: FindOccultingConstraint. The same tool covers solar eclipses (observer=EARTH, occulted=SUN, occulting=MOON) and any other occultation between SPICE-backed objects.
Phase angle and illumination¶
{
"observer": "EARTH",
"target": "MOON",
"illuminator": "SUN",
"datetime": "2024-06-21T00:00:00",
"aberration": "LT+S"
}
Tools: ComputePhaseAngle (radians), ComputeIlluminationFraction (0…1). For a "find the new moon / full moon" sweep over a range, use FindPhaseAngleConstraint.
Distance constraint¶
For approach analysis or close-encounter windows, FindDistanceConstraint is the cheapest tool. Example — find every time the Moon is closer than 380000 km from Earth in 2024 (perigee passes):
{
"searchWindow": {
"start": { "dateTime": "2024-01-01T00:00:00", "kind": "UTC" },
"end": { "dateTime": "2025-01-01T00:00:00", "kind": "UTC" }
},
"observerName": "EARTH",
"targetName": "MOON",
"relationalOperator": "Lower",
"value": 380000000,
"aberrationCorrection": "None"
}
Step-size tip¶
All Find*Constraint tools accept an optional stepSizeInSeconds. The default is searchWindow.duration / 3000. Smaller is more accurate but slower; for a yearly sweep 3600 (one hour) is usually enough; for a closer look at a single day, drop to 60–600.