t1.update( SGGeod::fromRad(lon, lat), 0, 0 ); There is also SGGeod::fromDeg to avoid the multiply by SGD_DEGREES_TO_RADIANS
Regards, -Fred ----- Mail original ----- > De: "Alasdair Campbell" <ali...@btinternet.com> > À: "FlightGear devel" <flightgear-devel@lists.sourceforge.net> > Envoyé: Dimanche 14 Octobre 2012 18:26:54 > Objet: [Flightgear-devel] Simgear commit breaks Atlas (ot??) > > After SGTime: use SGGeod, quieter init. (James Turner > 89d30acbc5040bf36a3329fcb21789d2855fa6d3) > Atlas build (misc.cxx) fails at: > > double magneticVariation(double lat, double lon, double elev) > { > SGTime t1; > > lon *= SGD_DEGREES_TO_RADIANS; > lat *= SGD_DEGREES_TO_RADIANS; > t1.update(lon, lat, 0, 0); > > return sgGetMagVar(lon, lat, elev, t1.getJD()) * > SGD_RADIANS_TO_DEGREES; > } > > Can I get a suggestion to update this code in my local repo to: > t1.update( const SGGeod& location, time_t ct, long int warp ) > Sorry, my c++ is so really rusty. > > Alasdair > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic > APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Flightgear-devel mailing list > Flightgear-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/flightgear-devel > ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel