COSMOS core  1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
physicsdef.h
Go to the documentation of this file.
1 /********************************************************************
2 * Copyright (C) 2015 by Interstel Technologies, Inc.
3 * and Hawaii Space Flight Laboratory.
4 *
5 * This file is part of the COSMOS/core that is the central
6 * module for COSMOS. For more information on COSMOS go to
7 * <http://cosmos-project.com>
8 *
9 * The COSMOS/core software is licenced under the
10 * GNU Lesser General Public License (LGPL) version 3 licence.
11 *
12 * You should have received a copy of the
13 * GNU Lesser General Public License
14 * If not, go to <http://www.gnu.org/licenses/>
15 *
16 * COSMOS/core is free software: you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public License
18 * as published by the Free Software Foundation, either version 3 of
19 * the License, or (at your option) any later version.
20 *
21 * COSMOS/core is distributed in the hope that it will be useful, but
22 * WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
25 *
26 * Refer to the "licences" folder for further information on the
27 * condititons and terms to use this software.
28 ********************************************************************/
29 
30 #ifndef _ORBITDEF_H
31 #define _ORBITDEF_H
32 
37 #include "support/configCosmos.h"
38 #include "math/vector.h"
39 using namespace Cosmos::Math::Vectors;
40 using namespace Cosmos::Math::Quaternions;
41 
42 #include "support/convertdef.h"
43 
44 //#include <fcntl.h>
45 //#include <time.h>
46 //#include <errno.h>
47 
51 
52 #define SUBSYS_ADCS 0
53 #define SUBSYS_OBCS 1
54 #define SUBSYS_TCS 2
55 #define SUBSYS_PLOAD 3
56 #define SUBSYS_TELECOMM 4
57 #define SUBSYS_EPS 5
58 
59 #define FLAG_ADRAG 1
60 #define FLAG_SDRAG 2
61 #define FLAG_ATORQUE 4
62 #define FLAG_STORQUE 8
63 #define FLAG_GTORQUE 16
64 
65 #define MAXGJORDER 15
66 
67 #define GRAVITY_PGM2000A 1
68 #define GRAVITY_EGM2008 2
69 #define GRAVITY_PGM2000A_NORM 3
70 #define GRAVITY_EGM2008_NORM 4
71 
73 
77 
79 
82 struct gjstruc
83 {
85  double a[MAXGJORDER+1];
86  double b[MAXGJORDER+1];
91  // rvector q;
93 };
94 
96 
98 struct gj_handle
99 {
100  vector< vector<int32_t> > binom;
101  vector<double> c;
102  vector<double> gam;
103  vector< vector<double> > beta;
104  vector<double> q;
105  vector<double> lam;
106  vector< vector<double> > alpha;
107  double dt;
108  double dtsq;
109  uint32_t order;
110  uint32_t order2;
111  vector<gjstruc> step;
112 };
113 
117 //struct trianglestruc
118 //{
119 // //! center of mass
120 // Vector com;
121 // //! outward facing normal
122 // Vector normal;
123 // //! Area
124 // float area;
125 // //! Index to parent piece
126 // uint16_t pidx;
127 // uint16_t tidx[3];
128 // float heat;
129 // float temp;
130 // float irradiance;
131 // vector<vector<size_t>> triangleindex;
132 //};
133 
135 //struct structurestruc
136 //{
137 // vector <Vector> vertices;
138 // vector <trianglestruc> triangles;
139 //};
140 
142 
145 //typedef struct
146 //{
147 // //! Time step in seconds
148 // double dt;
149 // //! Time step in Julian days
150 // double dtj;
151 // //! Simulated starting time in MJD
152 // double mjdbase;
153 // //! Acceleration factor for simulated time
154 // double mjdaccel;
155 // //! Offset factor for simulated time (simtime = mjdaccel * realtime + mjddiff)
156 // double mjddiff;
157 // //! Simulation mode as listed in \def defs_physics
158 // int32_t mode;
159 // float heat = 300. * 900. * 1.;
160 // Vector ftorque;
161 // Vector atorque;
162 // Vector rtorque;
163 // Vector gtorque;
164 // Vector htorque;
165 // Vector hmomentum;
166 // Vector ctorque;
167 // Vector fdrag;
168 // Vector adrag;
169 // Vector rdrag;
170 // Vector thrust;
171 // Vector moi = Vector(1.,1.,1.);
172 // Vector com;
173 // float hcap = 900.;
174 // float mass = 1.;
175 // float area = .001f;
176 // vector <Vector> vertices;
177 // vector <trianglestruc> triangles;
178 //} physicsstruc;
180 
181 #endif // ORBITDEF_H
Gauss-Jackson integration handle.
Definition: physicsdef.h:98
3 element generic row vector
Definition: vector.h:53
vector< vector< int32_t > > binom
Definition: physicsdef.h:100
double dt
Definition: physicsdef.h:107
Definition: vector.cpp:1578
vector< vector< double > > alpha
Definition: physicsdef.h:106
vector< double > q
Definition: physicsdef.h:104
long b
Definition: jpegint.h:371
vector< double > c
Definition: physicsdef.h:101
Definition: vector.cpp:2097
rvector s
Definition: physicsdef.h:87
Gauss Jackson Integration structure.
Definition: physicsdef.h:82
rvector sa
Definition: physicsdef.h:89
Headers and definitions common to all COSMOS.
locstruc sloc
Definition: physicsdef.h:84
vector< vector< double > > beta
Definition: physicsdef.h:103
Definition: eci2kep_test.cpp:33
uint32_t order
Definition: physicsdef.h:109
uint32_t order2
Definition: physicsdef.h:110
double dtsq
Definition: physicsdef.h:108
#define MAXGJORDER
Definition: physicsdef.h:65
rvector sb
Definition: physicsdef.h:90
vector< gjstruc > step
Definition: physicsdef.h:111
rvector ss
Definition: physicsdef.h:88
rvector tau
Definition: physicsdef.h:92
vector< double > lam
Definition: physicsdef.h:105
Definition: convertdef.h:876
vector< double > gam
Definition: physicsdef.h:102