Exemplo 1
re = 6371
ajuste = 1
A = Math.cos(Math.toRadians(posto[0]))Math.cos(Math.toRadians(posto[1]))Math.cos(Math.toRadians(usuario[0]))Math.cos(Math.toRadians(usuario[1]))
B = Math.cos(Math.toRadians(posto[0]))Math.sin(Math.toRadians(posto[1]))Math.cos(Math.toRadians(usuario[0]))Math.sin(Math.toRadians(usuario[1]))
C = Math.sin(Math.toRadians(posto[0]))Math.sin(Math.toRadians(usuario[0]))
distancia = reMath.acos(A+B+C)ajuste;
println "\n${distancia}"
Exemplo 2
re = 6371
ajuste = 1.1515
A = Math.sin(Math.toRadians(posto[0]))Math.sin(Math.toRadians(usuario[0]))
B = Math.cos(Math.toRadians(posto[0]))Math.cos(Math.toRadians(usuario[0]))Math.cos(Math.toRadians(posto[1]-usuario[1]))
distancia = Math.acos(A+B)
distancia = distancia * re * ajuste
distancia = distancia * 0.8684
println "\n${distancia}"
top of page
Buscar
Posts recentes
Ver tudoKeywordUtil.markWarning("${image}"); for (x in 1..number_persist) { KeywordUtil.markWarning("Tentativa: ${x}") for (i in image){...
10
import java.text.SimpleDateFormat ]def date = new Date() today = new SimpleDateFormat("dd-MM-yyyy") println today.format(date);
10
File file = new File(filepath) line = file.getText("UTF-8").split("\n")[-1].split(";") println line; prinln line[0];
00
bottom of page
Comments