parallaxConstants function
Parallax constants ρ sin φ′ and ρ cos φ′.
phi geographic latitude (radians), h height above ellipsoid (meters).
Implementation
({double rhsSinPhiPrime, double rhoCosPrime}) parallaxConstants(
double phi, double h, {double er = earthEr, double fl = earthFl}) {
final boa = 1 - fl;
final su = math.sin(math.atan(boa * math.tan(phi)));
final cu = math.cos(math.atan(boa * math.tan(phi)));
final sPhi = math.sin(phi), cPhi = math.cos(phi);
final hoa = h * 1e-3 / er;
return (
rhsSinPhiPrime: su * boa + hoa * sPhi,
rhoCosPrime: cu + hoa * cPhi,
);
}