/[PAMELA software]/yodaUtility/sgp4/cOrbit.h
ViewVC logotype

Contents of /yodaUtility/sgp4/cOrbit.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Sun Apr 30 11:08:15 2006 UTC (18 years, 7 months ago) by kusanagi
Branch: MAIN
CVS Tags: yodaUtility2_0/00, yodaUtility1_0/00, yodaUtility2_2/00, yodaUtility2_1/00, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
Various utilities for the yoda environment and its related softwares.
YFile 	   	- Inheriths from TFile     - Add custom features to a TFile object.
YException 	- Inheriths from exception - YODA specific Exceptions.
YMcmd	   	- Decoder for the Mcmd packets.
YSQLConnection 	- Singletn class for DB connections.
yodaUtility     - Various functions.
sgp4		- C++ NORAD SGP4/SDP4 Implementation - Developed by Michael F. Henry.

1 //
2 // cOrbit.h
3 //
4 // This is the header file for the class cOrbit. This class accepts a
5 // single satellite's NORAD two-line element set and provides information
6 // regarding the satellite's orbit such as period, axis length,
7 // ECI coordinates/velocity, etc., using the SGP4/SDP4 orbital models.
8 //
9 // Copyright (c) 2002-2003 Michael F. Henry
10 //
11 #pragma once
12
13 #include "cTle.h"
14 #include "cJulian.h"
15 #include "cNoradBase.h"
16 #include "math.h"
17
18 using namespace std;
19 //////////////////////////////////////////////////////////////////////////////
20
21 class cVector;
22 class cGeoCoord;
23 class cEci;
24
25 //////////////////////////////////////////////////////////////////////////////
26 class cOrbit
27 {
28 public:
29 cOrbit(const cTle &tle);
30 virtual ~cOrbit();
31
32 // Return satellite ECI data at given minutes since element's epoch.
33 bool getPosition(double tsince, cEci *pEci) const;
34
35 double Inclination() const { return radGet(cTle::FLD_I); }
36 double Eccentricity() const { return m_tle.getField(cTle::FLD_E); }
37 double RAAN() const { return radGet(cTle::FLD_RAAN); }
38 double ArgPerigee() const { return radGet(cTle::FLD_ARGPER); }
39 double BStar() const { return m_tle.getField(cTle::FLD_BSTAR) / AE;}
40 double Drag() const { return m_tle.getField(cTle::FLD_MMOTIONDT); }
41 double mnMotion() const { return m_tle.getField(cTle::FLD_MMOTION); }
42 double mnAnomaly() const { return radGet(cTle::FLD_M); }
43 double mnAnomaly(cJulian t) const; // mean anomaly (in radians) at time t
44
45 cJulian Epoch() const { return m_jdEpoch; }
46
47 double TPlusEpoch(const cJulian &t) const; // time span [t - epoch] in secs
48
49 string SatName(bool fAppendId = false) const;
50
51 // "Recovered" from the input elements
52 double SemiMajor() const { return m_aeAxisSemiMajorRec; }
53 double SemiMinor() const { return m_aeAxisSemiMinorRec; }
54 double mnMotionRec() const { return m_mnMotionRec; } // mn motion, rads/min
55 double Major() const { return 2.0 * SemiMajor(); } // major axis in AE
56 double Minor() const { return 2.0 * SemiMinor(); } // minor axis in AE
57 double Perigee() const { return m_kmPerigeeRec; } // perigee in km
58 double Apogee() const { return m_kmApogeeRec; } // apogee in km
59 double Period() const; // period in seconds
60
61 protected:
62 double radGet(cTle::eField fld) const
63 { return m_tle.getField(fld, cTle::U_RAD); }
64
65 double degGet(cTle::eField fld) const
66 { return m_tle.getField(fld, cTle::U_DEG); }
67
68 private:
69 cTle m_tle;
70 cJulian m_jdEpoch;
71 cNoradBase *m_pNoradModel;
72
73 // Caching variables; note units are not necessarily the same as tle units
74 mutable double m_secPeriod;
75
76 // Caching variables recovered from the input TLE elements
77 double m_aeAxisSemiMinorRec; // semi-minor axis, in AE units
78 double m_aeAxisSemiMajorRec; // semi-major axis, in AE units
79 double m_mnMotionRec; // radians per minute
80 double m_kmPerigeeRec; // perigee, in km
81 double m_kmApogeeRec; // apogee, in km
82 };
83

  ViewVC Help
Powered by ViewVC 1.1.23