| 1890 | // contraparallel. |
| 1891 | |
| 1892 | int GetParallel(CONST real *planet1, CONST real *planet2, |
| 1893 | CONST real *planetalt1, CONST real *planetalt2, |
| 1894 | CONST real *ret1, CONST real *ret2, |
| 1895 | CONST real *retalt1, CONST real *retalt2, int i, int j, real *prOrb) |
| 1896 | { |
| 1897 | int asp; |
| 1898 | real rDiff, rOrb, azi1, azi2, alt1, alt2, dir1, dir2, altdir1, altdir2, |
| 1899 | retalt1a; |
| 1900 | |
| 1901 | // Compute the declination of the two planets. |
| 1902 | azi1 = planet1[i]; azi2 = planet2[j]; |
| 1903 | alt1 = planetalt1[i]; alt2 = planetalt2[j]; |
| 1904 | dir1 = ret1[i]; dir2 = ret2[j]; |
| 1905 | altdir1 = retalt1[i]; altdir2 = retalt2[j]; |
| 1906 | if (!us.fEquator2 && !us.fParallel2) { |
| 1907 | // If have ecliptic latitude and want equatorial declination, convert. |
| 1908 | EclToEquDir(&azi1, &alt1, &dir1, &altdir1, fFalse, fTrue, fTrue); |
| 1909 | EclToEquDir(&azi2, &alt2, &dir2, &altdir2, fFalse, fTrue, fTrue); |
| 1910 | } else if (us.fEquator2 && us.fParallel2) { |
| 1911 | // If have equatorial declination and want ecliptic latitude, convert. |
| 1912 | EclToEquDir(&azi1, &alt1, &dir1, &altdir1, fFalse, fTrue, fFalse); |
| 1913 | EclToEquDir(&azi2, &alt2, &dir2, &altdir2, fFalse, fTrue, fFalse); |
| 1914 | } |
| 1915 | |
| 1916 | // Check each vertical aspect type to see if it applies. |
| 1917 | for (asp = 1; asp <= (!us.fDistance ? aOpp : us.nAsp); asp++) { |
| 1918 | if (!FAcceptAspect(i, asp, j)) |
| 1919 | continue; |
| 1920 | if (asp == aCon) |
| 1921 | rDiff = alt2 - alt1; |
| 1922 | else if (asp == aOpp) |
| 1923 | rDiff = alt1 + alt2; |
| 1924 | else { |
| 1925 | retalt1a = rAspAngle[asp] / rDegHalf; |
| 1926 | if (RAbs(alt1) > RAbs(alt2)) |
| 1927 | alt2 /= retalt1a; |
| 1928 | else |
| 1929 | alt1 /= retalt1a; |
| 1930 | rDiff = ((alt1 >= 0.0) == (alt2 >= 0.0) ? alt1 - alt2 : alt1 + alt2); |
| 1931 | } |
| 1932 | rOrb = GetOrb(i, j, asp); |
| 1933 | if (us.nAppSep == 1) { |
| 1934 | if (FCmSwissAny()) { |
| 1935 | retalt1a = us.nRel > rcTransit ? altdir1 : 0.0; |
| 1936 | rDiff *= RSgn2(altdir2 - retalt1a); |
| 1937 | } else { |
| 1938 | // If no declination velocity, make aspect separating. |
| 1939 | rDiff = RAbs(rDiff); |
| 1940 | } |
| 1941 | } else if (us.nAppSep == 2) { |
| 1942 | // "Waxing" is if bodies on same side, "waning" if on different sides. |
| 1943 | // (This means Parallel is always waxing, Contraparallel always waning.) |
| 1944 | rDiff = RAbs(rDiff) * ((alt1 >= 0.0) == (alt2 >= 0.0) ? -1.0 : 1.0); |
| 1945 | } |
| 1946 | |
| 1947 | #ifdef EXPRESS |
| 1948 | // Adjust parallel orb with AstroExpression, if one defined. |
| 1949 | if (!us.fExpOff && FSzSet(us.szExpAsp)) { |
no test coverage detected