GammaLib 2.2.0.dev
Loading...
Searching...
No Matches
GCOSPointing.hpp
Go to the documentation of this file.
1/***************************************************************************
2 * GCOSPointing.hpp - COSI pointing class *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2026 by Juergen Knoedlseder *
5 * ----------------------------------------------------------------------- *
6 * *
7 * This program is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * This program is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU General Public License *
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
19 * *
20 ***************************************************************************/
21/**
22 * @file GCOSPointing.hpp
23 * @brief COSI pointing class definition
24 * @author Juergen Knoedlseder
25 */
26
27#ifndef GCOSPOINTING_HPP
28#define GCOSPOINTING_HPP
29
30/* __ Includes ___________________________________________________________ */
31#include <string>
32#include "GBase.hpp"
33#include "GTime.hpp"
34#include "GSkyDir.hpp"
35
36/* __ Forward declaration ________________________________________________ */
37
38/* __ Constants __________________________________________________________ */
39
40
41/***********************************************************************//**
42 * @class GCOSPointing
43 *
44 * @brief COSI pointing class
45 *
46 * The COSI pointing class provides spacecraft attitude information for a
47 * given time tag.
48 ***************************************************************************/
49class GCOSPointing : public GBase {
50
51public:
52 // Constructors and destructors
53 GCOSPointing(void);
54 GCOSPointing(const GCOSPointing& pointing);
55 virtual ~GCOSPointing(void);
56
57 // Operators
58 GCOSPointing& operator=(const GCOSPointing& pointing);
59
60 // Class methods
61 void clear(void);
62 GCOSPointing* clone(void) const;
63 std::string classname(void) const;
64 const GTime& time(void) const;
65 const GSkyDir& sc_x(void) const;
66 const GSkyDir& sc_z(void) const;
67 const double& altitude(void) const;
68 const GSkyDir& earth_zenith(void) const;
69 const GSkyDir& earth_nadir(void) const;
70 const double& livetime(void) const;
71 void time(const GTime& time);
72 void sc_x(const GSkyDir& sc_x);
73 void sc_z(const GSkyDir& sc_z);
74 void altitude(const double& altitude);
76 void earth_nadir(const GSkyDir& earth_nadir);
77 void livetime(const double& livetime);
78 std::string print(const GChatter& chatter = NORMAL) const;
79
80protected:
81 // Protected methods
82 void init_members(void);
83 void copy_members(const GCOSPointing& pointing);
84 void free_members(void);
85
86 // Protected members
87 GTime m_time; //!< Time stamp in UNIX seconds
88 GSkyDir m_sc_x; //!< Space craft x-axis
89 GSkyDir m_sc_z; //!< Space craft z-axis
90 double m_altitude; //!< Altitude above from Earth's ellipsoid (km)
91 GSkyDir m_earth_zenith; //!< Direction of Earth's zenith at SC location
92 GSkyDir m_earth_nadir; //!< Direction of Earth's nadir at SC location
93 double m_livetime; //!< Lifetime (sec)
94};
95
96
97/***********************************************************************//**
98 * @brief Return class name
99 *
100 * @return String containing the class name ("GCOSPointing").
101 ***************************************************************************/
102inline
103std::string GCOSPointing::classname(void) const
104{
105 return ("GCOSPointing");
106}
107
108
109/***********************************************************************//**
110 * @brief Return time stamp
111 *
112 * @return Time stamp.
113 ***************************************************************************/
114inline
115const GTime& GCOSPointing::time(void) const
116{
117 return (m_time);
118}
119
120
121/***********************************************************************//**
122 * @brief Return space craft X-axis
123 *
124 * @return Space craft X-axis.
125 ***************************************************************************/
126inline
127const GSkyDir& GCOSPointing::sc_x(void) const
128{
129 return (m_sc_x);
130}
131
132
133/***********************************************************************//**
134 * @brief Return space craft Z-axis
135 *
136 * @return Space craft Z-axis.
137 ***************************************************************************/
138inline
139const GSkyDir& GCOSPointing::sc_z(void) const
140{
141 return (m_sc_z);
142}
143
144
145/***********************************************************************//**
146 * @brief Return space craft altitude in km
147 *
148 * @return Space craft altitude (km).
149 ***************************************************************************/
150inline
151const double& GCOSPointing::altitude(void) const
152{
153 return (m_altitude);
154}
155
156
157/***********************************************************************//**
158 * @brief Return direction of Earth's zenith at space craft location
159 *
160 * @return Earth's zenith direction.
161 ***************************************************************************/
162inline
164{
165 return (m_earth_zenith);
166}
167
168
169/***********************************************************************//**
170 * @brief Return direction of Earth's nadir at space craft location
171 *
172 * @return Earth's nadir direction.
173 ***************************************************************************/
174inline
176{
177 return (m_earth_nadir);
178}
179
180
181/***********************************************************************//**
182 * @brief Return livetime
183 *
184 * @return Livetime (sec).
185 ***************************************************************************/
186inline
187const double& GCOSPointing::livetime(void) const
188{
189 return (m_livetime);
190}
191
192
193/***********************************************************************//**
194 * @brief Set time stamp
195 *
196 * @param[in] time Time stamp.
197 ***************************************************************************/
198inline
199void GCOSPointing::time(const GTime& time)
200{
201 m_time = time;
202 return;
203}
204
205
206/***********************************************************************//**
207 * @brief Set space craft X-axis
208 *
209 * @param[in] sc_x Space craft X-axis.
210 ***************************************************************************/
211inline
213{
214 m_sc_x = sc_x;
215 return;
216}
217
218
219/***********************************************************************//**
220 * @brief Set space craft Z-axis
221 *
222 * @param[in] sc_z Space craft Z-axis.
223 ***************************************************************************/
224inline
226{
227 m_sc_z = sc_z;
228 return;
229}
230
231
232/***********************************************************************//**
233 * @brief Set space craft altitude (km)
234 *
235 * @param[in] altitude Space craft altitude (km).
236 ***************************************************************************/
237inline
238void GCOSPointing::altitude(const double& altitude)
239{
241 return;
242}
243
244
245/***********************************************************************//**
246 * @brief Set direction Earth's zenith at space craft location
247 *
248 * @param[in] earth_zenith Earth's zenith direction.
249 ***************************************************************************/
250inline
251void GCOSPointing::earth_zenith(const GSkyDir& earth_zenith)
252{
254 return;
255}
256
257
258/***********************************************************************//**
259 * @brief Set direction Earth's nadir at space craft location
260 *
261 * @param[in] earth_nadir Earth's nadir direction.
262 ***************************************************************************/
263inline
264void GCOSPointing::earth_nadir(const GSkyDir& earth_nadir)
265{
267 return;
268}
269
270
271/***********************************************************************//**
272 * @brief Set livetime
273 *
274 * @param[in] livetime Livetime (sec).
275 ***************************************************************************/
276inline
277void GCOSPointing::livetime(const double& livetime)
278{
280 return;
281}
282
283#endif /* GCOSSPACECRAFT_HPP */
Definition of interface for all GammaLib classes.
Sky direction class interface definition.
Time class interface definition.
GChatter
Definition GTypemaps.hpp:33
@ NORMAL
Definition GTypemaps.hpp:36
Interface class for all GammaLib classes.
Definition GBase.hpp:52
COSI pointing class.
GCOSPointing(void)
Void constructor.
std::string classname(void) const
Return class name.
double m_livetime
Lifetime (sec)
void copy_members(const GCOSPointing &pointing)
Copy class members.
GSkyDir m_sc_z
Space craft z-axis.
std::string print(const GChatter &chatter=NORMAL) const
Print pointing information.
const double & livetime(void) const
Return livetime.
GCOSPointing & operator=(const GCOSPointing &pointing)
Assignment operator.
virtual ~GCOSPointing(void)
Destructor.
const GSkyDir & sc_z(void) const
Return space craft Z-axis.
void free_members(void)
Delete class members.
double m_altitude
Altitude above from Earth's ellipsoid (km)
void clear(void)
Clear pointing.
const GSkyDir & earth_nadir(void) const
Return direction of Earth's nadir at space craft location.
const double & altitude(void) const
Return space craft altitude in km.
GTime m_time
Time stamp in UNIX seconds.
GSkyDir m_earth_nadir
Direction of Earth's nadir at SC location.
GSkyDir m_sc_x
Space craft x-axis.
const GSkyDir & sc_x(void) const
Return space craft X-axis.
const GTime & time(void) const
Return time stamp.
GCOSPointing * clone(void) const
Clone COSI pointing.
void init_members(void)
Initialise class members.
const GSkyDir & earth_zenith(void) const
Return direction of Earth's zenith at space craft location.
GSkyDir m_earth_zenith
Direction of Earth's zenith at SC location.
Sky direction class.
Definition GSkyDir.hpp:62
Time class.
Definition GTime.hpp:55