$jd_to_use = $birth_JD + $prog_time_to_add; //FOR DEBUG //echo $jd_to_use; exec("swetest -edir{$sweph} -bj{$jd_to_use} -ut -p0123456789DAttt -eswe -fls -g, -head", $out); //add a planet // Each line of output data from swetest is exploded into array $row, giving these elements: // 0 = longitude // 1 = speed // planets are index 0 - index (LAST_PLANET), house cusps are index (LAST_PLANET + 1) - (LAST_PLANET + 12) foreach ($out as $key => $line) { $row = explode(',', $line); $longitude2[$key] = $row[0]; $speed2[$key] = $row[1]; } //add a planet - maybe some code needs to be put here $p_mc = Crunch($longitude1[LAST_PLANET + 10] + $longitude2[0] - $longitude1[0]); $ob_deg = Get_OB_Ecl($jd_to_use); //FOR DEBUG //echo $longitude1[LAST_PLANET + 10] . "<br><br>"; //echo $longitude2[0] . "<br><br>"; //echo $longitude1[0] . "<br><br>"; //echo $p_mc . "<br><br>"; //echo $ob_deg . "<br><br>"; $p_RAMC = r2d(atan(Cosine($ob_deg) * Sine($p_mc) / Cosine($p_mc))); if (Cosine($p_mc) < 0) { $p_RAMC = $p_RAMC + 180; } if ($p_RAMC < 0) { $p_RAMC = $p_RAMC + 360; } $p_RAMC_r = d2r($p_RAMC);
$jd_to_use = $birth_JD + $prog_time_to_add; //FOR DEBUG //echo $jd_to_use; exec("swetest -edir{$sweph} -bj{$jd_to_use} -ut -p0 -eswe -fl -g, -head", $out); //add a planet // Each line of output data from swetest is exploded into array $row, giving these elements: // 0 = longitude of Sun foreach ($out as $key => $line) { $row = explode(',', $line); $longitude2[$key] = $row[0]; } //add a planet - maybe some code needs to be put here $p_sun = $longitude2[0]; $solar_arc = Crunch($longitude2[0] - $longitude1[0]); for ($i = 0; $i <= LAST_PLANET + 12; $i++) { $longitude2[$i] = Crunch($longitude1[$i] + $solar_arc); } //FOR DEBUG //echo $longitude1[LAST_PLANET + 10] . "<br><br>"; //echo $longitude2[0] . "<br><br>"; //echo $longitude1[0] . "<br><br>"; //echo $p_mc . "<br><br>"; //echo $ob_deg . "<br><br>"; //display natal data $secs = "0"; if ($timezone1 < 0) { $tz1 = $timezone1; } else { $tz1 = "+" . $timezone1; } if ($timezone2 < 0) {
} for ($i = 1; $i <= 9; $i++) { $hc1x[$i + 3] = $hc1[$i]; $hc2x[$i + 3] = $hc2[$i]; } for ($i = 1; $i <= 12; $i++) { $hc3x[$i] = ($hc1x[$i] + $hc2x[$i]) / 2; if (abs($hc3x[$i] - $hc1x[$i]) > 90 or abs($hc3x[$i] - $hc2x[$i]) > 90) { $hc3x[$i] = $hc3x[$i] + 180; } if ($hc3x[$i] >= 360) { $hc3x[$i] = $hc3x[$i] - 360; } if ($i >= 2) { if (abs($hc3x[$i] - $hc3x[$i - 1]) > 90 and abs($hc3x[$i] - $hc3x[$i - 1]) < 270) { $hc3x[$i] = Crunch($hc3x[$i] + 180); } } } // put the house cusps back in their original order - house cusp 1 is array element 1 for ($i = 1; $i <= 9; $i++) { $hc3[$i] = sprintf("%.3f", $hc3x[$i + 3]); } for ($i = 10; $i <= 12; $i++) { $hc3[$i] = sprintf("%.3f", $hc3x[$i - 9]); } $hc3[13] = $hc3[1]; //get house positions of composite planets here for ($x = 1; $x <= 12; $x++) { for ($y = 0; $y <= LAST_PLANET; $y++) { $pl = $L3[$y] + 1 / 36000;
//$longitude2 = unserialize(stripslashes($_GET["p2"])); $longitude3 = unserialize(stripslashes($_GET["p3"])); } else { $longitude1 = unserialize($_GET["p1"]); $hc1 = unserialize($_GET["hc1"]); //$longitude2 = unserialize($_GET["p2"]); $longitude3 = unserialize($_GET["p3"]); } $longitude1[LAST_PLANET + 1] = $hc1[1]; $longitude1[LAST_PLANET + 2] = $hc1[10]; $Ascendant1 = $hc1[1]; for ($i = 0; $i <= LAST_PLANET; $i++) { $longitude2[$i] = Crunch($longitude1[$i] + $solar_arc); } $longitude2[LAST_PLANET + 1] = Crunch($hc1[1] + $solar_arc); $longitude2[LAST_PLANET + 2] = Crunch($hc1[10] + $solar_arc); // set the content-type header("Content-type: image/png"); // create the blank image $overall_size = 640; $im = @imagecreatetruecolor($overall_size, $overall_size) or die("Cannot initialize new GD image stream"); // specify the colors $white = imagecolorallocate($im, 255, 255, 255); $red = imagecolorallocate($im, 255, 0, 0); $blue = imagecolorallocate($im, 0, 0, 255); $magenta = imagecolorallocate($im, 255, 0, 255); $yellow = imagecolorallocate($im, 255, 255, 0); $cyan = imagecolorallocate($im, 0, 255, 255); $green = imagecolorallocate($im, 0, 224, 0); $grey = imagecolorallocate($im, 127, 127, 127); $black = imagecolorallocate($im, 0, 0, 0);