Spacecraft Control Framework 1.0
Spacecraft Control Library
|
Star catalog. More...
#include <sc_star_catalog.h>
Public Member Functions | |
star_catalog (ml_matrix starData, double date=2448347.75) | |
Initialize a catalog from star data. The default date is 2448347.75. More... | |
star_catalog (const char *fileName, double date=2448347.75) | |
Initialize a catalog from a text file. The default date is 2448347.75. More... | |
void | set_date (double newDate) |
Set the catalog reference date. More... | |
void | set_name (string newName) |
Set the catalog string name. More... | |
star * | get_star (int id) |
Look up a star using its ID. More... | |
const double | get_date () |
Get the catalog reference date. More... | |
const string | get_name () |
Get the catalog name. More... | |
const int | size () |
Return the number of stars in the catalog. More... | |
const ml_matrix | unit_vectors (double jd_now) |
Get the unit vectors for the full catalog. More... | |
const ml_matrix | visual_magnitude () |
Get the magnitudes for the full catalog. More... | |
const ml_int_array | hipparcos_ids () |
Get the Hipparcos IDs. More... | |
int | remove_stars (double angleTol) |
Remove stars that are too close together to resolve. More... | |
bool | is_valid () |
Check the catalog status. | |
Friends | |
class | near_matrix |
Star catalog.
The catalog is a map using the Hipparcos ID as a key. The near_matrix class is a friend which allows the access to the underlying map of stars when building the near matrix for a given field of view.
star_catalog::star_catalog | ( | ml_matrix | starData, |
double | date = 2448347.75 |
||
) |
Initialize a catalog from star data. The default date is 2448347.75.
Load a star catalog from a Nx8 matrix.
The matrix has the following format:
The matrix may also contain only the first four rows in which case the motion terms will be zero.
star_catalog::star_catalog | ( | const char * | fileName, |
double | date = 2448347.75 |
||
) |
Initialize a catalog from a text file. The default date is 2448347.75.
Load a catalog from a file.
Creates a matrix from the file which is then passed to the matrix catalog constructor.
void star_catalog::set_date | ( | double | newDate | ) |
Set the catalog reference date.
Specify a reference Julian date for the catalog.
void star_catalog::set_name | ( | string | newName | ) |
Set the catalog string name.
Specify a name for the catalog.
star * star_catalog::get_star | ( | int | id | ) |
Look up a star using its ID.
Get a star.
id | Hipparcos ID of star |
const double star_catalog::get_date | ( | ) |
Get the catalog reference date.
Get the reference date.
const string star_catalog::get_name | ( | ) |
Get the catalog name.
Get the name of the catalog.
const int star_catalog::size | ( | ) |
Return the number of stars in the catalog.
Number of stars in the catalog.
const ml_matrix star_catalog::unit_vectors | ( | double | jd_now | ) |
Get the unit vectors for the full catalog.
Unit vector for the full catalog accounting for star motion.
jd_now | Current Julian date |
Referenced by remove_stars().
const ml_matrix star_catalog::visual_magnitude | ( | ) |
Get the magnitudes for the full catalog.
Magnitudes for the full catalog.
const ml_int_array star_catalog::hipparcos_ids | ( | ) |
Get the Hipparcos IDs.
Get the star IDs from the map.
int star_catalog::remove_stars | ( | double | angleTol | ) |
Remove stars that are too close together to resolve.
Remove stars that are closer together than the input tolerance.
angleTol | Tolerance angle (radians) |
References unit_vectors().