PublicAngle se (Angle latA, Angle Lona, TKsoft.Earth.Angle LATB, Angle lonb) {//know two points of latitude and longitude, the method of seeking angle DoubleCOSLATB =Math.Cos (Latb.radians); Angle TcA=TKsoft.Earth.Angle.FromRadians (Math.atan2 (Math.sin (Lona.radians-Lonb.radians) *COSLATB, Math.Cos (Lata.radians)* Math.sin (Latb.radians)-Math.sin (Lata.radians)* COSLATB *Math.Cos (Lona.radians-( Lonb.radians))); if(Tca.radians <0) Tca.radians= Tca.radians + Math.PI *2; Tca.radians= Math.PI *2-Tca.radians; returnTcA; }
The above code because of project problems, Angle is a class, you can use this code as a reference should be able to guess the approximate (Angle prefix reference by me)
/** * According to a point, corner point (0 degrees north, the straight needle increases), distance (m) Calculate another*/ Public StaticSystem.Drawing.PointF Calpoint (DoubleXDoubleYDoubleAngelDoubledistance) { //System.Drawing.PointF EndPoint =NewSystem.Drawing.PointF (); //the angle is converted to 0 degrees east, and the counter-clockwise increasesAngel =-angel- the+ -; //meters converted into longitude and latitude vardis = distance/ +/111.7; //corner points to radiansAngel = Angel * Math.PI/ the; //Calculate y-coordinateEndpoint.y = (float) (Math.sin (Angel) * dis +y); //calculate x-coordinateEndpoint.x = (float) (Math.Cos (Angel) * dis +x); returnEndPoint; }
On the algorithm of latitude and longitude conversion