00001 /************************************************************************** 00002 * venus.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: venus_8cxx_source.html,v 1.3 2010/02/23 22:10:17 curt Exp $ 00023 **************************************************************************/ 00024 00025 #include <math.h> 00026 00027 #include "venus.hxx" 00028 00029 /************************************************************************* 00030 * Venus::Venus(double mjd) 00031 * Public constructor for class Venus 00032 * Argument: The current time. 00033 * the hard coded orbital elements for Venus are passed to 00034 * CelestialBody::CelestialBody(); 00035 ************************************************************************/ 00036 Venus::Venus(double mjd) : 00037 CelestialBody(76.67990, 2.4659000E-5, 00038 3.3946, 2.75E-8, 00039 54.89100, 1.3837400E-5, 00040 0.7233300, 0.000000, 00041 0.006773, -1.302E-9, 00042 48.00520, 1.60213022440, mjd) 00043 { 00044 } 00045 Venus::Venus() : 00046 CelestialBody(76.67990, 2.4659000E-5, 00047 3.3946, 2.75E-8, 00048 54.89100, 1.3837400E-5, 00049 0.7233300, 0.000000, 00050 0.006773, -1.302E-9, 00051 48.00520, 1.60213022440) 00052 { 00053 } 00054 00055 /************************************************************************* 00056 * void Venus::updatePosition(double mjd, Star *ourSun) 00057 * 00058 * calculates the current position of Venus, by calling the base class, 00059 * CelestialBody::updatePosition(); The current magnitude is calculated using 00060 * a Venus specific equation 00061 *************************************************************************/ 00062 void Venus::updatePosition(double mjd, Star *ourSun) 00063 { 00064 CelestialBody::updatePosition(mjd, ourSun); 00065 magnitude = -4.34 + 5*log10( r*R ) + 0.013 * FV + 4.2E-07 * pow(FV,3); 00066 }