Description
The Geodetic Alignment Tracking Software is a flight software module that determines the geodetic location where a spacecraft’s pointing direction intersects a planetary surface. Given a configurable alignment vector in the spacecraft body frame, the module projects this direction onto the reference planet and computes the corresponding latitude, longitude, and surface position. This is essential for payload targeting, ground track prediction, and any application requiring knowledge of where an instrument or antenna boresight intersects the Earth or another celestial body.
Example Use Cases
- Payload Targeting: Determine the ground location being observed by a nadir-pointing camera or sensor.
- Antenna Footprint Analysis: Compute the intersection point of a communication antenna boresight with the planetary surface.
- Ground Track Visualization: Project spacecraft orientation onto the surface for mission planning displays.
- Observation Scheduling: Validate that a target location is within the instrument field of view.
- Occlusion Detection: Identify when the spacecraft’s pointing direction does not intersect the planet (e.g., pointing at deep space).
Module Implementation
The Geodetic Alignment Tracking Software is a Software component that processes spacecraft transform and planetary state messages to determine the geodetic coordinates of the alignment vector intersection with the planetary surface.
Input Messages
The module requires two input messages:
| Input Message | Type | Description |
|---|---|---|
In_TransformMsg | TransformMessage | Spacecraft position and orientation in the inertial frame |
In_PlanetStateMsg | PlanetStateMessage | Reference planet state including position, rotation, and radius |
By default, the planet state message is initialised to Earth from the Solar System, and the transform message is automatically connected to the root parent object’s transform.
Alignment Vector Definition
The alignment vector defines the direction in the spacecraft body frame that is projected onto the planetary surface. By default, this is set to the “up” direction , but it can be configured to represent any instrument boresight or antenna pointing direction.
The alignment vector is transformed from the body frame to the inertial frame using the spacecraft’s attitude:
where is the direction cosine matrix representing the spacecraft’s orientation.
Ray-Sphere Intersection
The core algorithm determines whether the alignment vector, projected from the spacecraft position, intersects the planetary surface modelled as a sphere with radius .
Relative Position
The spacecraft position relative to the planet centre is:
where is the spacecraft position and is the planet position in the inertial frame.
Intersection Calculation
The ray from the spacecraft position along the alignment direction is parameterised as:
where represents the distance along the ray. The intersection with the planetary sphere satisfies:
Expanding and rearranging yields a quadratic equation in :
Let and . The discriminant is:
The roots are:
Intersection Conditions
The intersection analysis depends on the discriminant and root values:
| Condition | Interpretation |
|---|---|
| Ray does not intersect the sphere | |
| Spacecraft is inside the sphere (invalid geometry) | |
| and | Intersection is behind the spacecraft |
| or | Valid intersection exists |
When a valid intersection exists, the closest positive root is selected:
The intersection point in the inertial frame is:
Geodetic Coordinate Conversion
The intersection point is converted from Planet-Centred Inertial (PCI) coordinates to geodetic coordinates using the planetary rotation and radius.
Latitude
The geodetic latitude is computed from the intersection point:
where is the -component of the intersection point in the PCI frame (aligned with the planet’s rotation axis).
Longitude
The geodetic longitude accounts for the planet’s rotation. The intersection point is first transformed to the Planet-Centred Planet-Fixed (PCPF) frame:
where is the rotation matrix accounting for the planet’s J2000 rotation angle :
The longitude is then:
Altitude
For surface intersection points, the altitude is nominally zero:
Any non-zero altitude indicates numerical precision effects.
Surface Velocity Calculation
The module also computes the velocity of the intersection point in the PCPF frame, accounting for planetary rotation:
where is the planet’s angular velocity vector derived from the J2000 rotation rate.
Output Message
The module produces a GeodeticMessage containing:
| Field | Symbol | Units | Description |
|---|---|---|---|
Latitude | rad | Geodetic latitude of intersection point | |
Longitude | rad | Geodetic longitude of intersection point | |
Altitude | m | Altitude above reference surface | |
Position_BP_P | m | Position vector in PCPF frame | |
Velocity_BP_P | m/s | Velocity in PCPF frame due to rotation | |
Planet | - | - | Name of the reference planet |
No Intersection Handling
When the alignment vector does not intersect the planetary surface (e.g., spacecraft pointing at deep space), the output message is set to indicate an invalid state:
Planetis set to an empty string- All coordinate values are set to zero
This allows downstream consumers to detect when no valid ground intersection exists.
Update Sequence
At each simulation time step, the module performs the following operations:
- Validate Inputs: Check that transform and planet state messages are connected; skip update if either is missing.
- Compute Alignment Direction: Transform the body-frame alignment vector to the inertial frame.
- Calculate Relative Position: Determine spacecraft position relative to planet centre.
- Perform Ray-Sphere Intersection: Compute discriminant and evaluate intersection conditions.
- Handle No Intersection: If no valid intersection exists, clear output message and return.
- Compute Intersection Point: Calculate the closest intersection point along the ray.
- Convert to Geodetic: Transform intersection point to latitude, longitude, and PCPF position.
- Compute Surface Velocity: Calculate velocity due to planetary rotation.
- Update Output Message: Populate geodetic message with computed values.
Assumptions/Limitations
- The planet is modelled as a perfect sphere; oblate spheroid geometry is not considered.
- The alignment vector is assumed to be a unit vector; non-unit vectors will produce incorrect results.
- The algorithm finds only the closest intersection point; scenarios with multiple valid intersections (e.g., through the planet) are not fully handled.
- When the spacecraft is inside the planetary sphere, the intersection is marked as invalid rather than computing an exit point.
- No atmospheric refraction is modelled; the ray travels in a straight line.
- The surface velocity calculation assumes rigid body rotation of the planet.
- Terrain elevation and surface features are not considered; only the reference sphere is used.
- The module does not account for signal propagation delays or relativistic effects.
- The transform message is automatically connected to the root parent’s transform; this may not be appropriate for all mounting configurations.
- Changes to the alignment vector during simulation are immediately reflected in the next update