From b80bb78db558bc3405fcc3c5784b3cd0657ca21e Mon Sep 17 00:00:00 2001 From: Don Cross Date: Wed, 15 May 2019 20:18:21 -0400 Subject: [PATCH] Browser demo positions.html now shows altitude and azimuth. --- demo/browser/astro_demo.css | 2 +- demo/browser/positions.html | 27 ++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/demo/browser/astro_demo.css b/demo/browser/astro_demo.css index 5189c5ba..702e29f0 100644 --- a/demo/browser/astro_demo.css +++ b/demo/browser/astro_demo.css @@ -3,7 +3,7 @@ */ .NumHeader { - text-align: right; + text-align: center; } .Numeric { diff --git a/demo/browser/positions.html b/demo/browser/positions.html index 00bcb712..24b6f762 100644 --- a/demo/browser/positions.html +++ b/demo/browser/positions.html @@ -30,61 +30,83 @@

Calculations

- +
+ + + + + + + + + + + + + + + + + + + + + +
body RA DECAzAlt
Sun
Moon
Mercury
Venus
Mars
Jupiter
Saturn
Uranus
Neptune
Pluto
@@ -140,8 +162,11 @@ if (body !== 'Earth') { let gv = Astronomy.GeoVector(body, date); let sky = Astronomy.SkyPos(gv, observer); + let hor = Astronomy.Horizon(date, observer, sky.ofdate.ra, sky.ofdate.dec); document.getElementById(`${body}_ra`).innerText = FormatCoord(sky.j2000.ra); document.getElementById(`${body}_dec`).innerText = FormatCoord(sky.j2000.dec); + document.getElementById(`${body}_az`).innerText = FormatCoord(hor.azimuth); + document.getElementById(`${body}_alt`).innerText = FormatCoord(hor.altitude); } }