forked from BoostGSoC19/astronomy
/
geocentric.hpp
66 lines (52 loc) · 2.54 KB
/
geocentric.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*=============================================================================
Copyright 2018-2020 Pranam Lashkari < lpranam - plashkari628@gmail.com >
Copyright 2019-2020 Sarthak Singhal < sarthak2007 - singhalsarthak2007@gmail.com >
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
#ifndef BOOST_ASTRONOMY_COORDINATE_GEOCENTRIC_HPP
#define BOOST_ASTRONOMY_COORDINATE_GEOCENTRIC_HPP
#include <boost/astronomy/coordinate/base_ecliptic_frame.hpp>
namespace boost { namespace astronomy { namespace coordinate {
template
<
typename Representation, typename Differential
>
struct geocentric : public base_ecliptic_frame<Representation, Differential>
{
public:
//default constructor no initialization
geocentric() {}
//!constructs object from another representation object
template <typename OtherRepresentation>
geocentric(OtherRepresentation const& representation_data) : base_ecliptic_frame
<Representation, Differential>(representation_data) {}
//!constructs object from provided components of representation
geocentric
(
typename Representation::quantity1 const& lat,
typename Representation::quantity2 const& lon,
typename Representation::quantity3 const& distance
) : base_ecliptic_frame<Representation, Differential>(lat, lon, distance) {}
//!constructs object from provided components of representation and differential
geocentric
(
typename Representation::quantity1 const& lat,
typename Representation::quantity2 const& lon,
typename Representation::quantity3 const& distance,
typename Differential::quantity1 const& pm_lat,
typename Differential::quantity2 const& pm_lon_coslat,
typename Differential::quantity3 const& radial_velocity
) : base_ecliptic_frame<Representation, Differential>
(lat, lon, distance, pm_lat, pm_lon_coslat, radial_velocity) {}
//!constructs object from other representation and differential objects
template <typename OtherRepresentation, typename OtherDifferential>
geocentric
(
OtherRepresentation const& representation_data,
OtherDifferential const& differential_data
) : base_ecliptic_frame<Representation, Differential>
(representation_data, differential_data) {}
};
}}} //namespace boost::astronomy::coordinate
#endif // !BOOST_ASTRONOMY_COORDINATE_GEOCENTRIC_HPP