+ // Get our friendly vectors from the eye location...
+ sgCopyVec3(_zero_elev_view_pos, _location->get_zero_elev());
+ sgCopyVec3(_relative_view_pos, _location->get_view_pos());
+ sgdCopyVec3(_absolute_view_pos,
+ _location->get_absolute_view_pos(globals->get_scenery()->get_center()));
+ sgCopyMat4(UP, _location->getCachedUpMatrix());
+ sgCopyVec3(_world_up, _location->get_world_up());
+ // these are the vectors that the sun and moon code like to get...
+ sgCopyVec3(_surface_east, _location->get_surface_east());
+ sgCopyVec3(_surface_south, _location->get_surface_south());
+
+ // Update viewer's postion data for the eye location...
+ _lon_deg = _location->getLongitude_deg();
+ _lat_deg = _location->getLatitude_deg();
+ _alt_ft = _location->getAltitudeASL_ft();
+ _roll_deg = _location->getRoll_deg();
+ _pitch_deg = _location->getPitch_deg();
+ _heading_deg = _location->getHeading_deg();
+
+ // Update viewer's postion data for the target (at object) location
+ if (_type == FG_LOOKAT) {
+ _target_lon_deg = _target_location->getLongitude_deg();
+ _target_lat_deg = _target_location->getLatitude_deg();
+ _target_alt_ft = _target_location->getAltitudeASL_ft();
+ _target_roll_deg = _target_location->getRoll_deg();
+ _target_pitch_deg = _target_location->getPitch_deg();
+ _target_heading_deg = _target_location->getHeading_deg();
+ }
+
+ // copy coordinates to outputs for viewer...
+ sgCopyVec3(_zero_elev, _zero_elev_view_pos);
+ sgCopyVec3(_view_pos, _relative_view_pos);
+}