-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVessel.hpp
More file actions
50 lines (36 loc) · 1 KB
/
Vessel.hpp
File metadata and controls
50 lines (36 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef VESSEL_H
#define VESSEL_H
#include "orb.hpp"
#include <vector>
class CelestialBody;
class Vessel {
public:
// Physical State Vectors
LinearStateVector lin_state;
AngularStateVector rot_state;
// Forces
std::vector<ForceData*> force_stack;
// Internal handle and current reference body
ObjHandle h;
CelestialBody *ref;
// Physical Parameters
double mass, empty_mass;
PMI moi;
// Construct and Destruct
Vessel();
~Vessel();
// Called at the beginning of each propagation step
int preStep(double mjd, double simt, double dt);
void update(double mjd, double simt, double dt);
// Gravity Reference
void setReference(ObjHandle hRef);
// Interpolate mass due to propellant usage
double interpTotalMass(double step);
// Forces
void addForce(const Vector3& F, const Vector3& pos);
void getTotalForce(Vector3& F); // Gets total force on vessel in body coords
void getTotalTorque(Vector3& T);
// Coordinate Transforms
void Local2Global(const Vector3& loc, Vector3& glob);
};
#endif