12 #include "misc4Tandem.h"
17 static const double x_atl[9] = {2.5,3,3.5,4,4.5,5,5.5,5.75,6};
18 static const double y_atl[15] = {-90,-40, -30,-29,-28.5, -20, -10, 0, 10, 20,28.5,29,30, 40, 90};
19 static const double data_atl[15][9] = {
20 {1e-1,1e-1,1e-1,1e-1,1e-1,1e-1,1e-1,1e-1,1e-1},
21 {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},
22 {10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0},
23 {1160,1100,1010,930,830,740,630,590,550},
24 {2335.0 ,2195.0,2035.0,1865.0,1675.0,1480.0,1275.0,1175.0,1075.0},
25 {2335.0 ,2195.0,2035.0,1865.0,1675.0,1480.0,1275.0,1175.0,1075.0},
26 {2335.0 ,2195.0,2035.0,1865.0,1675.0,1480.0,1275.0,1175.0,1075.0},
27 {2335.0 ,2195.0,2035.0,1865.0,1675.0,1480.0,1275.0,1175.0,1075.0},
28 {2335.0 ,2195.0,2035.0,1865.0,1675.0,1480.0,1275.0,1175.0,1075.0},
29 {2335.0 ,2195.0,2035.0,1865.0,1675.0,1480.0,1275.0,1175.0,1075.0},
30 {2335.0 ,2195.0,2035.0,1865.0,1675.0,1480.0,1275.0,1175.0,1075.0},
31 {1160,1100,1010,930,830,740,630,590,550},
32 {10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0},
33 {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},
34 {1e-1,1e-1,1e-1,1e-1,1e-1,1e-1,1e-1,1e-1,1e-1}
39 static const double x_sf[5] = {1,2,3,4,5};
40 static const double y_sf[15] = {-90, -65, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 65, 90};
41 static const double data_sf[15][5] = {
42 {1e-3,1e-3,1e-3,1e-3,1e-3},
43 {100.00000,100.00000,100.00000,100.00000,100.00000},
44 {1830.50000,1815.90000,1737.70000,1588.00000,1344.30000},
45 {1910.80000,1901.90000,1819.00000,1636.40000,1369.30000},
46 {2001.80000,1995.30000,1891.30000,1673.90000,1391.90000},
47 {2108.80000,2088.60000,1947.90000,1708.00000,1409.50000},
48 {2204.00000,2167.30000,1995.50000,1734.50000,1419.60000},
49 {2270.80000,2205.80000,2013.60000,1745.10000,1435.20000},
50 {2204.70000,2133.60000,1965.40000,1712.80000,1413.60000},
51 {2087.90000,2060.60000,1917.70000,1681.10000,1392.50000},
52 {1979.17000,1975.40000,1866.50000,1649.00000,1371.70000},
53 {1886.90000,1882.20000,1801.00000,1614.60000,1350.50000},
54 {1805.90000,1796.00000,1722.70000,1571.60000,1327.60000},
55 {100.00000,100.00000,100.00000,100.00000,100.00000},
56 {1e-3,1e-3,1e-3,1e-3,1e-3}
59 int xant(
const double &x) {
67 int yant(
const double &y) {
75 int xantA5(
const double &x) {
78 if (x_atl[i]>x)
break;
83 int yantA5(
const double &y) {
86 if (y_atl[i]>y)
break;
93 double interp2SF(
const double &VINF,
const double &declination) {
96 int v_indx=xant(VINF);
97 int dec_indx=yant(declination);
98 if (fabs(declination)>=90)
return 1e-3;
99 if ((VINF<1)||(VINF>5))
return 1e-3;
101 double dx = x_sf[v_indx+1]-x_sf[v_indx];
102 double dydx = dx * (y_sf[dec_indx+1]-y_sf[dec_indx]);
103 retval = data_sf[dec_indx][v_indx] / dydx * (x_sf[v_indx+1]-VINF) * (y_sf[dec_indx+1]-declination);
104 retval += data_sf[dec_indx][v_indx+1] / dydx * (VINF - x_sf[v_indx]) * (y_sf[dec_indx+1]-declination);
105 retval += data_sf[dec_indx+1][v_indx] / dydx * (x_sf[v_indx+1]-VINF) * (declination - y_sf[dec_indx]);
106 retval += data_sf[dec_indx+1][v_indx+1] / dydx * (VINF - x_sf[v_indx]) * (declination - y_sf[dec_indx]);
111 double interp2A5(
const double &VINF,
const double &declination) {
114 int v_indx=xantA5(VINF);
115 int dec_indx=yantA5(declination);
116 if ((VINF<2.5)||(VINF>6))
return 1e-1;
117 if (fabs(declination)>=90)
return 1e-1;
119 double dx = x_atl[v_indx+1]-x_atl[v_indx];
120 double dydx = dx * (y_atl[dec_indx+1]-y_atl[dec_indx]);
121 retval = data_atl[dec_indx][v_indx] / dydx * (x_atl[v_indx+1]-VINF) * (y_atl[dec_indx+1]-declination);
122 retval += data_atl[dec_indx][v_indx+1] / dydx * (VINF - x_atl[v_indx]) * (y_atl[dec_indx+1]-declination);
123 retval += data_atl[dec_indx+1][v_indx] / dydx * (x_atl[v_indx+1]-VINF) * (declination - y_atl[dec_indx]);
124 retval += data_atl[dec_indx+1][v_indx+1] / dydx * (VINF - x_atl[v_indx]) * (declination - y_atl[dec_indx]);
129 double SoyuzFregat (
const double &VINF,
const double &declination) {
134 return interp2SF(VINF,declination);
138 double Atlas501 (
const double &VINF,
const double &declination) {
140 return interp2A5(VINF,declination);
142 void ecl2equ (
double (&ecl)[3],
double (&equ)[3]){
143 static const double incl=0.409072975;
149 equ[1]=temp[1]*cos(incl)-temp[2]*sin(incl);
150 equ[2]=temp[1]*sin(incl)+temp[2]*cos(incl);