top of page
  • 553545

East! North! West! Star Dust Stories!

Updated: Mar 14, 2023

Project Description


The story about this project is that on February 2nd, Dr. Andrew Weiss of Thomson & Lee College has asked me for writing a JavaScript program to display a planisphere showing the constellations visible at the current date and time. The college maintains an astronomy site called Sky Dust Stories for the students and I was more than happy to do it. Bellow there is a screenshot of the page and the link to access it.



Technical Sheet

List of features:

- Variable named thisTime not containing the date object so the browser knows that is the current date. Instead, the object was empty like this ().

- Variable named thisHour, using the getHours() method to extract the hour value from the thisTime variable.

- Store the value of the formula (2×month + hour) % 24 in the mapNum variable.

- Inline element showing the sky image to use in the web page.

- Variable named imgStr that stores the following text string

<img src='sd_skyMap.png' /> where Map is the value of the mapNum variable.

- Page element with the ID planisphere, using the insertAdjacentHTML() to insert the value of the imgStr variable directly after the element’s opening tag.


There it is some of the coding that I displayed in a writing format in the technical sheet.





12 views0 comments

Comentários


bottom of page