/// <summary> /// Inverse rotate. /// </summary> void InverseRotate(CGeoLatLong rLatLong) { double dRange; double dHeading; new CGeoLatLong().RangeAndHeading(rLatLong, out dRange, out dHeading); rLatLong.Set(dHeading, dRange, m_Origin); }
/// <summary> /// Inverse rotate. /// </summary> void Rotate(CGeoLatLong rLatLong) { double dRange; double dHeading; m_Origin.RangeAndHeading(rLatLong, out dRange, out dHeading); rLatLong.Set(dHeading, dRange, new CGeoLatLong()); }
/// <summary> /// Project the given x y to lat long using the input parameters to store /// the result. /// </summary> public override void InverseProject(double dLatY, double dLongX) { double dHdng = Math.Atan2(dLongX, dLatY); double dRange = Math.Sqrt(dLongX * dLongX + dLatY * dLatY); CGeoLatLong Result = new CGeoLatLong(); Result.Set(dHdng, dRange, m_Origin); dLatY = Result.GetLatDegrees(); dLongX = Result.GetLongDegrees(); }
/// <summary> /// Project the given x y to lat long using the input parameters to store the result. /// </summary> public override void InverseProject(double dLatY, double dLongX) { double dHdng = Math.Atan2(dLongX, dLatY); double dRange = Math.Sqrt(dLongX * dLongX + dLatY * dLatY); dRange = Math.Asin(dRange / Constants.conEARTH_RADIUS_METRES) * Constants.conEARTH_RADIUS_METRES; CGeoLatLong Result = new CGeoLatLong(); Result.Set(dHdng, dRange, m_Origin); dLatY = Result.GetLatDegrees(); dLongX = Result.GetLongDegrees(); }