From e04255827b63e2cecbbe957185458eb9b22b9a70 Mon Sep 17 00:00:00 2001 From: Francesco Biscani Date: Thu, 11 Dec 2008 14:54:23 +0100 Subject: [PATCH] More header fixage, 'using' statement removal. --- AstroToolbox/mga_dsm.cpp | 9 ++++++++- AstroToolbox/mga_dsm.h | 17 +++++------------ AstroToolbox/time2distance.cpp | 13 ++++++++++--- AstroToolbox/time2distance.h | 11 +---------- 4 files changed, 24 insertions(+), 26 deletions(-) diff --git a/AstroToolbox/mga_dsm.cpp b/AstroToolbox/mga_dsm.cpp index 911af61..50f08f2 100644 --- a/AstroToolbox/mga_dsm.cpp +++ b/AstroToolbox/mga_dsm.cpp @@ -8,11 +8,18 @@ // Copyright (c) 2004-2007 European Space Agency // // ------------------------------------------------------------------------ // + +#include #include #include #include -#include "Pl_Eph_An.h" + +#include "Lambert.h" #include "mga_dsm.h" +#include "propagateKEP.h" +#include "time2distance.h" + +using namespace std; // [MR] TODO: exctract these somewhere... const double MU[9] = { diff --git a/AstroToolbox/mga_dsm.h b/AstroToolbox/mga_dsm.h index 9030b94..f9dd940 100644 --- a/AstroToolbox/mga_dsm.h +++ b/AstroToolbox/mga_dsm.h @@ -11,19 +11,13 @@ #ifndef MGA_DSM_H #define MGA_DSM_H -#include -#include "Pl_Eph_An.h" -#include "Astro_Functions.h" -#include "propagateKEP.h" -#include "Lambert.h" -#include "time2distance.h" -#include "mga.h" - -using namespace std; +#include + +#include "mga.h" struct mgadsmproblem { int type; //problem type - vector sequence; //fly-by sequence (ex: 3,2,3,3,5,is Earth-Venus-Earth-Earth-Jupiter) + std::vector sequence; //fly-by sequence (ex: 3,2,3,3,5,is Earth-Venus-Earth-Earth-Jupiter) double e; //insertion e (only in case total_DV_orbit_insertion) double rp; //insertion rp in km (only in case total_DV_orbit_insertion) customobject asteroid; //asteroid data (in case fly-by sequence has a final number = 10) @@ -40,7 +34,7 @@ struct mgadsmproblem { int MGA_DSM( /* INPUT values: */ - vector x , // it is the decision vector + std::vector x , // it is the decision vector mgadsmproblem, // contains the problem specific data /* OUTPUT values: */ @@ -48,5 +42,4 @@ int MGA_DSM( double* DVVec// DVVec ); - #endif diff --git a/AstroToolbox/time2distance.cpp b/AstroToolbox/time2distance.cpp index 8fcabca..7226f4a 100644 --- a/AstroToolbox/time2distance.cpp +++ b/AstroToolbox/time2distance.cpp @@ -20,12 +20,19 @@ %Comments: everything works in non dimensional units */ -#include +#include +//#include +//#include +//#include +//#include #include "Astro_Functions.h" -#include "time2distance.h" +#include "propagateKEP.h" +#include "time2distance.h" + +using namespace std; -double time2distance(const double *r0, const double *v0, double rtarget) +double time2distance(const double *r0, const double *v0, const double &rtarget) { double temp = 0.0; double E[6]; diff --git a/AstroToolbox/time2distance.h b/AstroToolbox/time2distance.h index b798a09..2f8fd73 100644 --- a/AstroToolbox/time2distance.h +++ b/AstroToolbox/time2distance.h @@ -11,16 +11,7 @@ #ifndef TIME_2_DISTANCE_H #define TIME_2_DISTANCE_H -#include -#include -#include -#include -#include -#include "propagateKEP.h" - -using namespace std; - -double time2distance(const double*, const double*, double); +double time2distance(const double*, const double*, const double &); #endif -- 2.11.4.GIT