Generation

generate functionWed, 22 Feb 2023

jd-2*180*asin(sqrt((pow(sin(r/(6378.138*2)),2)-pow((wd*pi()/180-wd*pi()/180)/2,2))/cos(wd*pi()/180)/cos(wd*pi()/180)))/pi()=jd1

def jd(r: Double, jd: Double): Double = { val pi = 3.141592653589793 val radLat1 = r/180*pi val radLat2 = jd/180*pi val a = radLat1 - radLat2 val b = (r/180-jd/180)/2 val s = 2*Asin(Sqrt(Pow(Sin(a/2), 2) + Cos(radLat1)*Cos(radLat2)*Pow(Sin(b), 2))) s*6378.138 }

Questions about programming?Chat with your personal AI assistant