Sunrisesunsetlib Java

Library for computing the sunrise/sunset from GPS coordinates and a date, in Java.
Alternatives To Sunrisesunsetlib Java
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Sunrisesunsetlib Java2525216 years ago2December 17, 201425apache-2.0Java
Library for computing the sunrise/sunset from GPS coordinates and a date, in Java.
Androideasyutils23
5 years agomitJava
AndroidEasyUtils is a simple android library that contains some utils method which is much more needed when working in any android project. Categories are - Validators, Dialog, Progress Dialog, Connectivity, Date Time, Bitmaps, HashMap and Others.
Ruby Serialgps14
6 years ago3Ruby
Provides an easy API to get GPS data from your serial GPS module.
Kgeotag7
5 days agogpl-3.0C++
Photo geotagging program
Gmaxfeed6
4 days agogpl-3.0Python
python3 module for downloading and maintaining files from gmax server on local machine.
Rxdatetimepicker5
2 years agoJava
Pictureorganizer4
6 years agogpl-3.0Shell
Automatically organizes pictures and videos based on taken dates and GPS coordinates.
Earthquakewatchdog3
3 years ago41Kotlin
App showing the latest hearthquake event from USGS site.
Appsmazdainfotainement3
3 years agomitJavaScript
Applications Mazda
Fcsprojectairmap_ios3
7 years agoC++
iOS for FCSProjectAirMap
Alternatives To Sunrisesunsetlib Java
Select To Compare


Alternative Project Comparisons
Readme

Sunrise/SunsetLib - Java

Description

Java library to compute the local sunrise and sunset at a given latitude/longitue and date combination. Uses the algorithm found at https://web.archive.org/web/20161202180207/http://williams.best.vwh.net/sunrise_sunset_algorithm.htm.

Dependencies

None

Installation

Download the jar or clone the repo and run $ mvn clean install to build from source.

Maven

You can now use Maven to pull in SunriseSunsetLib into your project, just add:

<dependency>
  <groupId>com.luckycatlabs</groupId>
  <artifactId>SunriseSunsetCalculator</artifactId>
  <version>1.2</version>
</dependency>

to your pom.xml.

If you use gradle, add the following to your build.gradle file:

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.luckycatlabs:SunriseSunsetCalculator:1.2'
}

Usage

Create a SunriseSunsetCalculator with a location and time zone identifier:

Location location = new Location("39.9522222", "-75.1641667");
SunriseSunsetCalculator calculator = new SunriseSunsetCalculator(location, "America/New_York");

Then call the method for the type of sunrise/sunset you want to calculate:

String officialSunrise = calculator.getOfficialSunriseForDate(Calendar.getInstance());
Calendar officialSunset = calculator.getOfficialSunsetCalendarForDate(Calendar.getInstance());

Bug Reports

When filing a bug report, please include the following information:

  • Date sunrise/set calculation was being run for.
  • Latitude/longitute sunrise/set calculation was being run for.
  • Timezone (either "America/New_York" or GMT-0500)

Author

Mike Reedell

Donate with Pledgie

License

Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0

Popular Date Projects
Popular Gps Projects
Popular Libraries Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Java
Date
Gps