Author Topic: searchaspect  (Read 1523 times)

0 Members and 1 Guest are viewing this topic.

Jean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1247
    • View Profile
searchaspect
« on: February 17, 2022, 02:30:40 PM »
- Februari 17
+ Added astrobasic command 'searchaspect'.

This is a simplified version of findaspect, it searches only for one aspect between two planets.

From the help:

-------
searchaspect

Syntax: searchaspect(real start, real end, int p1, int p2, int as);

Action: Searches for aspect as between p1 and p2, from start to end, returns julian day if found, else returns 6000000.

Example:

int time[6];
real jd = getsystemtime(time);
jd = searchaspect(jd, jd + 30, SUN, MOON, CONJUNCTION); ` search for the next new moon
real zone = gettimezone(defaultplace, jd);
juliantotime(jd + zone, time); ` make local time
run;
Greetings from Groningen Netherlands.

ABer

  • Administrator
  • Hero Member
  • *****
  • Posts: 1172
    • View Profile
Re: searchaspect
« Reply #1 on: February 17, 2022, 10:05:45 PM »
Thanks Jean - this is going to be really helpful. I can see a use for this in the horary script. Ed

Jean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1247
    • View Profile
Re: searchaspect
« Reply #2 on: February 17, 2022, 10:44:35 PM »
Should have done this sooner, it was 10 minutes work and it's much more convenient than findaspect().
Greetings from Groningen Netherlands.

Jean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1247
    • View Profile
Re: searchaspect
« Reply #3 on: February 18, 2022, 11:10:27 AM »
I also added searchaspectx for aspects between a transit and a horoscope.

from the help:
------------------
searchaspectx

Syntax: searchaspectx(real start, real end, int p1, int p2, int h, int as);

Action: Searches for aspect as between transit p1 and p2 from horoscope h, from start to end, returns julian day if found, else returns 6000000.

Example:

int time[6];
real jd;
jd = getsystemtime(time);
copyhoroscope(-1, 0);
jd = searchaspectx(jd, jd + 370, SUN, MOON, 0, CONJUNCTION); ` find the moment when transit sun is conjunct moon in horoscope number 0.
real zone = gettimezone(defaultplace, jd);
juliantotime(jd + zone, time);
run;
Greetings from Groningen Netherlands.

ABer

  • Administrator
  • Hero Member
  • *****
  • Posts: 1172
    • View Profile
Re: searchaspect
« Reply #4 on: February 19, 2022, 09:41:46 AM »
To search for a number of days before the chart date:

if (zeroSun[MOON] < 180)
     jdSyz = searchaspect(chartJD - 16, chartJD, SUN, MOON, CONJUNCTION); ` searches from the 16th day before the chart date to the chart date
  else
      jdSyz = searchaspect(chartJD - 16, chartJD, SUN, MOON, OPPOSITION);

This will find the prenatal lunation.

zeroSun[MOON] is from an array of longitudes created by referencing all planets to the Sun as zero.

Ed