Geometry finder¶
Source: AI/Tools/GeometryFinderTools.cs
Find time windows inside a search window where a geometric condition (coordinate, distance, angular separation, phase angle, elevation, occultation) is satisfied.
All tools return IEnumerable<Window> — a sequence of { start, end } instants. The root finder uses a coarse step then refines; if you do not supply stepSizeInSeconds, the default is searchWindow.duration / 3000.
SPICE-backed objects only
The Find*Constraint tools that take an observer/target operate on SPICE-backed items: celestial bodies, barycenters, Lagrange points, and DSN stations from the loaded generic kernels. Propagated spacecraft are not supported here; use scenario simulation instead.
FindCoordinateConstraint¶
Find windows where one component of the observer→target vector, expressed in a given frame and coordinate system, satisfies a relational constraint.
| Parameter | Type |
|---|---|
searchWindow |
Window |
observerName |
CelestialItemsEnum |
targetName |
CelestialItemsEnum |
frame |
FramesEnum |
coordinateSystem |
CoordinateSystem |
coordinate |
Coordinate |
relationalOperator |
RelationnalOperator |
value |
double |
adjustValue |
double |
aberrationCorrection |
Aberration |
stepSizeInSeconds |
double, optional |
FindDistanceConstraint¶
Find windows where the distance between two SPICE-backed items satisfies a relational constraint.
| Parameter | Type |
|---|---|
searchWindow |
Window |
observerName |
CelestialItemsEnum |
targetName |
CelestialItemsEnum |
relationalOperator |
RelationnalOperator |
value |
meters |
aberrationCorrection |
Aberration |
stepSizeInSeconds |
double, optional |
{
"searchWindow": {
"start": { "dateTime": "2024-01-01T00:00:00", "kind": "UTC" },
"end": { "dateTime": "2024-02-01T00:00:00", "kind": "UTC" }
},
"observerName": "EARTH",
"targetName": "MOON",
"relationalOperator": "Lower",
"value": 380000000,
"aberrationCorrection": "None"
}
FindOccultingConstraint¶
Find occultation or eclipse windows.
| Parameter | Type |
|---|---|
searchWindow |
Window |
observerName |
CelestialItemsEnum |
occultedBody |
CelestialItemsEnum |
occultingBody |
PlanetsMoonsEnum |
occultingKind |
OccultationType |
aberrationCorrection |
Aberration |
stepSizeInSeconds |
double, optional |
Body shapes (point vs ellipsoid) are inferred from the loaded kernels.
FindAngularSeparationConstraint¶
Find windows where the angular separation (radians) of two targets as seen from an observer satisfies a relational constraint.
| Parameter | Type |
|---|---|
searchWindow |
Window |
observer |
CelestialItemsEnum |
target1 |
CelestialItemsEnum |
target2 |
CelestialItemsEnum |
relationalOperator |
RelationnalOperator |
value |
radians |
aberration |
Aberration |
stepSizeInSeconds |
double, optional |
FindPhaseAngleConstraint¶
Find windows where the illumination phase angle of a target satisfies a relational constraint. The phase angle is the illuminator-target-observer angle measured at the target; cos(phaseAngle) drives the illuminated fraction.
| Parameter | Type |
|---|---|
searchWindow |
Window |
observer |
CelestialItemsEnum |
target |
CelestialItemsEnum |
illuminator |
CelestialItemsEnum |
relationalOperator |
RelationnalOperator |
value |
radians |
aberration |
Aberration |
stepSizeInSeconds |
double, optional |
FindElevationFromSiteConstraint¶
Find windows where a target's elevation, observed from an arbitrary (body, lat, lon, alt) site, satisfies a relational constraint. Useful for visibility windows and twilight.
| Parameter | Type |
|---|---|
searchWindow |
Window |
body |
PlanetsMoonsEnum |
latitude |
radians |
longitude |
radians |
altitude |
meters |
target |
CelestialItemsEnum |
relationalOperator |
RelationnalOperator |
value |
radians |
aberration |
Aberration |
stepSizeInSeconds |
double, optional |
Example — when is the Moon above 10° elevation from a site at lat 45°N, lon 0°, sea level?
{
"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"
}