Spacecraft Control Framework 1.0
Spacecraft Control Library
Public Member Functions | List of all members
star_meas Class Reference

Identifies stars from a star catalog assuming a pinhole camera model. More...

#include <sc_star_meas.h>

Public Member Functions

 star_meas (void)
 Constructor.
 
void Initialize (const ml_matrix &starMatrix, double fieldOfView, double angularResolution, double intTol, double fScale)
 Initialize with a star matrix ([i;u]. More...
 
void Initialize (double fieldOfView, double angularResolution, double intTol, double fScale)
 Initialize with camera parameters. More...
 
void SetStarData (const ml_matrix &u_stars, const ml_matrix &visual_magnitude, const ml_int_array &star_ids)
 Set the catalog star data. More...
 
void SetStarMatrix (const ml_matrix &star_catalog)
 Set the catalog star matrix. More...
 
void SetParams (double fieldOfView, double fScale)
 Set parameters that might change after initialization. More...
 
void StarIdentification (const ml_matrix &pixelLocation, const ml_matrix &pixelIntensity)
 Perform star identification. More...
 
void Pyramid (const ml_matrix &pixelLocation)
 Pyramid method. More...
 
ml_matrix GetIdentifiedStars (void)
 Get the list of identified stars. More...
 
ml_int_array GetStarHipparcosIDs (void)
 Get the Hipparcos IDs of identified stars. More...
 
ml_matrix GetMeasuredUnitVectors (void)
 Get the unit vectors. More...
 
int GetNumberOfIdentifiedStars (void)
 Get the number of identified stars. More...
 
ml_matrix GetNearMatrix (void)
 Get the near matrix. More...
 
void set_verbosity (int level)
 Set the verbosity level. More...
 

Detailed Description

Identifies stars from a star catalog assuming a pinhole camera model.

Returns a list of identified stars and their unit vectors.

Member Function Documentation

◆ Initialize() [1/2]

void star_meas::Initialize ( const ml_matrix &  starMatrix,
double  fieldOfView,
double  angularResolution,
double  intTol,
double  fScale 
)

Initialize with a star matrix ([i;u].

Initializes the stellar id system with a star matrix.

Parameters
starMatrixThe (4,n) catalog star matrix of [i;u]
fieldOfViewThe field-of-view of the telescope (rad)
angularResolutionThe angular resolution of the telescope
intTolThe intensity tolerance for intensity matching
fScaleThe focal length scale factor

◆ Initialize() [2/2]

void star_meas::Initialize ( double  fieldOfView,
double  angularResolution,
double  intTol,
double  fScale 
)

Initialize with camera parameters.

Initializes the stellar id system.

Parameters
fieldOfViewThe field-of-view of the telescope
angularResolutionThe angular resolution of the telescope
intTolThe intensity tolerance for intensity matching
fScaleThe focal length scale factor

◆ SetStarData()

void star_meas::SetStarData ( const ml_matrix &  u_stars,
const ml_matrix &  visual_magnitude,
const ml_int_array &  star_ids 
)

Set the catalog star data.

Sets the catalog star data and recompute the near matrix.

Uses a factor of sqrt(2) times the field of view, to account for the corners of a square field of view.

Parameters
u_starsThe star unit vectors (of date) (3,n)
visual_magnitudeThe star visual magnitudes (1,n)
star_idsThe Hipparcos IDs (3,n)

References vm_to_intensity().

◆ SetStarMatrix()

void star_meas::SetStarMatrix ( const ml_matrix &  starMatrix)

Set the catalog star matrix.

Sets the catalog star matrix, [i;u].

The first row is intensity. The second to fourth rows are the star unit vectors.

Parameters
starMatrixThe star matrix (4,n)

◆ SetParams()

void star_meas::SetParams ( double  fieldOfView,
double  fScale 
)

Set parameters that might change after initialization.

Set the the stellar id system parameters.

Parameters
fieldOfViewThe field-of-view of the telescope (rad)
fScaleThe focal length as measured in pixels

◆ StarIdentification()

void star_meas::StarIdentification ( const ml_matrix &  pixelLocation,
const ml_matrix &  pixelIntensity 
)

Perform star identification.

Performs star identification.

The centroids should be referenced to the center of the imager, i.e. the boresight of the camera. The locations must be in the same units as the fScale parameter. See also u_to_pix().

Parameters
pixelLocationCentroid locations
pixelIntensityThe measured intensity of each pixel

◆ Pyramid()

void star_meas::Pyramid ( const ml_matrix &  pixelLocation)

Pyramid method.

Implements the pyramid method for star ID.

Parameters
pixelLocationCentroid locations (2,n)

check for specular triangles (mirror image)

References near_matrix::get_angle_range(), pix_to_u(), and sc_log().

◆ GetIdentifiedStars()

ml_matrix star_meas::GetIdentifiedStars ( void  )

Get the list of identified stars.

Return the list of identified stars.

Returns
The list of identified stars (1,n)

◆ GetStarHipparcosIDs()

ml_int_array star_meas::GetStarHipparcosIDs ( void  )

Get the Hipparcos IDs of identified stars.

Return the Hipparcos IDs of the identified stars.

Unidentified stars will have an ID of 0.

Returns
The list of star IDs (1,n)

◆ GetMeasuredUnitVectors()

ml_matrix star_meas::GetMeasuredUnitVectors ( void  )

Get the unit vectors.

Return the list of unit vectors corresponding to the identified stars.

Returns
The unit vectors (3,n)

◆ GetNumberOfIdentifiedStars()

int star_meas::GetNumberOfIdentifiedStars ( void  )

Get the number of identified stars.

Return the number of identified stars.

Returns
The number of stars

◆ GetNearMatrix()

ml_matrix star_meas::GetNearMatrix ( void  )

Get the near matrix.

Return the near matrix.

Returns
The near matrix of dot products

◆ set_verbosity()

void star_meas::set_verbosity ( int  level)

Set the verbosity level.

Set the verbosity level for logging.

0 - Silent 1 - Warn 2 - Info