public static void midPoint(double lat1,double lon1,double lat2,double lon2){
double dLon = Math.toRadians(lon2 - lon1);
//convert to radians
lat1 = Math.toRadians(lat1);
lat2 = Math.toRadians(lat2);
lon1 = Math.toRadians(lon1);
double Bx = Math.cos(lat2) * Math.cos(dLon);
double By = Math.cos(lat2) * Math.sin(dLon);
double lat3 = Math.atan2(Math.sin(lat1) + Math.sin(lat2), Math.sqrt((Math.cos(lat1) + Bx) * (Math.cos(lat1) + Bx) + By * By));
double lon3 = lon1 + Math.atan2(By, Math.cos(lat1) + Bx);
//print out in degrees
System.out.println(Math.toDegrees(lat3) + " " + Math.toDegrees(lon3));
}
Sunday, March 3, 2013
Calculando el punto medio entre dos coordenadas
Para encontrar el punto medio de dos coordanadas, tomando como referencia esta pagina movable-type.co.uk
Subscribe to:
Post Comments (Atom)
SQLCIPHER PHP 7.4 UBUNTU
This took me too much time to implement, after two hours of searching, I didnt found and documentation of how to compile sqlcipher support ...
-
This took me too much time to implement, after two hours of searching, I didnt found and documentation of how to compile sqlcipher support ...
-
Se ocupa utilizar cursores al momento de realizar una consulta en una tabla grande, antes de utilizar cursores se debe cumplir los siguiente...
-
Para encontrar el punto medio de dos coordanadas, tomando como referencia esta pagina movable-type.co.uk public static void midPoin...
IGT Gaming, Casinos, and Games for sale in Maricopa
ReplyDeleteFind your หารายได้เสริม complete list 바카라 사이트 of casinos, games and games at 1xbet korean IGT Gaming in Maricopa, https://sol.edu.kg/ Arizona. 1. Casinos in Casino at Residence apr casino