Trouble never comes alone

Just as I thought I had a temporary resolution to the previous problem with oaCapture, another one gets thrown in my face 🙁

Inclusion of the cfitsio library causes binary portability problems left, right and centre because the libraries have slightly different versions on systems that are otherwise happy to run the same binary.

I think my fix for this is just going to be to reconfigure the build scripts to ignore the FITS library unless it’s forced on the command line or the build is on OSX.  For the time being, binary distributions will just have to do without FITS.  I’ll fix it when I get around to producing proper .deb and .rpm files for each environment.

Posted in Astronomy, Computing, Linux | Tagged | Leave a comment

Just when the finishing post is in sight…

I thought I was going to be able to finish off everything for the new release of oaCapture today, but just at the last moment I’ve found a problem with the support for the Starlight Xpress filter wheel.

I’ve written support for the wheel using libusb although in actual fact the device claims to be a HID.  It all works on Linux, but on OSX the kernel forces a driver to load for HIDs and they can’t be detached via libusb.  So, the driver won’t work.

Looks like the solution is going to be to re-write the driver using a HID interface.  But not for this release I think.  I’ll put it on the list for the next one.

Posted in Astro Equipment, Astronomy, Computing, Linux | Tagged | Leave a comment

The joy of supporting filter wheels

I’m working on support for filter wheels for oaCapture at the moment.  I’ve had a few hardware niggles that I’ll document separately, but just getting the code right is proving something of a struggle.  Every time I make a change somewhere I think of some knock-on effect somewhere else that needs handling.  The multiple layers of indirection from a list of possible filters to their possible inclusion in a filter wheel and in what position and then the selection of those filters as part of a capture sequence is a bit mind-bending to say the least…

I hope I’m now most of the way through it.  I do have (largely untested) code that will run sequences of captures selecting filters in turn from a list between each, so now I need to test it and do some of the remaining tidying up though I think some of the advanced stuff can wait for another release.

On the subject of releases, I did want to make this release available with a full build system for making .rpm and .deb files, but I don’t think that’s going to happen as I’d really like to get something out some time around the end of the month.  Even whilst I’ve been writing this piece I’ve thought of one more item for “future development” and another to be done before the release goes out.

Posted in Astro Equipment, Computing | Tagged | Leave a comment

Astro EQ conversion of EQ3-2 (part 5)

Once the RA motor mounting was sorted I started on the DEC bracket which is somewhat simpler, being made from a section of 4mm thick aluminium angle. Again there’s only one bolt for fixing to the mount, so the bracket is wide enough that it can’t rotate about the fixing. The hole for the bolt (lower left in the image below) was drilled and threaded for an M5 screw which fits through the slotted motor mounting lug on the EQ3-2 saddle.

astro-eq-04

 

The remaining holes on the left are for the RJ11 socket, and those on the right obviously for the motor itself.  Here it is fitted together:

astro-eq-05

And finally, all the bits and pieces fitted to the mount body and connected up to the worm drives.

astro-eq-06

Posted in Astro Equipment, Astronomy, Projects | Tagged , | 1 Comment

Still Life in Green and Black

green-black

35mm, 27mm, 24mm and 19mm Tele Vue Panoptics, currently the physically largest eyepieces I have, next to a 5mm Baader Genuine Ortho. And something Green and Black for scale…

Posted in Astro Equipment, Astronomy | Tagged | Leave a comment

Separated at birth?

I’ve just watched the Horizon programme from a week or so back — “Is your brain male or female?” presented by Michael Moseley and Alice Roberts. My enjoyment of it was somewhat curtailed however because of Alice Roberts’ uncanny similarity in appearance, mannerisms and speech patterns to Victoria Coren-Mitchell. I have absolutely no objection to either of them. Quite the opposite in fact: it’s always a pleasure to hear or read what they have to say, but it’s quite odd when your brain keeps telling you it’s the wrong person.

poker-facebone-head

Posted in Random | 5 Comments

libudev to the rescue!

Well, on Linux at least, for the moment…

Some time ago when I was writing part of oaCapture I wanted to be able to tell whether the currently connected camera was a Philips SPC900. Ideally, given that I knew, say, that I was communicating via /dev/video0 I wanted to be able to find out what USB vendor id and product id were associated with the USB device (if any) connected to to /dev/video0 and see if they were the values for the SPC900.

I couldn’t work out how to do that, so in the end I opted for an ugly “solution” where I found the name of the camera and compared it with a suitable string. Clearly that’s not great because the string may well not be exactly identical in all versions of the camera and/or firmware.

I’ve now got to the point where I’m trying to add filter wheel support. I have a Xagyl FW5125 USB filter wheel and I found myself in a similar, but even more awkward, position. I know the filter wheel will show up on Linux as /dev/ttyUSBn where n will depend on how many other USB serial devices there are on the system and in what order they were initialised. I also know the VID/PID and serial number for the filter wheel. The question is, given one, how do I find the other to see if I have the right device and not some other USB serial hardware with an FTDI (as that’s what it uses) chipset?

The force was strong in me this time however and I discovered some information on libudev which can traverse the Linux sysfs filesystem and drag all sorts of useful data back out of it. In this case for me it meant that I could look at all the serial/tty devices, find which of them were on a USB bus and then look at the vendor id, product id and serial number to see if I had the right one, and find the device name under /dev used to communicate with it. Everything I could have wanted, and more!

The code looks something like this:

{
  struct udev* udev;
  struct udev_enumerate* enumerate;
  struct udev_list_entry* devices;
  struct udev_list_entry* dev_list_entry;
  struct udev_device* dev;
  const char* serialNo;
  const char* path;
  const char* deviceNode;
  const char* vid;
  const char* pid;

  if (!( udev = udev_new())) {
    fprintf ( stderr, "can't get connection to udev\n" );
    return -1;
  }

  enumerate = udev_enumerate_new ( udev );
  udev_enumerate_add_match_subsystem ( enumerate, "tty" );
  udev_enumerate_scan_devices ( enumerate );
  devices = udev_enumerate_get_list_entry ( enumerate );
  udev_list_entry_foreach ( dev_list_entry, devices ) {

    path = udev_list_entry_get_name ( dev_list_entry );
    dev = udev_device_new_from_syspath ( udev, path );
    deviceNode = udev_device_get_devnode ( dev );

    if (( dev = udev_device_get_parent_with_subsystem_devtype ( dev, "usb",
        "usb_device" ))) {
      vid = udev_device_get_sysattr_value ( dev, "idVendor" );
      pid = udev_device_get_sysattr_value ( dev, "idProduct" );
      if ( !strcmp ( "0403", vid ) && !strcmp ( "6001", pid )) {
        serialNo = udev_device_get_sysattr_value ( dev, "serial" );
        if ( !strcmp ( serialNo, "A4008T44" )) {
          // I have my filter wheel...
        }
      }
    }
    udev_device_unref ( dev );
  }
  udev_enumerate_unref ( enumerate );
  udev_unref ( udev );

  return 0;
}

At the time the filter wheel is identifed, deviceNode contains the path of the character device required to communicate with it (eg. /dev/ttyUSB1).

Now I just have to work out how I’m going to do that on OSX 🙂

Posted in Astronomy, Computing, Linux | Tagged , | 1 Comment

Astro EQ conversion of EQ3-2 (part 4)

My new drills have arrived and I’ve now drilled all the holes for the RA motor mount. It looks a bit like a Swiss cheese. This is the “outside” face, with holes for the motor flange, the four mounting screws, the RJ11 socket for the motor cable, one for a cable tie to keep the wiring neat and an access hole for fitting the motor mount to the telescope mount.

ra-motor-01

The face that fits against the mount has access holes for reaching the motor mounting screws and a large one to make sure there is clearance for the pulley.

ra-motor-02

In fact, having fitted the motor I didn’t actually need the clearance hole, though there’s not a huge amount of space between the face of the pulley and the aluminium channel.

I filed a flat on the end of the motor output shaft for the pulley grub screw to bear on, fitted the pulley and drew the wires through some heat-shrink (as yet unshrunk) to keep them neat.

ra-motor-03

The last step for this motor is to solder the motor wires to the RJ11 socket, after which the entire unit can be fitted to back to the mount.

Posted in Astro Equipment, Astronomy, Projects | Tagged , | 4 Comments

Astro EQ conversion of EQ3-2 (part 3)

My pulleys and drive belts arrived today.

I removed the grub screws and drilled out the 48-tooth pulleys to 6mm (from 5mm) in the lathe to fit the worm spindles and the 16-tooth pulleys to 5mm (from 3mm) to fit the stepper motors. I chose to use the lathe rather than the pillar drill purely to give me a better chance of keeping the bores central. Unfortunately that’s pretty much all I can do for now, though the stepper motor spindles don’t have a flat so I may need to grind one for the grub screw to bear on if it doesn’t work without.

I need to cut a 22mm hole in the mounting brackets for the motor body to sit in, but that will be much easier to do with a 22mm drill in the pillar drill rather than trying to centre an oddly-shaped piece of material in the lathe, taking it out to about 18mm with a drill and then boring the hole out the rest of the way.

I don’t have a 22mm drill bit at the moment, but one is on order. As soon as I have that I can get on with cutting those holes, drilling the mounting brackets for the motor mounting screws and assembling all the parts. After that I think it’s just cabling that will be left.

Posted in Astro Equipment, Astronomy, Projects | Tagged , | Leave a comment

A new scope arrives

No pictures yet, but last week a new telescope arrived. I’ve been promising myself an MN190 for some time if one came up second hand at a fair price and took the opportunity when it did having passed on several others over the last year or two.

Very much looking forward to imaging with it once I get the observatory set up, hopefully this autumn.

Posted in Astro Equipment, Astronomy | Tagged , | Leave a comment