“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.