Examples of SunEclipse


Examples of org.openhab.binding.astro.internal.model.SunEclipse

      Sun sunTomorrow = getSunInfo(addDays(calendar, 1), latitude, longitude, true);
      sun.setNight(new Range(sun.getAstroDusk().getEnd(), sunTomorrow.getAstroDawn().getStart()));
    }

    // eclipse
    SunEclipse eclipse = sun.getEclipse();
    MoonCalc mc = new MoonCalc();

    double partial = mc.getEclipse(calendar, MoonCalc.ECLIPSE_TYPE_SUN, j, MoonCalc.ECLIPSE_MODE_PARTIAL);
    eclipse.setPartial(DateTimeUtils.toCalendar(partial));
    double ring = mc.getEclipse(calendar, MoonCalc.ECLIPSE_TYPE_SUN, j, MoonCalc.ECLIPSE_MODE_RING);
    eclipse.setRing(DateTimeUtils.toCalendar(ring));
    double total = mc.getEclipse(calendar, MoonCalc.ECLIPSE_TYPE_SUN, j, MoonCalc.ECLIPSE_MODE_TOTAL);
    eclipse.setTotal(DateTimeUtils.toCalendar(total));

    return sun;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.