MCPcopy Create free account
hub / github.com/CruiserOne/Astrolog / FSphereLocal

Function FSphereLocal

xcharts1.cpp:4174–4192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4172// horizon meridian, zodiac position and latitude, or Earth coordinates.
4173
4174flag 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
4194flag FSpherePrime(real azi, real alt, CONST CIRC *pcr, int *xp, int *yp)
4195{

Callers 5

FSpherePrimeFunction · 0.85
FSphereMeridianFunction · 0.85
FSphereZodiacFunction · 0.85
FSphereEarthFunction · 0.85
XChartSphereFunction · 0.85

Calls 3

ModFunction · 0.85
CoorXformFunction · 0.85
SwissRefractFunction · 0.85

Tested by

no test coverage detected