X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fmagvar%2Fmagvar.hxx;h=605bece722bc09a99a80a249f803db8e84870048;hb=086a30e61aa153008bd403c79cd1bff3ad594179;hp=c2e80bc4a5194b17480ddf624b03292d3abeb674;hpb=dcb95d131bc6aef1abe25d1f415e309f06e52436;p=simgear.git diff --git a/simgear/magvar/magvar.hxx b/simgear/magvar/magvar.hxx index c2e80bc4..605bece7 100644 --- a/simgear/magvar/magvar.hxx +++ b/simgear/magvar/magvar.hxx @@ -33,6 +33,9 @@ #endif +// forward decls +class SGGeod; + /** * Magnetic variation wrapper class. * @@ -78,6 +81,11 @@ public: */ void update( double lon, double lat, double alt_m, double jd ); + /** + * overloaded variant taking an SGGeod to specify position + */ + void update( const SGGeod& geod, double jd ); + /** @return the current magnetic variation in radians. */ double get_magvar() const { return magvar; } @@ -95,5 +103,9 @@ public: */ double sgGetMagVar( double lon, double lat, double alt_m, double jd ); +/** + * overload version of the above to take a SGGeod + */ +double sgGetMagVar( const SGGeod& pos, double jd ); #endif // _MAGVAR_HXX