You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello - thank you for all the work that has gone into this library.
I wonder if you could help me understand an example of calculating the horizontal alt/az of the moon given a geographic position. Or: "Where is the moon?"
I can't get the output to match an Ephemeris from NASA : https://ssd.jpl.nasa.gov/horizons.cgi thought this is very definitely my implementation error.
Would you be able to help me out?
Assuming I import various things:
import Moonposition from "astronomia/src/moonposition";
import {Coord} from "astronomia/src/globe";
import {Ecliptic} from "astronomia/src/coord";
import Julian from "astronomia/src/julian";
import Sidereal from "astronomia/src/sidereal";
import {nutation} from "astronomia/src/nutation";
Define my coordinates as such:
// get the device's geographicCoordinates - or a fallback:
let geographicCoordinates = new Coord(
this.deviceCoordinates.latitude / 180 * Math.PI,
this.deviceCoordinates.longitude / 180 * Math.PI
);
I think I then:
Get the ecliptic Moon position
Convert this to Equatorial, by knowledge of the obliquity
Convert this to Horizontal by knowledge of siderealTime + my location
let calendar = new Julian.Calendar().fromDate(date)
let jd = calendar.toJD()
let jde = calendar.toJDE()
let siderealTime = Sidereal.apparent0UT(jd);
let eclipticMoonPosition = Moonposition.position(jde);
let obliquity = nutation(jde)[1];
let equatorialMoonPosition = new Ecliptic(
eclipticMoonPosition.lat,
eclipticMoonPosition.lon
).toEquatorial(obliquity);
let horizontalMoonPosition = equatorialMoonPosition.toHorizontal(
geographicCoordinates,
siderealTime
);
return horizontalMoonPosition;
The text was updated successfully, but these errors were encountered:
Let's try to match the NASA Horizons output here: https://ssd.jpl.nasa.gov/horizons.cgi
Do it for "central London" : Topocentric ( 0°07'40.1''W, 51°30'26.6''N )
On January 1st 2020 at 00:00:00
Hello - thank you for all the work that has gone into this library.
I wonder if you could help me understand an example of calculating the horizontal alt/az of the moon given a geographic position. Or: "Where is the moon?"
I can't get the output to match an Ephemeris from NASA : https://ssd.jpl.nasa.gov/horizons.cgi thought this is very definitely my implementation error.
Would you be able to help me out?
Assuming I import various things:
Define my coordinates as such:
I think I then:
The text was updated successfully, but these errors were encountered: