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

Contents of /yodaUtility/sgp4/cEci.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Sun Apr 30 11:08:14 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 // 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