00001 /************************************************************************** 00002 * neptune.cxx 00003 * Written by Durk Talsma. Originally started October 1997, for distribution 00004 * with the FlightGear project. Version 2 was written in August and 00005 * September 1998. This code is based upon algorithms and data kindly 00006 * provided by Mr. Paul Schlyter. (pausch@saaf.se). 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Library General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2 of the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Library General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00021 * 00022 * $Id: neptune_8cxx_source.html,v 1.3 2010/02/23 22:10:15 curt Exp $ 00023 **************************************************************************/ 00024 00025 #ifdef __BORLANDC__ 00026 # define exception c_exception 00027 #endif 00028 #include <math.h> 00029 00030 #include "neptune.hxx" 00031 00032 /************************************************************************* 00033 * Neptune::Neptune(double mjd) 00034 * Public constructor for class Neptune 00035 * Argument: The current time. 00036 * the hard coded orbital elements for Neptune are passed to 00037 * CelestialBody::CelestialBody(); 00038 ************************************************************************/ 00039 Neptune::Neptune(double mjd) : 00040 CelestialBody(131.7806, 3.0173000E-5, 00041 1.7700, -2.550E-7, 00042 272.8461, -6.027000E-6, 00043 30.058260, 3.313E-8, 00044 0.008606, 2.150E-9, 00045 260.2471, 0.00599514700, mjd) 00046 { 00047 } 00048 Neptune::Neptune() : 00049 CelestialBody(131.7806, 3.0173000E-5, 00050 1.7700, -2.550E-7, 00051 272.8461, -6.027000E-6, 00052 30.058260, 3.313E-8, 00053 0.008606, 2.150E-9, 00054 260.2471, 0.00599514700) 00055 { 00056 } 00057 /************************************************************************* 00058 * void Neptune::updatePosition(double mjd, Star *ourSun) 00059 * 00060 * calculates the current position of Neptune, by calling the base class, 00061 * CelestialBody::updatePosition(); The current magnitude is calculated using 00062 * a Neptune specific equation 00063 *************************************************************************/ 00064 void Neptune::updatePosition(double mjd, Star *ourSun) 00065 { 00066 CelestialBody::updatePosition(mjd, ourSun); 00067 magnitude = -6.90 + 5*log10 (r*R) + 0.001 *FV; 00068 }