390 likes | 566 Views
A Planetarium on the Web. Pretesh Mistry. What is it?. Why?. Overcome cloudy sky Accessibility Light pollution in urban areas Location independent. Project Overview. Web application Designed for any casual web-user Allows users to create images of the sky based on a : Given location
E N D
A Planetarium on the Web Pretesh Mistry
Why? • Overcome cloudy sky • Accessibility • Light pollution in urban areas • Location independent
Project Overview • Web application • Designed for any casual web-user • Allows users to create images of the sky based on a : • Given location • Given time
Technology • Requirements: • Internet Browser • No plug-ins required • Programming languages: • PHP – integrates well with database & HTML • PostgreSQL – previous experience • HTML - compatibility
Technology cont. • Supporting Technologies • Portable Network Graphics (PNG) • Cascading Style Sheets (CSS) • GD graphics module • Typical Web-Application Setup: User requests Interface & Image DB Queries PHP Scripts
Background Astronomy & Astrometry
Time Systems • Julian Date (JD) • Universal Time(UT)/Greenwich Mean Time (GMT) • Sidereal Time
Julian Date • Overcomes existing system, by representing any time and day in a single unit • E.g. 2.00pm 14th June 2005 • As JD -> 2453536.08333 • Represents number of decimal days since a given date (midday 1st Jan 4713BC)
Universal Time/GMT • Based on the sun motion • Calculated from local civilian by adding or subtracting time zone correction • Advantage: • One time is valid for all locations on Earth
Sidereal Time (ST) • Based on motion of the stars, not the Sun • Sidereal days shorter than solar days • After 24hrs in UT, stars do not return to same position, however after 24hrs ST they would
Coordinate Systems • Horizontal Coordinates • Equatorial Coordinates • Ecliptic Coordinates
Horizontal • Based around observer’s horizon • Positions identified by altitude (a) and azimuth (A)
Equatorial • Earth’s equator, plane of reference • Positions identified by right ascension () and declination ()
Ecliptic • Based around ecliptic (Sun’s orbit path) • Positions identified by ecliptic latitude and longitudes
Coordinate Conversion • Equatorial -> Horizon
Coordinate Conversion cont. • Ecliptic -> Equatorial
Stars • Many Star Catalogues • E.g. Bright Star Catalogue, Tycho-1/-2, Hipparucus, SAO • Contain: • Identifier/name, positions, magnitude, spectral type, motions.
Solar System Objects • Follows an elliptical orbit • Squashing determined by eccentricity
The Sun • Position calculated by assumption of Sun orbiting Earth • Initially assume circular orbit • Calculate position in this fictional orbit by: • Apply correction for true elliptical path
The Sun cont. • Finally ecliptic coordinates found by
The Planets • Positions calculated similar as Sun, except Sun at centre. • However planetary orbits inclined to Earth’s orbit, therefore further corrections required. • Projected onto Sun apparent orbit • Finally position recalculated in reference to the Earth
The Moon • Position difficult to calculate due to orbit: • Extra complications due to gravitational effects of Earth and Sun.
Additions since report • Corrections for Perturbations made • Parallax errors compensated • Especially for the Moon
Zenith Projection • Ideal for drawing a view of sky • Turns horizontal coordinate pair into an (x,y) pair • Real life zenith always at centre of image
Zenith Projection cont. • Advantage: • Direct mapping of visible sky • Disadvantage: • Highly distorted image towards edges of image • Zenith Vs Uniform Zenith
Demonstration …….
Database • SQL database stores star catalogue with desired attributes • Planetary orbit constants • Constellation data • Simple schema • Why SQL then?
Client-Side • Interface constructed by HTML, dynamically generated by PHP scripts • Designed to collect minimum set of data from the user • Makes a request to server-side for desired image
Server-Side • Responsible for producing images by using GD graphics library • Maintains state between requests by using PHP Sessions • Constructs and executes appropriate queries on database
GD – Graphics Library • Constructs an instance of an image file • Allows manipulation of image by: • Drawing lines • Drawing basic shapes • Placing pixels • Rescaling & merging of images
Zooming • Increases the width of the Sun, Moon, and planets accordingly • Stars however do not increase much in size
Panning • Panning controls adjust a virtual latitude and longitude to simulate movement of zenith along image
Panning cont. • Re-centring by mouse clicks: • Achieved by performing inverse of drawing functions • Obtains a equatorial position for that point • Calculate apparent latitude and longitude under newly defined zenith • Redraw projection with new ‘virtual’ latitude and longitude
Future Work • Database optimisations • Phases of Moon and planet • Indicating bright and dark sides • Inclusion of other planets’ moons • E.g. Jupiter’s and Saturn’s • Lunar eclipses
Conclusion • Gained much insight into astronomy • Applied the background material into technical solution • Problems Encountered: • Conversion of methods to code • Applying ambiguity corrections to inverse trigonometry functions • Minimising response times
THE END …questions?