Friday, December 07, 2007

DIY Satellite Tracking

Update:  These instructions worked for OS X 10.6 but do not work for 10.8.  I am working on a new instruction set for the 10.8 port and will post the link here when that goes up.

Suppose you are an amateur astronomer and you want to track a satellite or know when it will be visible over a certain spot? Or you want to calculate the location of the moon on a certain night? If you have a Mac or Unix/Linux box, then wonder no more.

I installed John A. Magliacane's Predict program on my MacBook Pro and wrote down a few notes in case anyone else wants to try it.
  1. Install Xtools if it is not already installed.
  2. Make sure you have the ncurses library. (Do a "man ncurses" to check. It should be part of the Xtools package.)
  3. Make sure you have a c compiler. (Do a "which cc" to check.)
  4. Download the latest predict tar file from http://www.qsl.net/kd2bd/predict.html
  5. Untar the package. cd into the predict-2.2.X directory.
  6. For a Mac running OS X, the soundcard library can trip you up. Delete the "#include " line from installer.c
  7. type "./configure" (don't ask why typing "configure" doesn't work)
  8. If you want to track a satellite that is not in the standard file, create a *.tle file using default/predict.tle as a template. You can download two elements (TLE) for a variety of satellites at www.celestrak.com. For the uninitiated, they even explain what a two line element is.
  9. Create a custom ground station site *.qth using default/predict.qth as a template. Remember that predict uses degrees west.
  10. Invoke predict and your non-default files (using your filenames): "predict -q losangeles.qth -t dmsp.tle"
  11. Invoke logging by typing L to toggle logging on/off. Your logfile will appear in SATNAME.txt

6 comments:

  1. Grace,

    The which cc command does not report a location for cc so I assume I have no c compiler loaded on my machine. Where can get a c compiler besided the $500 developers kit sold by Apple?

    Jim

    ReplyDelete
  2. gcc is included in XcodeTools.mpkg, on the DVD that came with your Mac. It should install automatically.

    If not, you can download the sourceforge gcc package that also includes a g95 compiler that is backwards compatible with g77 and g90.

    See OS X for Astronomers at:
    http://www.ociw.edu/~jrigby/osx.html
    for more info and links.

    I have both the Apple default gcc and the sourceforge version installed on all my Macs. Do keep the Apple-provided gcc as the default and alias the sourceforge one to something else. Apple OS X updates will sometimes use gcc and it is important to keep your default gcc pointing to the one they expect.

    ReplyDelete
  3. Did you look in /usr/bin?
    I found
    /usr/bin/cc and /usr/bin/gcc.

    ReplyDelete
  4. Thanks for the help. I got cc loaded from the Mac install disk. I had to use the commend ./configure to get predict to compile. Predict is working OK. Maybe I'll hear you on one of the FM birds.

    Jim

    ReplyDelete
  5. I tried it but it didn't worked

    ReplyDelete
  6. @ GoVT
    Can you be more specific? What part didn't work for you? If the problem was with the predict program, then contact John Magliacane. If there is an error in my instructions, please let me know.

    ReplyDelete