Ejemplo n.º 1
0
    /// <summary>
    /// GPSs to transform.
    /// </summary>
    /// <param name="coordinates">The coordinates.</param>
    /// <returns></returns>
    public Vector3 GPSToTransform(GPSCoordinatePair coordinates)
    {
        Vector3 returnMe = new Vector3();

        //coordinates.Latitude.Degrees* Constants.DegreesMultiplier;
        //coordinates.Latitude.Minutes* Constants.MinutesMultiplier;
        //coordinates.Latitude.Seconds* Constants.SecondsMultiplier;

        return(returnMe);
    }
Ejemplo n.º 2
0
    /// <summary>
    /// generally used geo measurement function
    /// </summary>
    /// <param name="one"></param>
    /// <param name="two"></param>
    /// <returns></returns>
    public Vector3 GetDistance(GPSCoordinatePair one, GPSCoordinatePair two)
    {
        Vector3 returnMe = new Vector3();

        //float dLat = RadiansToDegrees(two.Latitude) - RadiansToDegrees(one.Latitude);
        //float dLon = RadiansToDegrees(two.Longitude) - RadiansToDegrees(one.Longitude);
        //float a = Mathf.Sin(dLat / 2) * Mathf.Sin(dLat / 2) +
        //Mathf.Cos(RadiansToDegrees(one.Latitude)) * Mathf.Cos(RadiansToDegrees(two.Latitude)) *
        //Mathf.Sin(dLon / 2) * Mathf.Sin(dLon / 2);
        //float c = 2 * Mathf.Atan2(Mathf.Sqrt(a), Mathf.Sqrt(1 - a));
        //float d = Constants.EarthRadius * c;
        //return d * 1000; // meters

        returnMe.x = 0;
        returnMe.y = 0;
        returnMe.z = 0;

        return(returnMe);
    }