Start using atomic counters and set a CMake policy to the new (2.6) type.
[PaGMO.git] / AstroToolbox / mga_dsm.h
blobf64737c988b8f4f2516506050545255248edae87
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 // ------------------------------------------------------------------------ //
11 #ifndef MGA_DSM_H
12 #define MGA_DSM_H
14 #include <vector>
16 #include "mga.h"
18 struct mgadsmproblem {
19 int type; //problem type
20 std::vector<int> sequence; //fly-by sequence (ex: 3,2,3,3,5,is Earth-Venus-Earth-Earth-Jupiter)
21 double e; //insertion e (only in case total_DV_orbit_insertion)
22 double rp; //insertion rp in km (only in case total_DV_orbit_insertion)
23 customobject asteroid; //asteroid data (in case fly-by sequence has a final number = 10)
24 double AUdist; //Distance to reach in AUs (only in case of time2AUs)
25 double DVtotal; //Total DV allowed in km/s (only in case of time2AUs)
26 double DVonboard; //Total DV on the spacecraft in km/s (only in case of time2AUs)
28 //Pre-allocated memory, in order to remove allocation of heap space in MGA_DSM calls
29 std::vector<double*> r;// = std::vector<double*>(n);
30 std::vector<double*> v;// = std::vector<double*>(n);
31 std::vector<double> DV;// = std::vector<double>(n+1);
35 int MGA_DSM(
36 /* INPUT values: */
37 std::vector<double> x , // it is the decision vector
38 mgadsmproblem &mgadsm, // contains the problem specific data
40 /* OUTPUT values: */
41 double &J // J output
44 #endif