Following on from yesterday’s PHP and Python PyEphem Astronomy Helper Primer Tutorial “PyEphem Python module Hello World” feeling tutorial, we get a bit more into the innards of PyEphem today, by allowing the Astronomer details to become part of the mix, as an “Observer” object, in the Python. So the web application user can click/touch the “Observer” button to optionally define their (as per (thanks)) …
- date — Date and time
- epoch — Epoch for astrometric RA/dec
- lat — Latitude (+N)
- lon — Longitude (+E)
- elevation — Elevation (m)
- temp — Temperature (°C)
- pressure — Atmospheric pressure (mBar)
… so that what gets calculated in this scenario, as part of the Horizontal Co-ordinate System is …
- Altitude
- Azimuth
… which, following the leads of PyEphem, would be what interests those practising astronomers out there.
The live run‘s PHP ephem_astronomy.php code changed this way for this new “Observer” functionality.
Previous relevant PHP and Python PyEphem Astronomy Helper Primer Tutorial is shown below.
“The Three P’s”, for us, namely, PHP and Python and Perl, are all great choices as serverside programming languages. You will find, as a result of this, that programmers have written great code for one or other of them, and perhaps for all three. We came across a “heads up”, thanks, to a stupendous Python module called PyEphem that we are introducing at this blog today via …
- installing onto a (MacBook Pro) Mac OS X MAMP local web server environment via (you may not need “sudo ” below) …
sudo pip install pyephem
- unit testing just Python on that local web server via good test code on this webpage
- install on (Apache/PHP/MySql Linux CentOS) rjmprogramming.com.au web server
- unit testing just Python on that rjmprogramming.com.au web server web server via good test code on this webpage
- write some supervisory interfacing PHP featuring …
- table of Celestial Body (list in a dropdown) and its Right Ascension (angle from Earth) and its Declination (angle from Earth) … and if …
- dropdown selection causes some template Python for Jupiter.py to be amended with name of Celestial Body of choice and any epoch (date) information to arrive at filled out table cells
… for a simple PHP supervisory arrangement (via PHP exec) for the (hard working duck underneath the water) Python PyEphem module controlled astronomy calculation brilliance underneath.
We have a short “stream of consciousness” PDF slideshow (of installing, coding and running) to augment your PHP live run‘s PHP ephem_astronomy.php code for your perusal. Early days, but exciting days!
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.