00001 00006 // Written by Curtis Olson, started July 2000. 00007 // 00008 // Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt 00009 // 00010 // This program is free software; you can redistribute it and/or 00011 // modify it under the terms of the GNU General Public License as 00012 // published by the Free Software Foundation; either version 2 of the 00013 // License, or (at your option) any later version. 00014 // 00015 // This program is distributed in the hope that it will be useful, but 00016 // WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 // General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU General Public License 00021 // along with this program; if not, write to the Free Software 00022 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00023 // 00024 // $Id: magvar_8hxx_source.html,v 1.3 2010/02/23 22:10:14 curt Exp $ 00025 00026 00027 #ifndef _MAGVAR_HXX 00028 #define _MAGVAR_HXX 00029 00030 00031 #ifndef __cplusplus 00032 # error This library requires C++ 00033 #endif 00034 00035 00051 class SGMagVar { 00052 00053 private: 00054 00055 double magvar; 00056 double magdip; 00057 00058 public: 00059 00064 SGMagVar(); 00065 00067 ~SGMagVar(); 00068 00079 void update( double lon, double lat, double alt_m, double jd ); 00080 00082 double get_magvar() const { return magvar; } 00083 00085 double get_magdip() const { return magdip; } 00086 }; 00087 00088 00096 double sgGetMagVar( double lon, double lat, double alt_m, double jd ); 00097 00098 00099 #endif // _MAGVAR_HXX