SolarCalculator class

Calculates the apparent position of the Sun, sunrise, sunset, noon and the different twilights times for a given moment in time and position on Earth.

The position is given by:

  • the latitude in degrees, positive for north, negative for south;
  • the longitude in degrees, positive for east, negative for west.

Constructors

SolarCalculator(Instant instant, double latitude, double longitude, [double timezoneOffset = 0.0])

Properties

eveningAstronomicalTwilight Twilight
The evening astronomical twilight.
no setter
eveningCivilTwilight Twilight
The evening civil twilight.
no setter
eveningNauticalTwilight Twilight
The evening nautical twilight.
no setter
hashCode int
The hash code for this object.
no setterinherited
instant Instant
final
isHoursOfDarkness bool
Gets if it is hours of darkness based on the civil twilight.
no setter
latitude double
final
longitude double
final
morningAstronomicalTwilight Twilight
The morning astronomical twilight.
no setter
morningCivilTwilight Twilight
The morning civil twilight.
no setter
morningNauticalTwilight Twilight
The morning nautical twilight.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sunEquatorialPosition EquatorialCoordinate
The apparent position of the Sun in the Equatorial Coordinate System.
no setter
sunHorizontalPosition HorizontalCoordinate
The apparent position of the Sun in the Horizontal Coordinate System.
no setter
sunriseTime Instant
The sunrise time.
no setter
sunsetTime Instant
The sunset time.
no setter
sunTransitTime Instant
The transit time of the Sun.
no setter

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