Friday, December 20, 2013

Beaglebone Black and Astrophotography: Phase 2: iAstroHub tweaks

While I was able to setup nearly all of the software for iAstroHub on my Beaglebone Black (still some issues with gphoto), the interface just wasn't working quite right.  So, I enlisted my PHP guru brother to help.

Nginx setup
Edit /etc/php5/fpm/php.ini and turn short_open_tag On in order for things to be happier.
@awnage: The javascript on the main page calls several other pages to display data. This is usually termed AJAX. Those calls were being made to php scripts that used <? (shorttags) instead of <?php. <? is an old PHPv3 standard that has been out of favor for quite some time. Changing the ini setting allows those files to run properly. There is no security concern with this.
Software locations and additional setup
Your lin_guider package is expected to be in the /home/pi directory.  So, the executable path should look like:
/home/pi/lin_guider_pack/lin_guider/lin_guider

When lin_guider is run, it will be done as root.  Consequently, the setup of lin_guider needs to be done as root so that appropriate configuration files are placed in the root's home directory.  If you are logging in in remotely via ssh -X, you will probably have to copy the .Xauthority file from your user account to the root home directory in order to export the lin_guider GUI.  Or, once you have the web interface running, you can use VNC to connect and see the lin_guider interface for setup.

Permissions
Make sure all the text files in /home/pi/www are editable by pi:www-data.
# chown -R pi:www-data /home/pi/www
# chmod 644 /home/pi/www*.txt
Make sure the executables in /home/pi/www/guidestar can be executed by pi.
# chmod ug+x /home/pi/www/guidestar/cmd_getimage
# chmod ug+x /home/pi/www/guidestar/cmd_setposition
SkySafari and iOS Browsers
So, iAstroHub has the cool feature of being able to plate-solve (i.e. figure out where in the sky an image was taken) and then load the solution in SkySafari Plus/Pro.  Anat has a video of the process.  Unfortunately, most browsers on iOS don't allow for downloading of files.  You can of course look at the raw text of the file when clicking on the "Get result for SkySafari" link.  The Mercury browser does allow downloading, but it strips the file extension, and you cannot open it in SkySafari.

After a bit of searching, the Atomic browser is what Anat is using.  You will need the full version, which is a bargain at $1.99 currently.  Unfortunately, the download functionality doesn't work in iOS 7.  Fortunately, my wife's iPad is still on iOS 6.

I see that the iCab browser allows for downloading of files.  Using the same procedure (click and hold on link->save->open in external app) you can get the SkySafari file into your SkySafari app.  $1.99 also.  Wonder if I can get my $1.99 back for Atomic....

It is probably worthwhile to have a VPN Client in case something goes funky with lin_guider.  I also have the pTerm app so that I can login to the BBB from iOS.

No comments:

Post a Comment