]> git.mxchange.org Git - flightgear.git/blobdiff - src/Time/sunsolver.cxx
plib-1.8.0 no longer defines the cchar type (which we used because we were
[flightgear.git] / src / Time / sunsolver.cxx
index b0d0d5c4f57fe187a440d73bd1626c7d52fd27ff..0b16f2de777a1bec6abbf7b279e29655a906f155 100644 (file)
@@ -47,18 +47,13 @@ static double sun_angle( const SGTime &t, sgVec3 world_up,
     SG_LOG( SG_EVENT, SG_DEBUG, "  Updating Sun position" );
     SG_LOG( SG_EVENT, SG_DEBUG, "  Gst = " << t.getGst() );
 
-    double sun_lon, sun_gd_lat, sun_gc_lat, sl_radius;
+    double sun_lon, sun_gd_lat;
     fgSunPositionGST( t.getGst(), &sun_lon, &sun_gd_lat );
-
-    sgGeodToGeoc(sun_gd_lat, 0.0, &sl_radius, &sun_gc_lat);
-
-    p = Point3D( sun_lon, sun_gc_lat, sl_radius );
-    Point3D sunpos = sgPolarToCart3d(p);
+    Point3D sunpos = sgGeodToCart(Point3D(sun_lon, sun_gd_lat, 0));
 
     SG_LOG( SG_EVENT, SG_DEBUG, "    t.cur_time = " << t.get_cur_time() );
     SG_LOG( SG_EVENT, SG_DEBUG, 
-           "    Sun Geodetic lat = " << sun_gd_lat
-           << " Geocentric lat = " << sun_gc_lat );
+           "    Sun Geodetic lat = " << sun_gd_lat );
 
     // calculate the sun's relative angle to local up
     sgCopyVec3( nup, world_up );