00001 /* 00002 * Mercury.cpp 00003 * 00004 * Part of Fly! Legacy project 00005 * 00006 * Copyright 2003 Chris Wallace 00007 * 00008 * Fly! Legacy is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * Fly! Legacy 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 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with Fly! Legacy; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 * 00022 */ 00023 00032 #include <math.h> 00033 #include "../Include/Ephemeris.h" 00034 00035 00036 // 00037 // Default orbital elements 00038 // 00039 static SOrbitalElements first = 00040 { 00041 48.33130, // N, Longitude of the ascending node 00042 7.0047, // i, Inclination to the ecliptic 00043 29.12410, // w, Argument of perihelion 00044 0.3870980, // a, Semi-major axis 00045 0.205635, // e, Eccentricity 00046 168.6562 // M, Mean anomaly 00047 }; 00048 00049 static SOrbitalElements second = 00050 { 00051 3.2458700E-5, // N, Longitude of the ascending node 00052 5.00E-8, // i, Inclination to the ecliptic 00053 1.0144400E-5, // w, Argument of perihelion 00054 0.0, // a, Semi-major axis 00055 5.59E-10, // e, Eccentricity 00056 4.09233443680 // M, Mean anomaly 00057 }; 00058 00059 00060 00061 /************************************************************************* 00062 * CMercury::CMercury(double mjd) 00063 * Public constructor for class CMercury 00064 * Argument: The current time. 00065 * the hard coded orbital elements for CMercury are passed to 00066 * CelestialBody::CelestialBody(); 00067 ************************************************************************/ 00068 CMercury::CMercury(double mjd) : 00069 CCelestialBody (first.N, first.i, first.w, first.a, first.e, first.M, 00070 second.N, second.i, second.w, second.a, second.e, second.M, 00071 mjd) 00072 { 00073 } 00074 00075 CMercury::CMercury() : 00076 CCelestialBody (first.N, first.i, first.w, first.a, first.e, first.M, 00077 second.N, second.i, second.w, second.a, second.e, second.M) 00078 { 00079 } 00080 00081 00082 /************************************************************************* 00083 * void CMercury::updatePosition(double mjd, CSol *ourSun) 00084 * 00085 * calculates the current position of CMercury, by calling the base class, 00086 * CelestialBody::updatePosition(); The current magnitude is calculated using 00087 * a Mercury specific equation 00088 *************************************************************************/ 00089 void CMercury::UpdatePosition(double mjd, CSol *ourSun) 00090 { 00091 CCelestialBody::UpdatePosition(mjd, ourSun); 00092 magnitude = -0.36 + 5*log10( r*R ) + 0.027 * FV + 2.2E-13 * pow(FV, 6); 00093 } 00094 00095 /************************************************************************** 00096 * mercury.cxx 00097 * Written by Durk Talsma. Originally started October 1997, for distribution 00098 * with the FlightGear project. Version 2 was written in August and 00099 * September 1998. This code is based upon algorithms and data kindly 00100 * provided by Mr. Paul Schlyter. (pausch@saaf.se). 00101 * 00102 * This library is free software; you can redistribute it and/or 00103 * modify it under the terms of the GNU Library General Public 00104 * License as published by the Free Software Foundation; either 00105 * version 2 of the License, or (at your option) any later version. 00106 * 00107 * This library is distributed in the hope that it will be useful, 00108 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00109 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00110 * Library General Public License for more details. 00111 * 00112 * You should have received a copy of the GNU Library General Public 00113 * License along with this library; if not, write to the 00114 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00115 * Boston, MA 02111-1307, USA. 00116 * 00117 **************************************************************************/ 00118
|
|
Documentation generated by
|