sql server 2005 - How do I calculate the Azimuth (angle to north) between two WGS84 coordinates in a single T-SQL query? -


, but I can not translate it into a single query T-SQL because my C # implementation is required (if Again ).

I also found the following C # solution, which can be translated into a query T-SQL, but it does not produce the correct result

  Public Stabilized Double GetAzimuth ( WGSCoordC1, WGSCoordC2) {var lat1 = DeGToRad (c1.Latitude); Var lon1 = DagTorad (C 1. Loneticate); Var lat2 = Degotrod (C2lititude); Var lon2 = DegToRad (c2.Longitude); Return Redoutong (Monastery sign (lon1-lon2) * Math. Cos (Lat 2) / Matthew Sign (Math.Ekos (Math Sign. (Lat 2) * Monastery Sign (Let1) + Math. Cos (lat 1) * math. Cos (latt 2) * math. Cos (lawn 2 - lawn 1)))); }  

code

Can someone correct the above code or provide an alternative solution?

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -