Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.apo.nmsu.edu/Telescopes/TCC/html/pvajt_8h_source.html
Дата изменения: Tue Sep 15 02:25:37 2015
Дата индексирования: Sun Apr 10 00:17:56 2016
Кодировка:

Поисковые слова: solar eclipse
lsst.tcc: include/tcc/pvajt.h Source File
lsst.tcc  1.2.2-3-g89ecb63
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pvajt.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <iostream>
5 #include "coordConv/mathUtils.h"
6 #include "coordConv/pvt.h"
7 
8 namespace tcc {
9 
23  class PVAJT {
24  public:
25  double pos, vel, accel, jerk, t;
26 
36  explicit PVAJT(double pos, double vel, double accel, double jerk, double t);
37 
43  explicit PVAJT(coordConv::PVT const &pvt);
44 
48  explicit PVAJT();
49 
51  PVAJT extrapolate(double t) const {
52  double dt = t - this->t;
53  return PVAJT(
54  pos + dt*(vel + dt*(accel/2.0 + dt*jerk/6.0)),
55  vel + dt*(accel + dt*jerk/2.0),
56  accel + dt*jerk,
57  jerk,
58  t);
59  }
60 
62  bool isfinite() const {
63  return std::isfinite(pos)
64  && std::isfinite(vel)
65  && std::isfinite(accel)
66  && std::isfinite(jerk)
67  && std::isfinite(t);
68  }
69 
70  bool operator==(PVAJT const &rhs) {
71  return (this->pos == rhs.pos)
72  && (this->vel == rhs.vel)
73  && (this->accel == rhs.accel)
74  && (this->jerk == rhs.jerk)
75  && (this->t == rhs.t);
76  }
77 
78  bool operator!=(PVAJT const &rhs) {
79  return !operator==(rhs);
80  }
81 
85  std::string __repr__() const;
86  };
87 
88  std::ostream &operator<<(std::ostream &os, PVAJT const &pvajt);
89 
90 }
double vel
Definition: pvajt.h:25
PVAJT()
Definition: pvajt.cc:28
double jerk
Definition: pvajt.h:25
double pos
Definition: pvajt.h:25
std::string __repr__() const
Definition: pvajt.cc:38
bool operator==(PVAJT const &rhs)
Definition: pvajt.h:70
std::ostream & operator<<(std::ostream &os, ChebyshevPolynomial const &cheby)
Definition: cheby.cc:12
PVAJT extrapolate(double t) const
Extrapolate to a specified time, assuming a path of constant jerk.
Definition: pvajt.h:51
double accel
Definition: pvajt.h:25
bool isfinite() const
Are all values finite? (Does it have finite pos, vel and t)?
Definition: pvajt.h:62
bool operator!=(PVAJT const &rhs)
Definition: pvajt.h:78
double t
Definition: pvajt.h:25