1 /***************************************************************************** 2 * Copyright (C) 2004-2018 The pykep development team, * 3 * Advanced Concepts Team (ACT), European Space Agency (ESA) * 4 * * 5 * https://gitter.im/esa/pykep * 6 * https://github.com/esa/pykep * 7 * * 8 * act@esa.int * 9 * * 10 * This program is free software; you can redistribute it and/or modify * 11 * it under the terms of the GNU General Public License as published by * 12 * the Free Software Foundation; either version 2 of the License, or * 13 * (at your option) any later version. * 14 * * 15 * This program is distributed in the hope that it will be useful, * 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 18 * GNU General Public License for more details. * 19 * * 20 * You should have received a copy of the GNU General Public License * 21 * along with this program; if not, write to the * 22 * Free Software Foundation, Inc., * 23 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 24 *****************************************************************************/ 25 26 #ifndef KEP_TOOLBOX_PLANET_JPL_LP_H 27 #define KEP_TOOLBOX_PLANET_JPL_LP_H 28 29 #include <keplerian_toolbox/detail/visibility.hpp> 30 #include <keplerian_toolbox/serialization.hpp> 31 #include <keplerian_toolbox/planet/base.hpp> 32 33 namespace kep_toolbox 34 { 35 namespace planet 36 { 37 38 /// Solar System Planet (jpl simplified ephemerides) 39 /** 40 * This class allows to instantiate planets of 41 * the solar system by referring to their common names. The ephemeris used 42 * are low_precision ephemeris taken from http://ssd.jpl.nasa.gov/txt/p_elem_t1.txt 43 * valid in the timeframe 1800AD - 2050 AD 44 * 45 * @author Dario Izzo (dario.izzo _AT_ googlemail.com) 46 */ 47 48 class KEP_TOOLBOX_DLL_PUBLIC jpl_lp : public base 49 { 50 public: 51 jpl_lp(const std::string & = "earth"); 52 planet_ptr clone() const override; 53 std::string human_readable_extra() const override; 54 55 private: 56 void eph_impl(double mjd2000, array3D &r, array3D &v) const override; 57 58 friend class boost::serialization::access; 59 template <class Archive> serialize(Archive & ar,const unsigned int)60 void serialize(Archive &ar, const unsigned int) 61 { 62 ar &boost::serialization::base_object<base>(*this); 63 ar &jpl_elements; 64 ar &jpl_elements_dot; 65 ar &const_cast<double &>(ref_mjd2000); 66 } 67 68 array6D jpl_elements; 69 array6D jpl_elements_dot; 70 const double ref_mjd2000; 71 }; 72 } 73 } /// End of namespaces 74 75 BOOST_CLASS_EXPORT_KEY(kep_toolbox::planet::jpl_lp) 76 77 #endif // KEP_TOOLBOX_PLANET_JPL_LP_H 78