C Module: pixelLineConverter
Executive Summary
Converter that takes a image processing message and camera information and outputs a relative position to the object.
The module
PDF Description
contains further information on this module’s function,
how to run it, as well as testing.
Measurement Freshness
The module consumes each written circles message once. After the first write,
its message-header write time must increase strictly, including after an invalid
measurement. Unwritten, retained, or older inputs leave the output and its write
time unchanged, allowing slower consumers to read the last result. A new invalid
input produces a zero output with valid = 0. Consumers must check the output
write time to detect new results. Updating camera or attitude data alone does not
trigger another conversion. Reset clears the timestamp history, allowing a
write at time zero.
Producers must timestamp new measurements when writing them; republishing an old
image with a newer write time is treated as a new measurement.
Message Connection Descriptions
The following diagram and table list all the module input and output messages. The module message connection is set by the user from Python. The message type contains a link to the message structure definition, while the description provides information on what this message is used for.
Msg Variable Name |
Msg Type |
Description |
|---|---|---|
opNavOutMsg |
optical navigation output message |
|
cameraConfigInMsg |
camera config input message |
|
attInMsg |
attitude input message |
|
circlesInMsg |
circles input message |
Functions
-
void SelfInit_pixelLineConverter(PixelLineConvertData *configData, int64_t moduleID)
This method transforms pixel, line, and diameter data into heading data for orbit determination or heading determination.
- Parameters:
configData – The configuration data associated with the ephemeris model
moduleID – The module identification integer
-
void Update_pixelLineConverter(PixelLineConvertData *configData, uint64_t callTime, int64_t moduleID)
This method reads in the camera and circle messages and extracts navigation data from them. It outputs the heading (norm and direction) to the celestial body identified in the inertial frame. It provides the heading to the most robust circle identified by the image processing algorithm.
- Parameters:
configData – The configuration data associated with the ephemeris model
callTime – The clock time at which the function was called (nanoseconds)
moduleID – The module identification integer
-
void Reset_pixelLineConverter(PixelLineConvertData *configData, uint64_t callTime, int64_t moduleID)
This resets the module to original states.
- Parameters:
configData – The configuration data associated with the ephemeris model
callTime – The clock time at which the function was called (nanoseconds)
moduleID – The module identification integer
-
struct PixelLineConvertData
- #include <pixelLineConverter.h>
The configuration structure for the pixelLine Converter module.
Public Members
[-] output navigation message for relative position
-
CameraConfigMsg_C cameraConfigInMsg
camera config input message
-
NavAttMsg_C attInMsg
attitude input message
-
OpNavCirclesMsg_C circlesInMsg
circles input message
-
int32_t planetTarget
The planet targeted (None = 0, Earth = 1, Mars = 2, Jupiter = 3 are allowed).
-
uint64_t lastWriteTime
[ns] Last consumed circles message write time
-
int hasReadMessage
Whether a circles message has been consumed since reset.
-
BSKLogger *bskLogger
BSK Logging.