astro_calculations

Last updated:

0 purchases

astro_calculations Image
astro_calculations Images
Add to Cart

Description:

astro calculations

astro_calculations #
astro_calculations is a Dart package for astronomical calculations. astro_calculations is inspired by Pysolar and based on this pdf by Ibrahim Reda and Afshin Andreas.
astro_calculations is currently a work in progress. It will soon support many more calculations.
Usage #
SUNRISE TIME

By default all functions return DateTime object for UTC. To get it in Local format, pass isLocal as true.
final latitude = 28.6139;
final longitude = 77.2090;
final dateTime = DateTime.utc(2020, 12, 30);

final sunRiseTime =
getSunRiseTime(latitude, longitude, dateTime, isLocal: true);

copied to clipboard
SUNSET TIME
final sunSetTime =
getSunSetTime(latitude, longitude, dateTime, isLocal: true);

copied to clipboard
SUN TRANSIT TIME
final sunTransitTime =
getSunTransitTime(latitude, longitude, dateTime, isLocal: true);

copied to clipboard
AZIMUTH ANGLE OF SUN
final azimuthAngle =
getSunAzimuthAngle(latitude, longitude, elevation); //elevation is w.r.t. Sea level

copied to clipboard
Example #
void main() {
final latitude = 28.6139;
final longitude = 77.2090;
final dateTime = DateTime.utc(2020, 12, 30);

final sunRiseTime =
getSunRiseTime(latitude, longitude, dateTime, isLocal: true);
final sunSetTime =
getSunSetTime(latitude, longitude, dateTime, isLocal: true);
final sunTransitTime =
getSunTransitTime(latitude, longitude, dateTime, isLocal: true);

print('Sunrise Time: $sunRiseTime');
print('Sunset Time: $sunSetTime');
print('Sun Transit Time: $sunTransitTime');
}
copied to clipboard
OUTPUT
Sunrise Time: 2020-12-30 07:13:20.000
Sunset Time: 2020-12-30 17:34:16.000
Sun Transit Time: 2020-12-30 12:23:46.000

copied to clipboard
Created from templates made available by Stagehand under a BSD-style
license.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.