40#define G_AT "GCOMOads::at(int&)"
41#define G_INSERT "GCOMOads::insert(int&, GCOMOad&)"
42#define G_REMOVE "GCOMOads::remove(int&)"
43#define G_READ "GCOMOads::read(GFitsTable&)"
204 if (index < 0 || index >=
size()) {
227 if (index < 0 || index >=
size()) {
271 #if defined(G_RANGE_CHECK)
279 if (index < 0 || index >=
size()) {
307 #if defined(G_RANGE_CHECK)
308 if (index < 0 || index >=
size()) {
337 int num = oads.
size();
343 for (
int i = 0; i < num; ++i) {
344 m_oads.push_back(oads[i]);
364 GFits fits(filename);
390 const double era = 6451.03;
393 const double erd = 6378.5;
394 const double erd_min = erd + 300.0;
395 const double erd_max = erd + 530.0;
401 int num = table.
nrows();
423 double georad = 73.5;
426 for (
int i = 0; i < num; ++i) {
433 int tics = ptr_tics->
integer(i);
459 double radius = std::sqrt(ptr_posx->
real(i) * ptr_posx->
real(i) +
460 ptr_posy->
real(i) * ptr_posy->
real(i) +
461 ptr_posz->
real(i) * ptr_posz->
real(i));
462 if ((radius > erd_min) && (radius < erd_max)) {
465 #if defined(G_GEORAD_WARNING)
467 std::string msg =
"Error in CGRO position. Distance from "
469 "while it should be in the interval ["+
472 "spacecraft altitude.";
505 result.append(
"=== GCOMOads ===");
517 result.append(
" - ");
523 result.append(
" - ");
525 result.append(
" days");
527 result.append(
m_oads[0].tstart().utc());
528 result.append(
" - ");
529 result.append(
m_oads[
size()-1].tstop().utc());
533 if (reduced_chatter >
SILENT) {
538 for (
int i = 0; i <
size(); ++i) {
539 if (
m_oads[i].tjd() != tjd) {
COMPTEL Orbit Aspect Data container class definition.
Implementation of support function used by COMPTEL classes.
Exception handler interface definition.
FITS table abstract base class interface definition.
FITS file class interface definition.
Mathematical function definitions.
COMPTEL Orbit Aspect Data class.
const int & tjd(void) const
Return Truncated Julian Days of Orbit Aspect Record.
const GSkyDir & zaxis(void) const
Return telescope Z-axis.
const int & tics(void) const
Return tics of Orbit Aspect Record.
const float & gcaz(void) const
Return Geocentre azimuth angle.
const GTime & tstart(void) const
Return start time of superpacket.
const float & gcel(void) const
Return Geocentre zenith angle.
const float & georad(void) const
Return apparent radius of Earth.
const GTime & tstop(void) const
Return stop time of superpacket.
const GVector & pos(void) const
Return telescope position vector (km)
const GSkyDir & xaxis(void) const
Return telescope X-axis.
COMPTEL Orbit Aspect Data container class.
void remove(const int &index)
Remove Orbit Aspect Data from container.
GCOMOad & at(const int &index)
Return reference to Orbit Aspect Data.
GCOMOads & operator=(const GCOMOads &oads)
Assignment operator.
void extend(const GCOMOads &oads)
Append Orbit Aspect Data container.
std::string print(const GChatter &chatter=NORMAL) const
Print COMPTEL Orbit Aspect Data container.
virtual ~GCOMOads(void)
Destructor.
void reserve(const int &num)
Reserves space for Orbit Aspect Data in container.
GCOMOads * clone(void) const
Clone COMPTEL Orbit Aspect Data container.
void clear(void)
Clear COMPTEL Orbit Aspect Data container.
int size(void) const
Return number of Orbit Aspect Data in container.
void read(const GFitsTable &table)
Read COMPTEL Orbit Aspect Data FITS table.
bool is_empty(void) const
Signals if there are no Orbit Aspect Data in container.
GCOMOads(void)
Void constructor.
GCOMOad & insert(const int &index, const GCOMOad &oad)
Insert Orbit Aspect Data into container.
void load(const GFilename &filename)
Load COMPTEL Orbit Aspect Data FITS file.
void init_members(void)
Initialise class members.
GCOMOad & append(const GCOMOad &oad)
Append Orbit Aspect Data to container.
void free_members(void)
Delete class members.
std::vector< GCOMOad > m_oads
Orbit Aspect Data records.
void copy_members(const GCOMOads &oads)
Copy class members.
Abstract interface for FITS table column.
virtual int integer(const int &row, const int &inx=0) const =0
virtual double real(const int &row, const int &inx=0) const =0
Abstract interface for FITS table.
const int & nrows(void) const
Return number of rows in table.
void close(void)
Close FITS file.
GFitsTable * table(const int &extno)
Get pointer to table HDU.
void radec(const double &ra, const double &dec)
Set equatorial sky direction (radians)
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.
GChatter reduce(const GChatter &chatter)
Reduce chattiness by one level.
void warning(const std::string &origin, const std::string &message)
Emits warning.
GTime com_time(const int &tjd, const int &tics)
Convert TJD and COMPTEL tics in GTime object.