Package swisseph

Examples of swisseph.SwissEph


                            Set<CalcPlanetFlag> flags,
                            Set<PlanetId> planets,
                            ResultBuilder builder) {
        Calendar time = event.getTime();

        SwissEph eph = getSwissEph();

        double jday = getJulDay(time);

        int intFlag = 0;
        Map<CalcPlanetFlag, Integer> flagMap = getSwissephCalcPlanetFlagsMap();
        for (CalcPlanetFlag flag : flags) {
            Integer i = flagMap.get(flag);
            if(i != null)
                intFlag |= i;
        }
        intFlag |= SweConst.SEFLG_SWIEPH; // NEEDSWORK:

        Map<PlanetId,Integer> planetMap = getSwissephPlanetMap();

        Map<ResultId, Object> parms = new HashMap<ResultId, Object>();
        parms.put(ResultId.EVENT, event); // all planets share this

        try {
            for (PlanetId planetId : planets) {
                double[] xx = new double[6];
                StringBuffer serr = new StringBuffer();
                int rc = eph.swe_calc_ut(jday,
                                         planetMap.get(planetId),
                                         intFlag,
                                         xx,
                                         serr);
                if(rc == SweConst.ERR)
View Full Code Here


    {
        Calendar time = event.getTime();
        double longitude = event.getLongitude().getVal();
        double latitude = event.getLatitude().getVal();

        SwissEph eph = getSwissEph();

        double[] cusp = new double[13];
        double[] ascmc = new double[10];

        Character myHouseType = getSwissephHouseTypeMap().get(htype);
        if(myHouseType == null)
            myHouseType = 'P'; // NEEDWORK: provide a default, or throw an error

        Map<ResultId, Object> parms = new HashMap<ResultId, Object>();
        parms.put(ResultId.EVENT, event); // all houses share this

        int rc = SweConst.ERR;
        try {
            rc = eph.swe_houses(getJulDay(time),
                                0, //SweConst.SEFLG_SIDEREAL,
                                latitude, longitude,
                                myHouseType,
                                cusp, ascmc);
            if(rc == SweConst.ERR)
View Full Code Here

    private static SwissEph getSwissEph()
    {
        if(swissEph == null) {
            String s = System.getProperty(SwissData.PROP_DATA_PATH);
            if(s != null)
                swissEph = new SwissEph(s);
            else
                swissEph = new SwissEph();
        }
        return swissEph;
    }
View Full Code Here

TOP

Related Classes of swisseph.SwissEph

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.