X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fephemeris%2Fephemeris.cxx;h=95ac3402b740c3eb721c7518978ab73cd6aea019;hb=f1ab6e2533a1bf07439b3d5918430f496158d8f3;hp=1a53918c3cbcb22834f28765a0977e22b477e8af;hpb=8159b749f49be587e794a8438db7a4373d527b1d;p=simgear.git diff --git a/simgear/ephemeris/ephemeris.cxx b/simgear/ephemeris/ephemeris.cxx index 1a53918c..95ac3402 100644 --- a/simgear/ephemeris/ephemeris.cxx +++ b/simgear/ephemeris/ephemeris.cxx @@ -5,19 +5,20 @@ // // Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version. +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. // -// This program is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. +// Library General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the +// Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. // // $Id$ @@ -26,9 +27,9 @@ // Constructor -FGEphemeris::FGEphemeris( const string &path ) { +SGEphemeris::SGEphemeris( const string &path ) { our_sun = new Star; - moon = new Moon; + moon = new MoonPos; mercury = new Mercury; venus = new Venus; mars = new Mars; @@ -36,12 +37,12 @@ FGEphemeris::FGEphemeris( const string &path ) { saturn = new Saturn; uranus = new Uranus; neptune = new Neptune; - stars = new FGStars( FGPath(path) ); + stars = new SGStarData( FGPath(path) ); } // Destructor -FGEphemeris::~FGEphemeris( void ) { +SGEphemeris::~SGEphemeris( void ) { delete our_sun; delete moon; delete mercury; @@ -57,17 +58,17 @@ FGEphemeris::~FGEphemeris( void ) { // Update (recalculate) the positions of all objects for the specified // time -void FGEphemeris::update( SGTime *t, double lat ) { +void SGEphemeris::update( double mjd, double lst, double lat ) { // update object positions - our_sun->updatePosition( t ); - moon->updatePosition( t, lat, our_sun ); - mercury->updatePosition( t, our_sun ); - venus->updatePosition( t, our_sun ); - mars->updatePosition( t, our_sun ); - jupiter->updatePosition( t, our_sun ); - saturn->updatePosition( t, our_sun ); - uranus->updatePosition( t, our_sun ); - neptune->updatePosition( t, our_sun ); + our_sun->updatePosition( mjd ); + moon->updatePosition( mjd, lst, lat, our_sun ); + mercury->updatePosition( mjd, our_sun ); + venus->updatePosition( mjd, our_sun ); + mars->updatePosition( mjd, our_sun ); + jupiter->updatePosition( mjd, our_sun ); + saturn->updatePosition( mjd, our_sun ); + uranus->updatePosition( mjd, our_sun ); + neptune->updatePosition( mjd, our_sun ); // update planets list nplanets = 7;