X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FTime%2Fmoonpos.cxx;h=83b47e15baa612119ec3ca93f05f404aa9c0ddc6;hb=cf6022e43937bc19dc97885fb8248e67e69b6ad8;hp=4126fc5d4d3efe234f4e25df8c6233f4308dafe6;hpb=0175b4cd253a69f22cc28f8f42fc019af26641e5;p=flightgear.git diff --git a/src/Time/moonpos.cxx b/src/Time/moonpos.cxx index 4126fc5d4..83b47e15b 100644 --- a/src/Time/moonpos.cxx +++ b/src/Time/moonpos.cxx @@ -343,7 +343,7 @@ void fgUpdateMoonPos( void ) { l = &cur_light_params; SGTime *t = globals->get_time_params(); - v = globals->get_current_view(); + v = (FGViewerRPH *)globals->get_current_view(); FG_LOG( FG_EVENT, FG_INFO, " Updating Moon position" ); @@ -374,7 +374,7 @@ void fgUpdateMoonPos( void ) { // << ","<< l->moon_vec[2] << endl; // calculate the moon's relative angle to local up - sgCopyVec3( nup, v->get_local_up() ); + sgCopyVec3( nup, v->get_world_up() ); sgSetVec3( nmoon, l->fg_moonpos.x(), l->fg_moonpos.y(), l->fg_moonpos.z() ); sgNormalizeVec3(nup); sgNormalizeVec3(nmoon); @@ -400,7 +400,7 @@ void fgUpdateMoonPos( void ) { // earth's surface the moon is directly over, map into onto the // local plane representing "horizontal". - sgmap_vec_onto_cur_surface_plane( v->get_local_up(), v->get_view_pos(), + sgmap_vec_onto_cur_surface_plane( v->get_world_up(), v->get_view_pos(), v->get_to_moon(), surface_to_moon ); sgNormalizeVec3(surface_to_moon); v->set_surface_to_moon( surface_to_moon[0], surface_to_moon[1],