SunCalc class
Sun and moon times
Constructors
- SunCalc()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
addTime(
double angle, {required String riseName, required String setName}) → void - add custom sun angles to calculate the time for
-
getMoonIllumination(
DateTime date) → Illumination - calculations for illumination parameters of the moon, based on http://idlastro.gsfc.nasa.gov/ftp/pro/astro/mphase.pro formulas and Chapter 48 of "Astronomical Algorithms" 2nd edition by Jean Meeus (Willmann-Bell, Richmond) 1998.
-
getMoonPosition(
DateTime date, {required double lat, required double lng}) → Position - calculates the moon position for a given date time and geo position
-
getMoonTimes(
DateTime date, {required double lat, required double lng, bool inUtc = true}) → MoonTimes - calculates the moon rise and set times
-
getSunPosition(
DateTime date, {required double lat, required double lng}) → Position - calculates sun position for a given date and latitude/longitude
-
getTimes(
DateTime date, {required double lat, required double lng, double height = 0.0}) → SunTimes - calculates sun times for a given date, latitude/longitude, and, optionally, the observer height (in meters) relative to the horizon