Spacecraft Control Framework 1.0
Spacecraft Control Library
|
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... | |
Identifies stars from a star catalog assuming a pinhole camera model.
Returns a list of identified stars and their unit vectors.
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.
starMatrix | The (4,n) catalog star matrix of [i;u] |
fieldOfView | The field-of-view of the telescope (rad) |
angularResolution | The angular resolution of the telescope |
intTol | The intensity tolerance for intensity matching |
fScale | The focal length scale factor |
void star_meas::Initialize | ( | double | fieldOfView, |
double | angularResolution, | ||
double | intTol, | ||
double | fScale | ||
) |
Initialize with camera parameters.
Initializes the stellar id system.
fieldOfView | The field-of-view of the telescope |
angularResolution | The angular resolution of the telescope |
intTol | The intensity tolerance for intensity matching |
fScale | The focal length scale factor |
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.
u_stars | The star unit vectors (of date) (3,n) |
visual_magnitude | The star visual magnitudes (1,n) |
star_ids | The Hipparcos IDs (3,n) |
References vm_to_intensity().
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.
starMatrix | The star matrix (4,n) |
void star_meas::SetParams | ( | double | fieldOfView, |
double | fScale | ||
) |
Set parameters that might change after initialization.
Set the the stellar id system parameters.
fieldOfView | The field-of-view of the telescope (rad) |
fScale | The focal length as measured in pixels |
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().
pixelLocation | Centroid locations |
pixelIntensity | The measured intensity of each pixel |
void star_meas::Pyramid | ( | const ml_matrix & | pixelLocation | ) |
Pyramid method.
Implements the pyramid method for star ID.
pixelLocation | Centroid locations (2,n) |
check for specular triangles (mirror image)
References near_matrix::get_angle_range(), pix_to_u(), and sc_log().
ml_matrix star_meas::GetIdentifiedStars | ( | void | ) |
Get the list of identified stars.
Return the list of identified stars.
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.
ml_matrix star_meas::GetMeasuredUnitVectors | ( | void | ) |
Get the unit vectors.
Return the list of unit vectors corresponding to the identified stars.
int star_meas::GetNumberOfIdentifiedStars | ( | void | ) |
Get the number of identified stars.
Return the number of identified stars.
ml_matrix star_meas::GetNearMatrix | ( | void | ) |
Get the near matrix.
Return the near matrix.
void star_meas::set_verbosity | ( | int | level | ) |
Set the verbosity level.
Set the verbosity level for logging.
0 - Silent 1 - Warn 2 - Info