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

Function CastChart

calc.cpp:1201–1586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1199// the display routines.
1200
1201real CastChart(int nContext)
1202{
1203 CI ciSav;
1204 real housetemp[cSign+1], r, r2;
1205 int i, k, k2;
1206
1207 is.nContext = nContext;
1208#ifdef EXPRESS
1209 // Notify AstroExpression a chart is about to be cast.
1210 if (!us.fExpOff && FSzSet(us.szExpCast1))
1211 ParseExpression(us.szExpCast1);
1212#endif
1213
1214 // If month is negative, then chart was read in through a -o0 position file,
1215 // so planet positions are already in the arrays.
1216
1217 if (FNoTimeOrSpace(ciCore)) {
1218 is.MC = planet[oMC]; is.Asc = planet[oAsc];
1219 ComputeInHouses();
1220 return 0.0;
1221 }
1222
1223 // Time zone 24 means to have the time of day be in Local Mean Time (LMT).
1224 // This is done by making the time zone value reflect the logical offset
1225 // from UTC as indicated by the chart's longitude value.
1226
1227 ciSav = ciCore;
1228 is.JD = (real)MdyToJulian(MM, DD, YY);
1229 if (ZZ == zonLMT)
1230 ZZ = OO / 15.0;
1231 else if (ZZ == zonLAT)
1232 ZZ = OO / 15.0 - SwissLatLmt(is.JD);
1233 if (SS == dstAuto)
1234 SS = (real)is.fDst;
1235 TT = RSgn(TT)*RFloor(RAbs(TT))+RFract(RAbs(TT)) + (ZZ - SS);
1236 AA = Min(AA, rDegQuad-rSmall); // Make sure chart isn't being cast on
1237 AA = Max(AA, -(rDegQuad-rSmall)); // precise North or South Pole.
1238
1239 ClearB((pbyte)&cp0, sizeof(CP)); // On ecliptic unless say otherwise.
1240 ClearB((pbyte)space, sizeof(space));
1241
1242 is.T = (is.JD + TT/24.0) + (us.rCuspAddition/24.0);
1243 if (us.fProgress) {
1244
1245 // For ptCast, is.Tp is time that progressed chart cusps cast for.
1246 // For ptMixed, is.Tp is base chart time to solar arc cusps from.
1247 is.Tp = is.T;
1248 if (us.nProgress != ptMixed)
1249 is.Tp += (is.JDp - is.Tp) / ((us.nProgress != ptSolarArc ||
1250 us.objProgArc < 0) ? (us.rProgDay * us.rProgCusp) : rDayInYear);
1251 is.Tp = (is.Tp - 2415020.5) / 36525.0;
1252
1253 // Determine actual time that a progressed chart is to be cast for.
1254 if (us.nProgress != ptSolarArc) {
1255 is.T += ((is.JDp - is.T) / us.rProgDay);
1256#ifdef EXPRESS
1257 // Adjust progression times with AstroExpressions.
1258 if (!us.fExpOff && FSzSet(us.szExpProg)) {

Callers 15

ActionFunction · 0.85
CastRelationFunction · 0.85
ChartTransitInfluenceFunction · 0.85
PrintObjectsFunction · 0.85
PrintOrbitFunction · 0.85
AnimateFunction · 0.85
xscreen.cppFile · 0.85
PrintInDaysFunction · 0.85
ChartInDaySearchFunction · 0.85
ChartTransitSearchFunction · 0.85
charts3.cppFile · 0.85
ChartTransitGraphFunction · 0.85

Calls 15

ComputeInHousesFunction · 0.85
MdyToJulianFunction · 0.85
SwissLatLmtFunction · 0.85
RSgnFunction · 0.85
ClearBFunction · 0.85
ExpSetRFunction · 0.85
RExpGetFunction · 0.85
SwissHouseFunction · 0.85
ProcessInputFunction · 0.85
ComputeVariablesFunction · 0.85
ModFunction · 0.85
CuspMidheavenFunction · 0.85

Tested by

no test coverage detected