//必要なデータを外部から渡す場合 public void calculateSunPosition(double[] posdata) // double rightascension, double declination, double sundistance, double timeangle) { asc = posdata[EclipseData.SUN_ASC]; // rightascension; dec = posdata[EclipseData.SUN_DEC]; // declination; phai0 = posdata[EclipseData.PHAI]; // timeangle; dist = posdata[EclipseData.SUN_DIST]; // sundistance;// StarPosition.getSunDistance(timevalue); parallax = StarPosition.getParallax(dist); // k = StarPosition.getSunriseAltitude(StarPosition.getSunDiameter(dist), 0.0, StarPosition.refraction, parallax); twilightk = StarPosition.getTwilightAltitude(0.0, parallax); }
//retrieve the position of the sun public void calculateSunPosition(double year, double month, double day, double hour, double minute) { //Debug.Log( "calculateSunPosiotion"); //Debug.Log("WORLDCLOCK y= " + year + " m= " + month + " d= " + day + " h= " + hour + " min " + minute); time = minute / 60.0 + hour; double timevalue = StarPosition.getTime(year, month, day, time); double elon = StarPosition.getSunEclipticLongitude(timevalue); // double e = StarPosition.getInclination(timevalue); // asc = StarPosition.getRightAscension(elon, e); // dec = StarPosition.getDeclination(elon, e); // phai0 = StarPosition.getSidereal(timevalue, time / 24.0, 0); // dist = StarPosition.getSunDistance(timevalue); parallax = StarPosition.getParallax(dist); // k = StarPosition.getSunriseAltitude(StarPosition.getSunDiameter(dist), 0.0, StarPosition.refraction, parallax); twilightk = StarPosition.getTwilightAltitude(0.0, parallax); }