// カスプを計算 public double[] CuspCalc(int year, int month, int day, int hour, int min, double sec, double lat, double lng, int house) { int utc_year = 0; int utc_month = 0; int utc_day = 0; int utc_hour = 0; int utc_minute = 0; double utc_second = 0; string serr = ""; // [0]:Ephemeris Time [1]:Universal Time double[] dret = { 0.0, 0.0 }; SwissEph s = new SwissEph(); // utcに変換 s.swe_utc_time_zone(year, month, day, hour, min, sec, 9.0, ref utc_year, ref utc_month, ref utc_day, ref utc_hour, ref utc_minute, ref utc_second); s.swe_utc_to_jd(utc_year, utc_month, utc_day, utc_hour, utc_minute, utc_second, 1, dret, ref serr); double[] cusps = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; double[] ascmc = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; if (house == 0) { s.swe_houses(dret[1], lat, lng, 'P', cusps, ascmc); } else if (house == 1) { s.swe_houses(dret[1], lat, lng, 'K', cusps, ascmc); } else if (house == 2) { s.swe_houses(dret[1], lat, lng, 'C', cusps, ascmc); } else { s.swe_houses(dret[1], lat, lng, 'E', cusps, ascmc); } s.swe_close(); return cusps; }