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 ...
-
Para encontrar el punto medio de dos coordanadas, tomando como referencia esta pagina movable-type.co.uk public static void midPoin...
-
Tuve un problema con Godaddy y me perdieron todos mi archivos y no tenia respaldo. He decido hostear mi sitio en blogger para aprovechar el ...
-
This took me too much time to implement, after two hours of searching, I didnt found and documentation of how to compile sqlcipher support ...
Mysuru Casino - The HERZAMMAN
ReplyDeleteMysuru Casino - The Home of febcasino the Best of the Slots! https://octcasino.com/ Visit us to Play the deccasino best slots and 바카라 사이트 enjoy the poormansguidetocasinogambling.com best table games in our casino. Visit us
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