/[PAMELA software]/YodaProfiler/inc/cEci.h
ViewVC logotype

Contents of /YodaProfiler/inc/cEci.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Oct 20 11:39:31 2006 UTC (18 years, 1 month ago) by mocchiut
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
FILE REMOVED
Create libsgp4.so shared lib; unified sgp4 code

1 //
2 // cEci.h
3 //
4 // Copyright (c) 2003 Michael F. Henry
5 //
6 #pragma once
7
8 #include "cVector.h"
9 #include "cJulian.h"
10 #include "coord.h"
11
12 //////////////////////////////////////////////////////////////////////
13 // class cEci
14 // Encapsulates an Earth-Centered Inertial position, velocity, and time.
15 class cEci
16 {
17 public:
18 cEci() { m_VecUnits = UNITS_NONE; }
19 cEci(const cCoordGeo &geo, const cJulian &cJulian);
20 cEci(const cVector &pos, const cVector &vel,
21 const cJulian &date, bool IsAeUnits = true);
22 virtual ~cEci() {};
23
24 cCoordGeo toGeo();
25
26 cVector getPos() const { return m_pos; }
27 cVector getVel() const { return m_vel; }
28 cJulian getDate() const { return m_date; }
29
30 void setUnitsAe() { m_VecUnits = UNITS_AE; }
31 void setUnitsKm() { m_VecUnits = UNITS_KM; }
32 bool UnitsAreAe() const { return m_VecUnits == UNITS_AE; }
33 bool UnitsAreKm() const { return m_VecUnits == UNITS_KM; }
34 void ae2km(); // Convert position, velocity vector units from AE to km
35
36 protected:
37 void MulPos(double factor) { m_pos.Mul(factor); }
38 void MulVel(double factor) { m_vel.Mul(factor); }
39
40 enum VecUnits
41 {
42 UNITS_NONE, // not initialized
43 UNITS_AE,
44 UNITS_KM,
45 };
46
47 cVector m_pos;
48 cVector m_vel;
49 cJulian m_date;
50 VecUnits m_VecUnits;
51 };

  ViewVC Help
Powered by ViewVC 1.1.23