| 930 | // rectangular coordinates of a planet to zodiac position and latitude. |
| 931 | |
| 932 | void ProcessPlanet(int ind, real aber) |
| 933 | { |
| 934 | real ang, rad; |
| 935 | |
| 936 | RecToPol(space[ind].x, space[ind].y, &ang, &rad); |
| 937 | planet[ind] = Mod(DFromR(ang) - aber + is.rSid); |
| 938 | RecToPol(rad, space[ind].z, &ang, &rad); |
| 939 | if (us.objCenter == oSun && ind == oSun) |
| 940 | ang = 0.0; |
| 941 | ang = DFromR(ang); |
| 942 | // Ensure latitude is from -90 to +90 degrees. |
| 943 | while (ang > rDegQuad) |
| 944 | ang -= rDegHalf; |
| 945 | while (ang < -rDegQuad) |
| 946 | ang += rDegHalf; |
| 947 | planetalt[ind] = ang; |
| 948 | } |
| 949 | |
| 950 | |
| 951 | #ifdef EPHEM |
no test coverage detected