From 4414b05d36da90815da14b812ad0e6d0b31a6d42 Mon Sep 17 00:00:00 2001 From: Robby Muhammad Nst Date: Sat, 10 Mar 2018 14:04:57 +0700 Subject: [PATCH] Change Readme --- README.md | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 30c46fb..4404326 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,39 @@ Sun calculation fully based on formula from http://aa.quae.nl/en/reken/zonpositie.html ## Warning +:exclamination: This program is not really accurate about the calculation. For the sunrise and sunset, the error value is about 2 minutes miss from the actual time. For the Altitude the error value is near 0.6 degrees and the azimuth as well. -# Install with npm +## Install with npm 'npm install calculation-ofsun' -# Use -'''jvascript - // getSunInformation parameter: Date, Latitude, Longtitude +## How to Use It +'''javascript const cls = require('calculation-ofsun') console.log(cls.getSunInformation(new Date(), 33, 3)) - + /* Get Sun Information expected 3 parameters */ + /* Date, lat, long */ + ''' +You can also call any function except getSunPosition, because it automatically calls by the +getSunInformation function to get sun position according to your input parameters for getSunInformation. + +## Functions parameter +Function Name | Expected Parameter +------------- | ------------------ +getSunInformation | Date, latitude, longtitude +dateToJD | Date +jdTODate | JulianDate +equation_of_center | JulianDate +earthMeanAnomaly | JulianDate +earthTrueAnomaly | JulianDate +eclipticLongtitude | JulianDate +rightAscension | JulianDate +declination | JulianDate +sideraltime | JulianDate +getHourAngle | JulianDate +getSunPosition | None, Dont use it +solarTransit | JulianDate +sunriseandsunset | JulianDate +