mga.hpp
Go to the documentation of this file.
1 // ------------------------------------------------------------------------ //
2 // This source file is part of the 'ESA Advanced Concepts Team's //
3 // Space Mechanics Toolbox' software. //
4 // //
5 // The source files are for research use only, //
6 // and are distributed WITHOUT ANY WARRANTY. Use them on your own risk. //
7 // //
8 // Copyright (c) 2004-2007 European Space Agency //
9 // ------------------------------------------------------------------------ //
10 
11 #pragma once
12 
13 #include <vector>
14 #include "pl_eph_an.hpp"
15 
16 using namespace std;
17 
18 // problem types
19 const int orbit_insertion = 0; // Tandem
20 const int total_DV_orbit_insertion = 1; // Cassini 1
21 const int rndv = 2; // Rosetta
22 const int total_DV_rndv = 3; // Cassini 2 and Messenger
23 const int asteroid_impact = 4; // gtoc1
24 const int time2AUs = 5; // SAGAS
25 
27 {
28  double keplerian[6];
29  double epoch;
30  double mu;
31 };
32 
33 struct mgaproblem
34 {
35  int type; //problem type
36  vector<int> sequence; //fly-by sequence (ex: 3,2,3,3,5,is Earth-Venus-Earth-Earth-Jupiter)
37  vector<int> rev_flag; //vector of flags for clockwise legs
38  double e; //insertion e (only in case total_DV_orbit_insertion)
39  double rp; //insertion rp in km (only in case total_DV_orbit_insertion)
40  customobject asteroid; //asteroid data (in case fly-by sequence has a final number = 10)
41  double Isp;
42  double mass;
43  double DVlaunch;
44 };
45 
46 int MGA(
47  //INPUTS
48  vector<double>,
49  mgaproblem,
50 
51  //OUTPUTS
52  vector<double> &, vector<double> &, double &);
Definition: mga.hpp:26
const int rndv
Definition: mga.hpp:21
const int total_DV_orbit_insertion
Definition: mga.hpp:20
double mass
Definition: mga.hpp:42
double mu
Definition: mga.hpp:30
const int orbit_insertion
Definition: mga.hpp:19
double Isp
Definition: mga.hpp:41
double rp
Definition: mga.hpp:39
int type
Definition: mga.hpp:35
vector< int > rev_flag
Definition: mga.hpp:37
const int asteroid_impact
Definition: mga.hpp:23
const int time2AUs
Definition: mga.hpp:24
const int total_DV_rndv
Definition: mga.hpp:22
vector< int > sequence
Definition: mga.hpp:36
double DVlaunch
Definition: mga.hpp:43
int MGA(vector< double >, mgaproblem, vector< double > &, vector< double > &, double &)
Definition: mga.cpp:24
double epoch
Definition: mga.hpp:29
double e
Definition: mga.hpp:38
Definition: mga.hpp:33
customobject asteroid
Definition: mga.hpp:40