0xStarcat / CircularNatalHoroscopeJS

An ES6 library for many astrological chart calculations.
The Unlicense
248 stars 74 forks source link

Missing House Data #40

Open aintHuman opened 1 year ago

aintHuman commented 1 year ago

Using the following data, House information is omitted for Venus:

{ "houseSystem": "placidus", "zodiac": "tropical", "year": 1995, "month": 3, "day": 23, "hour": 6, "minute": 26, "second": 0, "latitude": 34.0522265, "longitude": -118.2436596 }

Not sure what is causing it, since this is the first time this is happened despite making thousands of queries. It's definitely do do with this particular date. All other houses are present for the other celestial bodies.

aintHuman commented 1 year ago

Is this repo maintained anymore ? Has the maintainer gone completely AWOL ?

Moziezez commented 1 year ago

When i type in your horoscope data, Venus is alright, but Sun and Sirius doesn't have any entries for their houses. So I think it maybe always happens with the 12th House, if the corresponding planet has a small angle, e.g. 7°. Because in these cases, the angle of the planet is not greater than the starting point of the house.

Not sure yet, but the problem could be solved with an error handling like this:

    try {
    "do something with"  horoscope.planet.House  "where the House-entry is empty"   
    } catch(err) {
        horoscope.planet.House.id = 12;
        console.log(err, planet, " has no corresponding house!");
    } finally {
        "continue or do something else"
    };

In this simple case, the missing entry of "House.id" for a specific "planet", would be just set to 12, estimating it always happens to the last house. So later you could match the planet to it's corresponding house again.