public override PJ Init() { try { en = new MDIST(es); } catch { return(null); } double es2 = Math.Sin(phi0); s0 = en.proj_mdist(phi0, es2, Math.Cos(phi0)); es2 = es * es2 * es2; double t = 1.0 - es2; double N0 = 1.0 / Math.Sqrt(t); double R_R0_2 = t * t / one_es; double R_R0_4 = R_R0_2 * R_R0_2; t = Math.Tan(phi0); double t2 = t * t; C1 = A1 = R_R0_2 / 4.0; C2 = A2 = R_R0_2 * (2 * t2 - 1.0 - 2.0 * es2) / 12.0; A3 = R_R0_2 * t * (1.0 + 4.0 * t2) / (12.0 * N0); A4 = R_R0_4 / 24.0; A5 = R_R0_4 * (-1.0 + t2 * (11.0 + 12.0 * t2)) / 24.0; A6 = R_R0_4 * (-2.0 + t2 * (11.0 - 2.0 * t2)) / 240.0; B1 = t / (2.0 * N0); B2 = R_R0_2 / 12.0; B3 = R_R0_2 * (1.0 + 2.0 * t2 - 2.0 * es2) / 4.0; B4 = R_R0_2 * t * (2.0 - t2) / (24.0 * N0); B5 = R_R0_2 * t * (5.0 + 4.0 * t2) / (8.0 * N0); B6 = R_R0_4 * (-2.0 + t2 * (-5.0 + 6.0 * t2)) / 48.0; B7 = R_R0_4 * (5.0 + t2 * (19.0 + 12.0 * t2)) / 24.0; B8 = R_R0_4 / 120.0; C3 = R_R0_2 * t * (1.0 + t2) / (3.0 * N0); C4 = R_R0_4 * (-3.0 + t2 * (34.0 + 22.0 * t2)) / 240.0; C5 = R_R0_4 * (4.0 + t2 * (13.0 + 12.0 * t2)) / 24.0; C6 = R_R0_4 / 16.0; C7 = R_R0_4 * t * (11.0 + t2 * (33.0 + t2 * 16.0)) / (48.0 * N0); C8 = R_R0_4 * t * (1.0 + t2 * 4.0) / (36.0 * N0); D1 = t / (2.0 * N0); D2 = R_R0_2 / 12.0; D3 = R_R0_2 * (2 * t2 + 1.0 - 2.0 * es2) / 4.0; D4 = R_R0_2 * t * (1.0 + t2) / (8.0 * N0); D5 = R_R0_2 * t * (1.0 + t2 * 2.0) / (4.0 * N0); D6 = R_R0_4 * (1.0 + t2 * (6.0 + t2 * 6.0)) / 16.0; D7 = R_R0_4 * t2 * (3.0 + t2 * 4.0) / 8.0; D8 = R_R0_4 / 80.0; D9 = R_R0_4 * t * (-21.0 + t2 * (178.0 - t2 * 26.0)) / 720.0; D10 = R_R0_4 * t * (29.0 + t2 * (86.0 + t2 * 48.0)) / (96.0 * N0); D11 = R_R0_4 * t * (37.0 + t2 * 44.0) / (96.0 * N0); fwd = e_forward; inv = e_inverse; return(this); }
public override PJ Init() { try { en=new MDIST(es); } catch { return null; } double es2=Math.Sin(phi0); s0=en.proj_mdist(phi0, es2, Math.Cos(phi0)); es2=es*es2*es2; double t=1.0-es2; double N0=1.0/Math.Sqrt(t); double R_R0_2=t*t/one_es; double R_R0_4=R_R0_2*R_R0_2; t=Math.Tan(phi0); double t2=t*t; C1=A1=R_R0_2/4.0; C2=A2=R_R0_2*(2*t2-1.0-2.0*es2)/12.0; A3=R_R0_2*t*(1.0+4.0*t2)/(12.0*N0); A4=R_R0_4/24.0; A5=R_R0_4*(-1.0+t2*(11.0+12.0*t2))/24.0; A6=R_R0_4*(-2.0+t2*(11.0-2.0*t2))/240.0; B1=t/(2.0*N0); B2=R_R0_2/12.0; B3=R_R0_2*(1.0+2.0*t2-2.0*es2)/4.0; B4=R_R0_2*t*(2.0-t2)/(24.0*N0); B5=R_R0_2*t*(5.0+4.0*t2)/(8.0*N0); B6=R_R0_4*(-2.0+t2*(-5.0+6.0*t2))/48.0; B7=R_R0_4*(5.0+t2*(19.0+12.0*t2))/24.0; B8=R_R0_4/120.0; C3=R_R0_2*t*(1.0+t2)/(3.0*N0); C4=R_R0_4*(-3.0+t2*(34.0+22.0*t2))/240.0; C5=R_R0_4*(4.0+t2*(13.0+12.0*t2))/24.0; C6=R_R0_4/16.0; C7=R_R0_4*t*(11.0+t2*(33.0+t2*16.0))/(48.0*N0); C8=R_R0_4*t*(1.0+t2*4.0)/(36.0*N0); D1=t/(2.0*N0); D2=R_R0_2/12.0; D3=R_R0_2*(2*t2+1.0-2.0*es2)/4.0; D4=R_R0_2*t*(1.0+t2)/(8.0*N0); D5=R_R0_2*t*(1.0+t2*2.0)/(4.0*N0); D6=R_R0_4*(1.0+t2*(6.0+t2*6.0))/16.0; D7=R_R0_4*t2*(3.0+t2*4.0)/8.0; D8=R_R0_4/80.0; D9=R_R0_4*t*(-21.0+t2*(178.0-t2*26.0))/720.0; D10=R_R0_4*t*(29.0+t2*(86.0+t2*48.0))/(96.0*N0); D11=R_R0_4*t*(37.0+t2*44.0)/(96.0*N0); fwd=e_forward; inv=e_inverse; return this; }
public override PJ Init() { fs_init(fc, es); is_init(ic, es); try { rho0=new MDIST(es).proj_mdist(phi0, Math.Sin(phi0), Math.Cos(phi0)); } catch { } fwd=e_forward; inv=e_inverse; return this; }