• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • astro
planetarySats.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2012 Gerhard HOLTKAMP
9 //
10 
11 /***************************************************************************
12 * Calculate Spacecraft around other planets *
13 * *
14 * *
15 * Open Source Code. License: GNU LGPL Version 2+ *
16 * *
17 * Author: Gerhard HOLTKAMP, 26-AUG-2012 *
18 ***************************************************************************/
19 
20 /*------------ include files and definitions -----------------------------*/
21 #include "planetarySats.h"
22 #include <fstream>
23 #include <iostream>
24 #include <cstdlib>
25 #include <cstring>
26 #include <cmath>
27 #include <ctime>
28 using namespace std;
29 
30 #include "attlib.h"
31 #include "astrolib.h"
32 
33 // ################ Planetary Sats Class ####################
34 
35 PlanetarySats::PlanetarySats()
36 {
37  plsatinit();
38 }
39 
40 PlanetarySats::~PlanetarySats()
41 {
42 
43 }
44 
45 double PlanetarySats::atan23 (double y, double x)
46  {
47  // redefine atan2 so that it does'nt crash when both x and y are 0
48  double result;
49 
50  if ((x == 0) && (y == 0)) result = 0;
51  else result = atan2 (y, x);
52 
53  return result;
54  }
55 
56 void PlanetarySats::plsatinit()
57 {
58  // initialize planetary sat data
59  pls_moonflg = false;
60  pls_day = 1;
61  pls_month = 1;
62  pls_year = 2012;
63  pls_hour = 0;
64  pls_minute = 0;
65  pls_second = 0;
66  pls_del_auto = 1;
67  pls_step = 60.0;
68  pls_delta_rt = 0.0;
69  getTime();
70  getMars();
71 
72  strcpy (pls_satelmfl, "./planetarysats.txt");
73 
74 }
75 
76 void PlanetarySats::getTime () // Get System Time and Date
77 {
78  time_t tt;
79  int hh, mm, ss;
80  double jd, hr;
81 
82  tt = time(NULL);
83  jd = 40587.0 + tt/86400.0; // seconds since 1-JAN-1970
84 
85  jd = jd + pls_delta_rt / 24.0;
86  caldat(jd, hh, mm, ss, hr);
87  pls_year = ss;
88  pls_month = mm;
89  pls_day = hh;
90 
91  dms(hr, hh, mm, jd);
92  pls_hour = hh;
93  pls_minute = mm;
94  pls_second = int(jd);
95  if (pls_del_auto) pls_del_tdut = DefTdUt(pls_year);
96  setMJD(pls_year, pls_month, pls_day, hh, mm, jd);
97 };
98 
99 void PlanetarySats::setStepWidth(double s)
100 {
101  // set the step width (in seconds) used for calculations
102  if (s < 0.01) pls_step = 0.01;
103  else pls_step = s;
104 }
105 
106 void PlanetarySats::setDeltaRT(double drt)
107 {
108  pls_delta_rt = drt;
109 }
110 
111 void PlanetarySats::setDeltaTAI_UTC(double d)
112 {
113  // c is the difference between TAI and UTC according to the IERS
114  // we have to add 32.184 sec to get to the difference TT - UT
115  // which is used in the calculations here
116 
117  pls_del_tdut = d + 32.184;
118  pls_del_auto = 0;
119 }
120 
121 void PlanetarySats::setAutoTAI_UTC()
122 {
123  // set the difference between TAI and UTC according to the IERS
124  pls_del_auto = true;
125  pls_del_tdut = DefTdUt(pls_year);
126 }
127 
128 void PlanetarySats::setMJD(int year, int month, int day, int hour, int min, double sec)
129 {
130  // set the (MJD-) time currently used for calculations to year, month, day, hour, min, sec
131  double jd;
132 
133  pls_year = year;
134  pls_month = month;
135  pls_day = day;
136  pls_hour = hour;
137  pls_minute = min;
138  pls_second = sec;
139 
140  jd = ddd(hour, min, sec);
141  jd = mjd(day, month, year, jd);
142 
143  pls_time = jd;
144 
145  if (pls_del_auto) pls_del_tdut = DefTdUt(pls_year);
146 
147 }
148 
149 void PlanetarySats::getDatefromMJD(double mjd, int &year, int &month, int &day, int &hour, int &min, double &sec)
150 {
151  // convert times given in Modified Julian Date (MJD) into conventional date and time
152 
153  double magn;
154 
155  caldat((mjd), day, month, year, magn);
156  dms (magn,hour,min,sec);
157  if (sec>30.0) min++;;
158  if (min>59)
159  {
160  hour++;
161  min=0;
162  };
163 }
164 
165 void PlanetarySats::setSatFile(char* fname)
166 {
167  strcpy (pls_satelmfl, fname);
168 
169 }
170 
171 void PlanetarySats::setStateVector(double mjd, double x, double y, double z, double vx, double vy, double vz)
172 {
173  pls_rep[0] = x;
174  pls_rep[1] = y;
175  pls_rep[2] = z;
176  pls_vep[0] = vx;
177  pls_vep[1] = vy;
178  pls_vep[2] = vz;
179 
180  int year = 0;
181  int month = 0;
182  int day = 0;
183  int hour = 0;
184  int min = 0;
185  double sec = 0;
186  getDatefromMJD(mjd, year, month, day, hour, min, sec);
187  setMJD(year, month, day, hour, min, sec);
188  pls_tepoch = pls_time;
189  //pls_tepoch = pls_time + pls_del_tdut / 86400.0; // epoch in TT
190 }
191 
192 int PlanetarySats::getStateVector(int nsat)
193 {
194  // read the state vector from the planetary sat file
195  // nsat = number of eligible sat to select (1 if first or only sat)
196  // RETURN number of eligible sat selected, 0 if no suitable sats of file problems
197 
198  int fsc, j, k, nst, utc;
199  int yr, month, day, hour, min;
200  double sec;
201  bool searching;
202  ifstream cfle;
203  char satname[40]; // name of satellite
204  char plntname[40]; // name of planet
205 
206  strcpy(satname, "");
207  strcpy(plntname, "");
208  nst = 0;
209 
210  searching = true;
211  fsc = 0;
212 
213  cfle.open(pls_satelmfl, ios::in);
214  if (!cfle)
215  {
216  searching = false;
217  cfle.close();
218  };
219  if(searching)
220  {
221  while (searching)
222  {
223  fsc = 1;
224 
225  if (!cfle.getline(satname,40)) fsc = 0;
226  else
227  {
228  k = strlen(satname);
229  if ((k>1) && (satname[0] == '#'))
230  {
231  for (j=1; j<k; ++j)
232  {
233  pls_satname[j-1] = satname[j];
234  if(pls_satname[j-1] == '\n') pls_satname[j-1] = '\0';
235  };
236  pls_satname[k-1] = '\0';
237  }
238  else fsc = 0;
239  };
240 
241  if (cfle.eof())
242  {
243  fsc = 0;
244  searching = false;
245  };
246 
247  if (fsc)
248  {
249  if (!cfle.getline(plntname, 40)) fsc = 0;
250  else
251  {
252  k = strlen(plntname);
253  if (k>0)
254  {
255  if(plntname[k-1] == '\n') plntname[k-1] = '\0';
256  if((k>1) && (plntname[k-2] == '\r')) plntname[k-2] = '\0';
257  };
258  };
259  };
260 
261  if (fsc)
262  {
263  cfle >> yr >> month >> day >> hour >> min >> sec >> utc;
264  if (cfle.bad()) fsc = 0;
265  if (cfle.eof())
266  {
267  fsc = 0;
268  searching = false;
269  };
270  };
271 
272  if (fsc)
273  {
274  cfle >> pls_rep[0] >> pls_rep[1] >> pls_rep[2];
275  if (cfle.bad()) fsc = 0;
276  if (cfle.eof())
277  {
278  fsc = 0;
279  searching = false;
280  };
281  };
282 
283  if (fsc)
284  {
285  cfle >> pls_vep[0] >> pls_vep[1] >> pls_vep[2];
286  if (cfle.bad()) fsc = 0;
287  };
288 
289  if (fsc)
290  {
291  if (strncmp(pls_plntname, plntname, 4) == 0) nst++;
292  if (nst == nsat)
293  {
294  searching = false;
295 
296  setMJD(yr, month, day, hour, min, sec);
297  pls_tepoch = pls_time;
298  if (utc) pls_tepoch = pls_tepoch + pls_del_tdut/86400.0; // epoch in TT
299  };
300  };
301  };
302  cfle.close();
303  };
304 
305  if (fsc == 0) nst = 0;
306 
307  return nst;
308 }
309 
310 void PlanetarySats::setPlanet(char* pname)
311 {
312  pls_moonflg = false;
313  strcpy(pls_plntname, pname);
314  if (strncmp("Mars", pname, 4) == 0) getMars();
315  if (strncmp("Venus", pname, 4) == 0) getVenus();
316  if (strncmp("Mercury", pname, 4) == 0) getMercury();
317  if (strncmp("Moon", pname, 4) == 0) getMoon();
318 }
319 
320 void PlanetarySats::stateToKepler()
321 {
322  // convert state vector (mean equatorial J2000.0) into planetary Kepler elements
323 
324  double t, dt, ag, gm, re, j2;
325  double n, c, w, a, ecc, inc;
326  Vec3 r1, v1;
327  Mat3 mx;
328 
329  dt = (pls_tepoch - 51544.5) / 36525.0;
330  gm = pls_GM * 7.4649600000; // convert from m^3/s^2 into km^3/d^2
331  re = pls_R0;
332  j2 = pls_J2;
333 
334  // convert into planet equatorial reference frame
335  if (pls_moonflg)
336  {
337  mx = mxidn();
338  r1 = mxvct (mx, pls_rep);
339  v1 = mxvct (mx, pls_vep);
340 
341  }
342  else
343  {
344  ag = (pls_axl0 + pls_axl1 * dt) * M_PI / 180.0;
345  mx = zrot(ag + M_PI / 2.0);
346  r1 = mxvct (mx, pls_rep);
347  v1 = mxvct (mx, pls_vep);
348 
349  ag = (pls_axb0 + pls_axb1 * dt) * M_PI / 180.0;
350  mx = xrot(M_PI / 2.0 - ag);
351  r1 = mxvct (mx, r1);
352  v1 = mxvct (mx, v1);
353  };
354 
355  v1 *= 86400.0; // convert into km / day
356 
357  oscelm(gm, pls_tepoch, r1, v1, t, pls_m0, pls_a, pls_ecc, pls_ra, pls_per, pls_inc);
358 
359  // now the mean motion
360  a = pls_a;
361  ecc = pls_ecc;
362  inc = pls_inc;
363 
364  // preliminary n
365  if (a == 0) a = 1.0; // just in case
366  if (a < 0) a = -a; // just in case
367  n = sqrt (gm / (a*a*a));
368 
369  // correct for J2 term
370  w = 1.0 - ecc*ecc;
371  if (w > 0)
372  {
373  w = pow (w, -1.5);
374  c = sin (inc*M_PI/180.0);
375  n = n*(1.0 + 1.5*j2*re*re/(a*a) * w * (1.0 - 1.5*c*c));
376  }
377  else n = 1.0; // do something to avoid a domain error
378 
379  n = n / (2.0*M_PI);
380  if (n > 1000.0) n = 1000.0; // avoid possible errors
381 
382  pls_n0 = n;
383 
384 }
385 
386 void PlanetarySats::getKeplerElements(double &perc, double &apoc, double &inc, double &ecc, double &ra, double &tano, double &m0, double &a, double &n0)
387 {
388  // get Kepler elements of orbit with regard to the planetary equator and prime meridian.
389 
390  double t, gm;
391  Vec3 r1, v1;
392  Mat3 mx;
393 
394 
395  if (pls_moonflg) // for the Moon we normally work in J2000. Now get it into planetary
396  {
397  gm = pls_GM * 7.4649600000; // convert from m^3/s^2 into km^3/d^2
398 
399  mx = getSelenographic(pls_tepoch);
400  r1 = mxvct (mx, pls_rep);
401  v1 = mxvct (mx, pls_vep);
402  v1 *= 86400.0; // convert into km / day
403 
404  oscelm(gm, pls_tepoch, r1, v1, t, m0, a, ecc, ra, tano, inc);
405 
406  // now the mean motion
407  if (a == 0) a = 1.0; // just in case
408  if (a < 0) a = -a; // just in case
409  n0 = sqrt (gm / (a*a*a));
410  n0 = n0 / (2.0*M_PI);
411  }
412  else
413  {
414  a = pls_a;
415  n0 = pls_n0;
416  m0 = pls_m0;
417  tano = pls_per;
418  ra = pls_ra;
419  ecc = pls_ecc;
420  inc = pls_inc;
421  };
422 
423  perc = pls_a * (1.0 - pls_ecc) - pls_R0;
424  apoc = pls_a * (1.0 + pls_ecc) - pls_R0;
425 
426 }
427 
428 int PlanetarySats::selectSat(char* sname)
429 {
430  // select specified satellite
431  // RETURN 1 if successful, 0 if no suitable satellite found
432 
433  int nst, res, sl;
434  bool searching;
435 
436  searching = true;
437  nst = 1;
438  sl = strlen(sname);
439 
440  while (searching)
441  {
442  res = getStateVector(nst);
443  if (res)
444  {
445  if (strncmp(pls_satname, sname, sl) == 0) searching = false;
446  }
447  else searching = false;
448  nst++;
449  };
450 
451  return res;
452 }
453 
454 void PlanetarySats::getSatName(char* sname) const
455 {
456  strcpy (sname, pls_satname);
457 }
458 
459 void PlanetarySats::currentPos()
460 {
461  getSatPos(pls_time);
462 }
463 
464 void PlanetarySats::nextStep()
465 {
466  pls_time = pls_time + pls_step / 86400.0;
467  getSatPos(pls_time);
468 }
469 
470 double PlanetarySats::getLastMJD() const
471 {
472  return pls_time;
473 }
474 
475 void PlanetarySats::getPlanetographic(double &lng, double &lat, double &height) const
476 {
477  // planetographic coordinates from current state vector
478 
479  lng = pls_lng;
480  lat = pls_lat;
481  height = pls_height;
482 
483 }
484 
485 void PlanetarySats::getFixedFrame(double &x, double &y, double &z, double &vx, double &vy, double &vz)
486 {
487  // last state vector coordinates in planetary fixed frame
488 
489  x = pls_r[0];
490  y = pls_r[1];
491  z = pls_r[2];
492  vx = pls_v[0];
493  vy = pls_v[1];
494  vz = pls_v[2];
495 }
496 
497 void PlanetarySats::getSatPos (double tutc)
498 {
499  // Get Position of Satellite at MJD-time t (UTC)
500 
501  const double mp2 = 2.0*M_PI;
502 
503  double t, dt, m0, ran, aper, inc, a, ecc, n0, re;
504  double f, e, c, s, k, sh, j2, gm, fac, b1, b2, b3;
505  int j;
506 
507  Vec3 r1, v1, rg1, s2;
508  Mat3 m1, m2;
509 
510  // prepare orbit calculation
511 
512  t = tutc + pls_del_tdut/86400.0;
513  dt = t - pls_tepoch;
514 
515  ecc = pls_ecc;
516  if (ecc >= 1.0) ecc = 0.999; // to avoid crashes
517  a = pls_a;
518  n0 = mp2 * pls_n0;
519  if (a < 1.0) a = 1.0; // avoid possible crashes later on
520  re = pls_R0;
521  f = pls_flat;
522  j2 = pls_J2;
523  gm = pls_GM * 7.4649600000; // convert from m^3/s^2 into km^3/d^2
524 
525  // get current orbit elements ready
526  aper = (re / a) / (1.0 - ecc*ecc);
527  aper = 1.5 * j2 * aper*aper * n0;
528  m0 = pls_inc*M_PI/180.0;
529  ran = -aper * cos(m0) * dt;
530  m0 = sin (m0);
531  aper = aper * (2.0 - 2.5*m0*m0) * dt;
532  ran = pls_ra * M_PI/180.0 + ran;
533  aper = pls_per * M_PI/180.0 + aper;
534  m0 = pls_m0*M_PI/180.0 + n0*dt;
535  inc = pls_inc * M_PI/180.0;
536 
537  // solve Kepler equation
538  if (a < 1.0) a = 1.0; // avoid possible crashes later on
539  e = eccanom(m0, ecc);
540  fac = sqrt(1.0 - ecc*ecc);
541  c = cos(e);
542  s = sin(e);
543  r1.assign (a*(c - ecc), a*fac*s, 0.0);
544 
545  m0 = 1.0 - ecc*c;
546  k = sqrt(gm/a);
547  v1.assign (-k*s/m0, k*fac*c/m0, 0.0);
548 
549  // convert into reference plane
550  m1 = zrot (-aper);
551  m2 = xrot (-inc);
552  m1 *= m2;
553  m2 = zrot (-ran);
554  m2 = m2 * m1;
555  r1 = mxvct (m2, r1);
556  v1 = mxvct (m2, v1);
557  v1 /= 86400.0;
558 
559  // save state vector in planet-fixed frame
560 
561  if (pls_moonflg) m1 = getSelenographic(t);
562  else m1 = zrot((pls_W + pls_Wd*(t-51544.5))*(M_PI/180.0));
563  pls_r = mxvct(m1,r1);
564  pls_v = mxvct(m1,v1);
565  pls_r *= 1000.0;
566  pls_v *= 1000.0;
567 
568  // get the groundtrack coordinates
569 
570  rg1 = mxvct(m1,r1);
571 
572  s2 = carpol(rg1);
573  pls_lat = s2[2]; // just preliminary
574  pls_lng = s2[1]; // measured with the motion of rotation!
575  if (pls_lng > mp2) pls_lng -= mp2;
576  if (pls_lng < -M_PI) pls_lng += mp2;
577  if (pls_lng > M_PI) pls_lng -= mp2;
578 
579  // get height above ellipsoid and geodetic latitude
580  if (abs(r1) > 0.1)
581  {
582  if (f == 0) pls_height = abs(r1) - re;
583  else
584  {
585  c = f*(2.0 - f);
586  s = r1[0]*r1[0] + r1[1]*r1[1];
587  sh = c*r1[2];
588 
589  for (j=0; j<4; ++j)
590  {
591  b1 = r1[2] + sh;
592  b3 = sqrt(s+b1*b1);
593  if (b3 < 1e-5) b3 = sin(pls_lat); // just in case
594  else b3 = b1 / b3;
595  b2 = re / sqrt(1.0 - c*b3*b3);
596  sh = b2 * c * b3;
597  };
598 
599  sh = r1[2] + sh;
600  pls_lat = atan20(sh,sqrt(s));
601  sh = sqrt(s+sh*sh) - b2;
602  pls_height = sh;
603  }
604  }
605  else pls_height = 0; // this should never happen
606 
607  pls_lat = pls_lat * 180.0 / M_PI;
608  pls_lng = pls_lng * 180.0 / M_PI;
609 
610  }
611 
612 
613 void PlanetarySats::getMars() // Mars planetary constants
614 {
615  pls_J2 = 1.964e-3;
616  pls_R0 = 3397.2;
617  pls_flat = 0.00647630;
618  pls_axl0 = 317.681;
619  pls_axl1 = -0.108;
620  pls_axb0 = 52.886;
621  pls_axb1 = -0.061;
622  pls_W = 176.868;
623  pls_Wd = 350.8919830;
624  pls_GM = 4.282828596416e+13; // 4.282837405582e+13
625 }
626 
627 void PlanetarySats::getVenus() // Venus planetary constants
628 {
629  pls_J2 = 0.027e-3;
630  pls_R0 = 6051.9;
631  pls_flat = 0.0;
632  pls_axl0 = 272.72;
633  pls_axl1 = 0.0;
634  pls_axb0 = 67.15;
635  pls_axb1 = 0.0;
636  pls_W = 160.26;
637  pls_Wd = -1.4813596;
638  pls_GM = 3.24858761e+14;
639 }
640 
641 void PlanetarySats::getMercury() // Mercury planetary constants
642 {
643  pls_J2 = 0.0;
644  pls_R0 = 2439.7;
645  pls_flat = 0.0;
646  pls_axl0 = 281.01;
647  pls_axl1 = -0.033;
648  pls_axb0 = 61.45;
649  pls_axb1 = -0.005;
650  pls_W = 329.71;
651  pls_Wd = 6.1385025;
652  pls_GM = 2.20320802e+13;
653 }
654 
655 void PlanetarySats::getMoon() // Moon planetary constants
656 {
657  pls_moonflg = true;
658  pls_J2 = 0.2027e-3;
659  pls_R0 = 1738.0;
660  pls_flat = 0.0;
661  pls_axl0 = 0.0;
662  pls_axl1 = 0.0;
663  pls_axb0 = 90.0;
664  pls_axb1 = 0.0;
665  pls_W = 0.0;
666  pls_Wd = 13.17635898;
667  pls_GM = 4.90279412e+12;
668 }
669 
670 Mat3 PlanetarySats::getSelenographic (double jd)
671 {
672  // Calculate the Matrix to transform from Mean of J2000 into selenographic
673  // coordinates at MJD time jd.
674 
675  double t, gam, gmp, l, omg, mln;
676  double a, b, c, ic, gn, gp, omp;
677  double const degrad = M_PI / 180.0;
678  Mat3 m1, m2;
679 
680  t = (jd - 15019.5) / 36525.0;
681  gam = 281.2208333 + ((0.33333333e-5*t + 0.45277778e-3)*t + 1.7191750)*t;
682  gmp = 334.3295556 + ((-0.125e-4*t - 0.10325e-1)*t + 4069.0340333)*t;
683  l = 279.6966778 + (0.3025e-3*t + 36000.768925)*t;
684  omg = 259.1832750 + ((0.22222222e-5*t + 0.20777778e-2)*t - 1934.1420083)*t;
685  b = 23.45229444 + ((0.50277778e-6*t -0.16388889e-5)*t - 0.130125e-1)*t;
686  mln = 270.4341639 + ((0.1888889e-5*t -0.11333e-2)*t + 481267.8831417)*t;
687  ic = 1.535*degrad;
688  gn = (l - gam)*degrad;
689  gp = (mln - gmp)*degrad;
690  omp = (gmp - omg)*degrad;
691  a = -107.0*cos(gp) + 37.0*cos(gp+2.0*omp) -11.0*cos(2.0*(gp+omp));
692  a = a*0.000277778*degrad + ic;
693  c = (-109.0*sin(gp) + 37.0*sin(gp+2.0*omp) - 11.0*sin(2.0*(gp+omp)))/sin(ic);
694  c = (c*0.000277778 + omg)*degrad;
695  gn = -12.0*sin(gp) + 59.0*sin(gn) + 18.0*sin(2.0*omp);
696  gn = gn*0.000277778*degrad; // tau
697 
698  b *= degrad;
699  gam = cos(a)*cos(b) + sin(a)*sin(b)*cos(c);
700  gmp = gam*gam;
701  if(gmp > 1.0) gmp = 0;
702  else gmp = sqrt(1.0 - gmp);
703  gam = atan23(gmp,gam); // theta
704  t = cos(a)*sin(b) - sin(a)*sin(b)*cos(c);
705  l = -sin(a)*sin(c);
706 
707  gmp = atan23(l,t); // phi
708  t = sin(a)*cos(b) - cos(a)*sin(b)*cos(c);
709  l = -sin(b)*sin(c);
710  a = atan23(l,t); // delta
711  c = a + mln*degrad + gn - c; // psi
712 
713  // libration rotation matrix from Mean equator to true selenographic
714  m1 = zrot(gmp);
715  m2 = xrot(gam);
716  m1 = m2 * m1;
717  m2 = zrot(c);
718  m1 = m2 * m1;
719 
720  t = julcent(jd);
721  m2 = pmatequ(0,t); // convert from mean of J2000 to mean of epoch
722  m1 = m1 * m2;
723 
724  return m1;
725 }
726 
Mat3
Definition: attlib.h:63
PlanetarySats::setAutoTAI_UTC
void setAutoTAI_UTC()
Definition: planetarySats.cpp:121
PlanetarySats::getTime
void getTime()
Definition: planetarySats.cpp:76
PlanetarySats::getDatefromMJD
static void getDatefromMJD(double mjd, int &year, int &month, int &day, int &hour, int &min, double &sec)
Definition: planetarySats.cpp:149
degrad
const double degrad
Definition: eclsolar.cpp:45
PlanetarySats::~PlanetarySats
~PlanetarySats()
Definition: planetarySats.cpp:40
Vec3
Definition: attlib.h:27
PlanetarySats::PlanetarySats
PlanetarySats()
Definition: planetarySats.cpp:35
PlanetarySats::nextStep
void nextStep()
Definition: planetarySats.cpp:464
PlanetarySats::setMJD
void setMJD(int year, int month, int day, int hour, int min, double sec)
Definition: planetarySats.cpp:128
atan20
double atan20(double y, double x)
Definition: attlib.cpp:25
PlanetarySats::getLastMJD
double getLastMJD() const
Definition: planetarySats.cpp:470
ddd
double ddd(int d, int m, double s)
Definition: astrolib.cpp:35
astrolib.h
DefTdUt
double DefTdUt(int yi)
Definition: astrolib.cpp:223
PlanetarySats::setSatFile
void setSatFile(char *fname)
Definition: planetarySats.cpp:165
carpol
Vec3 carpol(const Vec3 &c)
Definition: attlib.cpp:184
attlib.h
PlanetarySats::setDeltaRT
void setDeltaRT(double drt)
Definition: planetarySats.cpp:106
zrot
Mat3 zrot(double a)
Definition: attlib.cpp:530
pmatequ
Mat3 pmatequ(double t1, double t2)
Definition: astrolib.cpp:408
oscelm
void oscelm(double gm, double t, Vec3 &r1, Vec3 &v1, double &t0, double &m0, double &a, double &ecc, double &ran, double &aper, double &inc)
Definition: astrolib.cpp:1220
PlanetarySats::setStepWidth
void setStepWidth(double s)
Definition: planetarySats.cpp:99
caldat
void caldat(double mjd, int &day, int &month, int &year, double &hour)
Definition: astrolib.cpp:145
planetarySats.h
PlanetarySats::getStateVector
int getStateVector(int nsat)
Definition: planetarySats.cpp:192
PlanetarySats::getKeplerElements
void getKeplerElements(double &perc, double &apoc, double &inc, double &ecc, double &ra, double &tano, double &m0, double &a, double &n0)
Definition: planetarySats.cpp:386
abs
double abs(const Vec3 &c)
Definition: attlib.cpp:100
PlanetarySats::setStateVector
void setStateVector(double mjd, double x, double y, double z, double vx, double vy, double vz)
Definition: planetarySats.cpp:171
PlanetarySats::setDeltaTAI_UTC
void setDeltaTAI_UTC(double d)
Definition: planetarySats.cpp:111
PlanetarySats::selectSat
int selectSat(char *sname)
Definition: planetarySats.cpp:428
PlanetarySats::currentPos
void currentPos()
Definition: planetarySats.cpp:459
dms
void dms(double dd, int &d, int &m, double &s)
Definition: astrolib.cpp:59
eccanom
double eccanom(double man, double ecc)
Definition: astrolib.cpp:915
PlanetarySats::getSatName
void getSatName(char *sname) const
Definition: planetarySats.cpp:454
mjd
double mjd(int day, int month, int year, double hour)
Definition: astrolib.cpp:94
PlanetarySats::getFixedFrame
void getFixedFrame(double &x, double &y, double &z, double &vx, double &vy, double &vz)
Definition: planetarySats.cpp:485
Vec3::assign
void assign(double x=0, double y=0, double z=0)
Definition: attlib.cpp:46
PlanetarySats::setPlanet
void setPlanet(char *pname)
Definition: planetarySats.cpp:310
M_PI
#define M_PI
Definition: GeoDataCoordinates.h:26
mxidn
Mat3 mxidn()
Definition: attlib.cpp:368
xrot
Mat3 xrot(double a)
Definition: attlib.cpp:488
julcent
double julcent(double mjuld)
Definition: astrolib.cpp:135
PlanetarySats::stateToKepler
void stateToKepler()
Definition: planetarySats.cpp:320
mxvct
Vec3 mxvct(const Mat3 &m1, Vec3 &v1)
Definition: attlib.cpp:473
PlanetarySats::getPlanetographic
void getPlanetographic(double &lng, double &lat, double &height) const
Definition: planetarySats.cpp:475
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal