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)