Giter Site home page Giter Site logo

johanley / astro Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 10.04 MB

Full source for astronomytonight.net, a site for amateur astronomers. The site has basic astronomy data for any location, and weather data for specific countries (the US and Canada). Customizable for your observing location.

License: BSD 2-Clause "Simplified" License

Java 4.73% HTML 0.63% JavaScript 94.59% CSS 0.05%

astro's People

Contributors

johanley avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

astro's Issues

Rendering on Apple devices

The rendering on Apple devices isn't very good. The rendering on the canvas element is particularly bad. Is this because of the retina display changing the scale?

Form prepopulation - likely cross-site-scripting vulnerability

In the mechanism for pre-populating forms with the most recent data, I inject raw request params into the DOM, as part of hidden input controls in a form. (These recycle back to the original form.) That injected data is not escaped, so there's likely a problem with cross-site-scripting there.

Translation - daily phenomena - output of the MICA tool.

The main output page has the option of rendering the output in French.
The output of the MICA tool, for daily phenomena, is English only.

Given the regularity of the output, it's likely possible to automate the translation of its text (at least most of the time).

Translation - comments on the Messier objects.

The main output page has the option of rendering the output in English or French. That is not 100% implemented.

There are comments on the appearance on the Messier objects. Those should be translated into French by a native speaker. The English version of these comments are taken from the Observer's Handbook of the Royal Astronomical Society of Canada. (Which is credited on the site's home page, by the way.)

Charts - render the Sun and Moon more realistically

Show the apparent size of the Sun.

Show the apparent size and phase of the Moon. Show the polar angle of the crescent's axis.

At the moment, the Moon is shown as a simple small dot. At times of occultations, the star being occulted is being shown a small distance away from this dot.

Time Zones

At present, when the user views data for a location in another time zone, the times (and some dates) are erroneous. This is a result of how, by default, javascript treats time zones.

Do we do anything about this? Or leave it alone?

Charts - occultations not rendered correctly.

When an occultation is shown in a chart, by following a link from the main page, the rendering is off. The star is not close enough to the Moon's limb. It's off by ~20-40 minutes of time.

I checked the raw calc in ephem.js for the core calc of topocentric positions, and it seems ok (to within about 1 arcmin). The function EPH.apply_parallax_to_αδ(eph, wh) also seems ok.

So the bug is likely elsewhere. Size of the moon? Position of the star? The calc in code.js for the changes to ra, decl due to parallax?

Translate the UI into French

The code should allow for N languages, not just English and French.
The impl should allow reuse of one JSP for rendering results in N languages.

Improve the precision of planet positions.

There's a good technique described in the Observer's Handbook for calculating fairly precise positions over a limited time span (about a year). (See page 22, in the 2017 Handbook.)

The idea is to use two osculating orbits, taken for 2 specific moments, separated by ~6 months. For other moments, just use linear interpolation/extrapolation to get a good approximation to the orbit. This technique has a max error of ~2-3 arc seconds over a limited time span.

This algo is already mostly implemented. The exception is the Earth/Sun, where the current impl uses a mean orbit (less accurate). The problem, of course, is that the loss of precision for the Earth's position propagates to the calculated position of all the other planets. In other words, the Earth is the weak link in the chain here.

The fix needs :

  • a change in the algo for the position of the Earth/Sun
  • preferably, to account for the fact that, in the Observer's Handbook, the osculating orbit for the Earth is for the barycenter of the Earth-Moon system. At a distance of 1 AU, this changes positions by about 6 arcseconds.

Planet symbols - weird rendering on some devices.

The site uses the traditional symbols for the planets, as seen in old astronomical almanacs. Using those symbols has the advantage of being very curt - they take minimal space.

On a Samsung device, I've saw these symbols appear with colored backgrounds, with a different color for each planet. It didn't look very good.

Charts - sporadic bug, not showing the planet.

Example: main page, listing of planets has links to a chart. I click on Mercury's link. The chart shows, but with no icon or text for Mercury in the center. A few minutes later, the bug is not reproduced. Doesn't seem to be common. (I saw it with the default location, at about 9:05pm EDT 2017-07-17).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.