i am confused over this.
sin(1") = pi/(180*60*60).
shouldn't it be 1"=pi/(180*60*60)?
either way, it is so close to 0 that sin(1") approximates 1", or 4.8481368 x 10^-6, or 0.0000048481368, so we'll just use that.
Also, be
very verbose when using * for multiplication and ^ for powers.
try:
Code:
K3 = [k0 * sin(1")^4 * (nu) * sin(lat) * cos(lat)^3 /24] [ 5 - tan(lat)^2 + 9 * e'^2 * cos(lat)^2 + 4 * e'^4 * cos(lat)^4]
where:
sin1" = pi/(180*60*60)
e = SQRT(1-b^2/a^2)
e'2 = (e*a/b)^2 = e^2/(1-e^2)
nu = a/(1-e^2 * sin(lat)^2) ^ (1/2)
to explain the problem. Otherwise it is very hard to decipher without really looking into the documentation provided.
Now to the solution:
Code:
var sin_one_minute = 0.0000048481368;
var e = Math.sqrt(1-b*b/a*a);
var e_prime_2 = Math.pow((e*a/b),2);
var nu = a / Math.sqrt(1 - e*e * Math.pow(Math.sin(lat),2));
K3 = (k0 * Math.pow(sin_one_minute,4) * nu * Math.sin(lat) * Math.pow(Math.cos(lat),3) / 24) * (5 - Math.pow(Math.tan(lat),2) + 9 * e_prime_2 * Math.pow(Math.cos(lat),2) + 4 * Math.pow(e_prime_2,2) * Math.pow(Math.cos(lat),4));
Note: I don't even know if this works. I just threw it together. All the necessary Math functions, Math.pow, Math.sqrt, Math.sin, Math.cos, Math.tan, are all you should need. Just note that they use radian measure and not degree measure.