mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-01-02 20:50:28 -05:00
Not quite right yet for some reason, but this is closer. JavaScript function Astronomy.SkyPos() now returns both J2000 (RA,DEC) and (RA,DEC) using true equator and equinox of date. Use the latter to calculate horizontal coordinates. This matches my call to NOVAS place() function, but there are still errors larger than 2 degrees compared with JPL Horizons and Heavens Above. For example: 2019-04-11 19:47:00 variable test.html JPL Horizons error(arcmin) Sun azimuth 245.455 246.585 -67.80 Sun altitude 50.858 51.261 -24.17 Jupiter azimuth 277.309 275.287 121.33 Jupiter altitude -63.751 -63.860 6.52
23 lines
722 B
HTML
23 lines
722 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Astronomy debug</title>
|
|
<script src="../source/js/astronomy.js"></script>
|
|
<script>
|
|
function Run() {
|
|
var observer = Astronomy.MakeObserver(29, -81, 10);
|
|
var date = 2481207.5;
|
|
var pos = Astronomy.GeoMoon(date);
|
|
console.log(pos);
|
|
var sky = Astronomy.SkyPos(pos, observer);
|
|
console.log(sky);
|
|
var hor = Astronomy.Horizon(sky.t, observer, sky.ofdate.ra, sky.ofdate.dec);
|
|
console.log(hor);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<input type="button" onclick="Run()" value="Run" >
|
|
</body>
|
|
</html>
|