| 4172 | // horizon meridian, zodiac position and latitude, or Earth coordinates. |
| 4173 | |
| 4174 | flag FSphereLocal(real azi, real alt, CONST CIRC *pcr, int *xp, int *yp) |
| 4175 | { |
| 4176 | if (gs.fEcliptic) { |
| 4177 | azi = Mod(azi - rDegQuad); neg(alt); |
| 4178 | CoorXform(&azi, &alt, Lat - rDegQuad); |
| 4179 | azi = Mod(cp0.lonMC - azi + rDegQuad); |
| 4180 | EquToEcl(&azi, &alt); |
| 4181 | azi = rDegMax - Untropical(azi); neg(alt); |
| 4182 | } else { |
| 4183 | if (us.fRefract) |
| 4184 | alt = -SwissRefract(-alt); |
| 4185 | } |
| 4186 | azi = Mod(rDegQuad*3 - (azi + gs.rRot)); |
| 4187 | if (gs.rTilt != 0.0) |
| 4188 | CoorXform(&azi, &alt, gs.rTilt); |
| 4189 | *xp = pcr->xc + (int)((real)pcr->xr * RCosD(azi) * RCosD(alt) - rRound); |
| 4190 | *yp = pcr->yc + (int)((real)pcr->yr * RSinD(alt) - rRound); |
| 4191 | return azi >= rDegHalf; |
| 4192 | } |
| 4193 | |
| 4194 | flag FSpherePrime(real azi, real alt, CONST CIRC *pcr, int *xp, int *yp) |
| 4195 | { |
no test coverage detected