/// <summary> /// Positions the camera to view a given bounding sphere from a given azimuth and elevation angle. /// </summary> public static void ViewBoundingSphere(Insight3D insight3D, CentralBody centralBody, BoundingSphere sphere, double azimuthAngle, double elevationAngle) { var boundingSphereCenter = new PointFixedOffset(centralBody.FixedFrame, sphere.Center); var boundingSphereAxes = new AxesEastNorthUp(centralBody, boundingSphereCenter); var camera = insight3D.Scene.Camera; var offset = new Cartesian(new AzimuthElevationRange(azimuthAngle, elevationAngle, camera.DistancePerRadius * sphere.Radius)); camera.ViewOffset(boundingSphereAxes, boundingSphereCenter, offset); }
public Main() { InitializeComponent(); var earth = CentralBodiesFacet.GetFromContext().Earth; // Load the GPS satellites from the almanac, including transmitters for specific block types, // using the data from the GPSData.txt file. m_gpsConstellation = GetGpsCommunicationsConstellation(); // create the receiver using a standard setup m_receiver = new GpsReceiver { NumberOfChannels = 12, ReceiverSolutionType = GpsReceiverSolutionType.AllInView, NavigationSatellites = m_gpsConstellation }; m_receiver.ReceiverConstraints.Add(new ElevationAngleConstraint(Trig.DegreesToRadians(5.0))); m_location = new PointCartographic(earth, new Cartographic(Trig.DegreesToRadians(-107.494000), Trig.DegreesToRadians(30.228800), 0)); m_orientation = new AxesEastNorthUp(earth, m_location); }