-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExecute.h
More file actions
28 lines (23 loc) · 943 Bytes
/
Execute.h
File metadata and controls
28 lines (23 loc) · 943 Bytes
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
#ifndef EXECUTE_H
#define EXECUTE_H
#include <string>
#include <vector>
#include "Order.h"
#include "Legendre.h"
//Execute class is used to implement the simulation.
class Execute {
public:
const std::string filename;
std::vector<Order*> n_orders;
static Execute* getInstance();
void build(); //reads from EMG2008 data and stores into defined data structures
void calculate(double r, double phi, double lambda); // calls calculatePotential and calculateAcceleration
double calculatePotential(double r, double phi, double lambda); // calculates the gravitational potential
void calculateAcceleration(double r, double phi, double lambda, double& ax, double& ay, double& az); //acc
private:
Execute();
static Execute* mExecute;
static constexpr double R = 6378137.0; // Earth's radius in meters
static constexpr double GM = 3.986004418e14; // Earth's gravitational constant times mass in m^3/s^2
};
#endif