@treker7/practical-astronomy

1.0.7 • Public • Published

Practical Astronomy - Algorithms Implemented from the Book Practical Astronomy With Your Calculator

Installation:

npm install --save-dev treker7/practical-astronomy

Examples:

var sun = require('./practical-astronomy/services/sun');
var moon = require('./practical-astronomy/services/moon');
var GeographicCoordinate = require("../models/geographicCoorindate");

const myLocation = new GeographicCoordinate(42.37, -71.05);
const myTime = moment();

var riseAndSetTimes = sun.getRiseAndSetTime(myLocation, myTime);
console.log('The sun will rise at: ' + riseAndSetTimes.riseTime);
console.log('The sun will set at: ' + riseAndSetTimes.setTime);

var moonPhase = moon.getPhase(myTime);
console.log('The current moon phase is: ' + moonPhase);

Package Sidebar

Install

npm i @treker7/practical-astronomy

Weekly Downloads

12

Version

1.0.7

License

ISC

Unpacked Size

58.2 kB

Total Files

19

Last publish

Collaborators

  • treker7