astro_calculations library

Properties

julianEpoch DateTime
Epoch for Julian day is January 1, 4713 BC in proleptic Julian calendar and November 24, 4714 BC in the proleptic Gregorian calendar Since 1 BC is year 0, we'll use year -4713
final

Functions

getDeltaT(int year, int month) double
Calculated using Polynomial Expressions listed by NASA on https://eclipse.gsfc.nasa.gov/LEcat5/deltatpoly.html
getGregorianDay(double julianDay) DateTime
getJulianCentury(double julianDay) double
getJulianDay(DateTime dateTime) double
calculated using Universal Time
getJulianEphemerisCentury(double julianEphemerisDay) double
getJulianEphemerisDay(DateTime dateTime) double
calculated using Terrestrial Time
getJulianEphemerisMillenium(double julianEphemerisCentury) double
getSunRiseTime(double latitude, double longitude, DateTime dateTime, {dynamic isLocal = false}) DateTime
returns time of sunrise for given latitude and longitude. By default returns time in UTC, to get local time set isLocal to true
getSunSetTime(double latitude, double longitude, DateTime dateTime, {dynamic isLocal = false}) DateTime
returns time of sunset for given latitude and longitude. By default returns time in UTC, to get local time set isLocal to true
getSunTransitTime(double latitude, double longitude, DateTime dateTime, {dynamic isLocal = false}) DateTime
returns time of noon or when sun is at highest point for given latitude and longitude. By default returns time in UTC, to get local time set isLocal to true