Spacecraft Control Bundle 1
fsw_star_catalog.h
1/*
2 * Header file for object of class fsw_star_catalog.
3 * Copyright 2008, Princeton Satellite Systems, Inc.
4 * All Rights Reserved.
5 */
6
7#include <ControlDeck2/ControlDeck2.h>
8#include "sc_data_names.h"
9#include <SCControl/sc_star_catalog.h>
10
11#ifndef FSW_STAR_CATALOG
12#define FSW_STAR_CATALOG
13
14//class LocalVars : public Var
15//{
16// public:
17// // Enum declarations
18// static const LocalVars STAR_CATALOG;
19// static const LocalVars UNIT_VECTOR;
20// static const LocalVars VISUAL_MAGNITUDE;
21// private:
22// LocalVars(const char * name_,const char * desc_, int data_type_, const char * units_) :
23// Var(name_,desc_,data_type_,units_)
24// {}
25//};
26
27
35class fsw_star_catalog : public cd_control_module
36{
37 public:
38 fsw_star_catalog (const char * mod_name);
39 void initialize_data();
41 void initialize();
42 void handle_event(int code);
43
44 protected:
48 CD_REQUEST_REF jd_ref;
50
53 CD_CREATE_REF unit_vector_ref;
54 CD_CREATE_REF visual_magnitude_ref;
55 CD_CREATE_REF hip_ref;
57
61 CD_CREATE_REF filename_ref;
63
68
69
70 private:
71 // Star catalog object
72 star_catalog catalog;
73 // Star catalog matrix
74 ml_matrix star_catalog_mat;
75 // Star unit vectors
76 ml_matrix unit_vector_val;
77 // Star visual magnitude
78 ml_matrix visual_magnitude_val;
79 // Hipparcos IDs
80 ml_int_array hipparcos_ids;
81 // Julian date of last update
82 double julian_date_update;
83 // Number of stars
84 int n_stars;
85 // Catalog loaded
86 bool isLoaded;
87
88};
89
90extern "C"
91{
92 cd_control_module *fsw_star_catalog_builder(const char *name);
93}
94
95#endif
Star catalog processing.
Definition: fsw_star_catalog.h:36
void initialize_data_requests()
Data requests from other modules.
Definition: fsw_star_catalog.cc:42
void update_unit_vectors()
Updates unit vectors for new date.
Definition: fsw_star_catalog.cc:136
bool initialize_star_catalog()
Initialize the catalog.
Definition: fsw_star_catalog.cc:107
void initialize_data()
Create data and request the FSW_STAR_CATALOG_TRIGGER.
Definition: fsw_star_catalog.cc:24
void handle_event(int code)
The star unit vectors are updated annually.
Definition: fsw_star_catalog.cc:59
CD_REQUEST_REF jd_ref
julian_date
Definition: fsw_star_catalog.h:48
CD_CREATE_REF filename_ref
File name.
Definition: fsw_star_catalog.h:61
Define the data names used throughout the control system.