Gps 在方向和距离上移动lat米

Gps 在方向和距离上移动lat米,gps,Gps,你知道怎么做吗?我的代码看起来像这样,但不起作用。在附图中,点0为圆心,其余为圆点(每隔45度)。我们看到的一个例子是,点不构成圆 我正在将代码粘贴到此处: static float[] RotateVector(float[] v, float degrees) { float sin = (float)Math.Sin(degrees * 0.0174553294f); float cos = (float)Math.Cos(degrees * 0

你知道怎么做吗?我的代码看起来像这样,但不起作用。在附图中,点0为圆心,其余为圆点(每隔45度)。我们看到的一个例子是,点不构成圆

我正在将代码粘贴到此处:

 static float[] RotateVector(float[] v, float degrees)
    {
        float sin = (float)Math.Sin(degrees * 0.0174553294f);
        float cos = (float)Math.Cos(degrees * 0.0174553294f);

        float tx = v[0];
        float ty = v[1];


        return new float[] { (cos * tx) - (sin * ty), (sin * tx) + (cos * ty) };
    }



    static void Main(string[] args)
    {

        float lat = 53.1324886f;
        float lon = 23.1688403f;

        float R = 6378137;

        float distance = 100;

        float dn = 0;
        float de = 1;

        float[] rotation = RotateVector(new float[] { dn, de }, 180);

        rotation[0] = rotation[0] * distance;
        rotation[1] = rotation[1] * distance;

        float dLat = rotation[0] / R;
        float dLon = rotation[1] / (R * (float)Math.Cos(Math.PI * lat / 180));


        float latO = lat + dLat * 180 / (float)Math.PI;
        float lonO = lon + dLon * 180 / (float)Math.PI;

        Console.WriteLine(latO+" "+ lonO);

        Console.ReadKey();
    }

带有地图的网站无法正常工作。在谷歌地图上,代码运行良好