Skip to content

mstaro/commons-suncalc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

commons-suncalc build status

A Java library for calculation of sun and moon positions and phases.

It is a Java port of the great SunCalc JavaScript library by Vladimir Agafonkin, with some modifications and Java-nizations to the API.

Features

  • Lightweight, only requires Java 1.7 or higher
  • Android support
  • Available at Maven Central

Quick Start

This library consists of a few models, all of them are invoked the same way:

Date date = // date of calculation
double lat, lng = // geolocation
SunPosition position = SunPosition.of(date, lat, lng);
System.out.println("Altitude: " + position.getAltitude());
System.out.println("Azimuth: " + position.getAzimuth());

See the online documentation for API.

Contribute

License

commons-suncalc is open source software. The source code is distributed under the terms of Apache License 2.0.

About

Java port of SunCalc library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%