1 #ifndef TAYLOR_FIXEDTHRUST_H
2 #define TAYLOR_FIXEDTHRUST_H
9 typedef double MY_FLOAT;
22 #define InitMyFloat(r)
23 #define ClearMyFloat(r)
26 #define AssignMyFloat(a, b) {(a)=(b);}
29 #define MakeMyFloatA(r,a) (r=(double)(a))
32 #define MakeMyFloatC(r,s,a) (r=(double)(a))
35 #define MakeMyFloatB(r,a) (r=(double)(a),r)
38 #define AddMyFloatA(r,a,b) (r=(a)+(b))
41 #define SubstractMyFloatA(r,a,b) (r=(a)-(b))
44 #define MultiplyMyFloatA(r,a,b) (r=(a)*(b))
47 #define DivideMyFloatA(r,a,b) (r=(a)/(b))
50 #define DivideMyFloatByInt(r,a,i) (r=(a)/(double)(i))
52 #define NegateMyFloatA(r,a) (r= -(a))
55 #define sqrtMyFloatA(r,a) (r=sqrt(a))
57 #define ExponentiateMyFloatA(r,a,b) (r=pow((a),(b)))
59 #define ExponentiateMyFloatIA(r,a,b) (r=pow((a),(double)(b)))
61 #define sinMyFloatA(r,a) (r=sin((a)))
63 #define cosMyFloatA(r,a) (r=cos((a)))
65 #define tanMyFloatA(r,a) (r=tan((a)))
67 #define atanMyFloatA(r,a) (r=atan((a)))
69 #define expMyFloatA(r,a) (r=exp((a)))
71 #define logMyFloatA(r,a) (r=log((a)))
73 #define sinhMyFloatA(r,a) (r=sinh(a))
75 #define coshMyFloatA(r,a) (r=cosh(a))
77 #define tanhMyFloatA(r,a) (r=tanh(a))
81 #define log10MyFloatA(r,a) (r=log10((a)))
83 #define fabsMyFloatA(r,a) (r=fabs(a))
86 #define MyFloatToInt(ir,fa) (ir=(int)(fa))
88 #define MyFloatToDouble(ir,fa) (ir=(double)(fa))
92 #define MyFloatA_GE_B(a,b) ((a)>=(b))
93 #define MyFloatA_GT_B(a,b) ((a)> (b))
94 #define MyFloatA_LE_B(a,b) ((a)<=(b))
95 #define MyFloatA_LT_B(a,b) ((a)< (b))
96 #define MyFloatA_EQ_B(a,b) ((a)==(b))
97 #define MyFloatA_NEQ_B(a,b) ((a)!=(b))
102 #endif // TAYLOR_FIXEDTHRUST_H
104 MY_FLOAT **taylor_coefficients_kepler_info(MY_FLOAT t, MY_FLOAT *x,
int order);
106 MY_FLOAT **taylor_coefficients_kepler_infoA(MY_FLOAT t, MY_FLOAT *x,
int order,
int reuse_last_computation);
108 int taylor_step_kepler_info(MY_FLOAT *ti, MY_FLOAT *x,
int dir,
int step_ctl,
109 double log10abserr,
double log10relerr,
110 MY_FLOAT *endtime, MY_FLOAT *ht,
int *order);
112 int taylor_fixedthrust(
double y[6],
double t0,
double tf,
double thrust[3],
double abstol,
double reltol);