Clone of cbassa's stvid. Satellite tracking with video cameras.
Go to file
root 9604381d14 Date, cams, Qs and comments for seesat-l 2023-06-21 18:03:58 -06:00
data Add tyc2.fits catalogue 2019-08-09 20:03:12 +03:00
img Add example acquired image 2022-08-26 09:35:16 -06:00
scripts Date, cams, Qs and comments for seesat-l 2023-06-21 18:03:58 -06:00
stvid Merge upstream Use location from FITS header if available 2022-08-24 19:59:23 -06:00
.gitignore Ignore fits files 2022-07-31 22:12:58 -06:00
LICENSE Create configuration file and add LICENSE 2018-04-20 00:40:03 +03:00 Notes on libre The Imaging Source install 2022-08-23 19:55:18 -06:00 mv upstream README 2022-07-31 20:44:33 -06:00 Use upstream 2023-04-08 13:25:52 -06:00 Merge: Add software binning to cv2 acquisition 2022-08-24 20:01:23 -06:00
config_new-spacecruft.ini revert config track settings with new update 2022-08-24 20:52:24 -06:00
config_new.ini config_new.ini from upstream cbassa 2022-08-22 13:30:30 -06:00
configuration.ini-dist Update configuration.ini 2022-06-11 22:13:52 +02:00 Rename observer elevation to height 2019-11-10 12:52:00 +01:00 Add for astrometric solving 2019-05-12 17:33:00 +03:00 Quick & dirty preview 2022-08-23 19:21:10 -06:00 Add latest changes from cbassa dev branch 2022-08-22 13:35:01 -06:00 Merge upstream Use location from FITS header if available 2022-08-24 19:59:23 -06:00
requirements.txt Latest matplotlib for python 3.10 + pyparsing dep 2022-07-31 23:15:48 -06:00
setup.cfg Add for astrometric solving 2019-05-12 17:33:00 +03:00 update_tle: Add status messages on stdout 2019-12-04 17:06:00 +01:00


Fork/clone of cbassa's stvid.

stvid processed image

NOTE: Unless you have a particular reason to use this, you should use the main upstream repository.


Debian. Install package dependencies:

sudo apt install python3-virtualenv python3-pip python3-dev \
    source-extractor \
    libeigen3-dev giza-dev libx11-dev

Perhaps need some of the data files:

sudo apt install \
    astrometry-data-tycho2 astrometry-data-tycho2-07 \
    astrometry-data-tycho2-08 astrometry-data-tycho2-09 \
git clone
# Or use upstream:
git clone

Optionally, set up python virtual environment:

cd stvid
virtualenv -p python3 env
source env/bin/activate
pip install --upgrade pip

Install dependencies. Numpy needs to be installed first, or the install fails.

pip install --upgrade numpy
pip install --upgrade -r requirements.txt

If the system python3-numpy conflicts, you could try installing numpy in the virtualenv thusly:

pip install --upgrade --ignore-installed numpy

Debian in bug #941466 changed the name of the sextractor dependency to source-extractor, so a symlink is needed for now:

sudo ln -s /usr/bin/source-extractor /usr/local/bin/sextractor

Install hough3d-code dependency:

cd ../
git clone
cd hough3d-code
make all
sudo cp -p hough3dlines /usr/local/bin/hough3dlines

Install satpredict:

cd ../
git clone
# Or
#git clone
cd satpredict/
sudo make install



cd stvid/
cp -p configuration.ini-dist configuration.ini
# Edit
# Note for fields st-username and st-password, *don't* use quotes.
# Set:
vi configuration.ini

Edit various configuration.ini fields:

# For example:
observer_cospar = 9999        # COSPAR number of observer's site
observer_name = Jeff Moe      # Name of observer
observer_lat = 40.568912      # Latitude of location in decimal degrees
observer_lon = -105.225852    # Longitude of location in decimal degrees
observer_height = 1860         # Elevation of location in meters

observations_path = ./data/obs # Path for raw acquisitions
tle_path = ./data/tle          # Path where TLEs are stored (and updated)
results_path = ./data/results   # Path for results of processed obs

st-username = foo
st-password = bar

# Path to source-extractor
sex_config = /usr/share/source-extractor/

Store downloads here:

mkdir -p ./data/obs ./data/tle ./data/results

The ST_DATADIR variable is still used, from sattools. Maybe set all these in ~/.bashrc (suit to fit directory setup):

export ST_DATADIR=$HOME/sattools
export ST_OBSDIR=$HOME/satobs
export ST_LOGIN="identity=foo@no:pass"

Set to run in parallel, assuming you have enough RAM: (This doesn't appear to work? Breaks?).

sudo vim /etc/astrometry.cfg
# Uncomment:


Setup with various hardware.


  • Sony IMX174 or similar.
  • 50mm lens.
  • f1.2 to f1.6 (faster the better).
  • 10Hz image sampling.
  • USB-3 (or ethernet?).

For permanent mounts, considerations:

  • IP-66 or better.
  • PoE?
  • 12V.
  • Raspberry Pi, Intel NUC, Traverse Ten64.
  • Hardware shutter during sunlight (?).

Proprietary examples with IMX174:

  • ZWO ASI174MM.

The Imaging Source

The Imaging Source camera confirmed works well, such as this:

See for more info.


Trying to find libre setup that can be used.

Solutions with gphoto or other non-video camera setups should use stphot not stvid.


The ASI ZWO and QHY cameras use a proprietary SDK. There are no libre implementations found.

Web Cam

Perhaps like this using a web cam and OpenCV

Set up udev:

echo 'SUBSYSTEM=="video1", GROUP="video", MODE="0660"' |
  sudo tee /etc/udev/rules.d/10-webcam.rules

Testing with Logitech BRIO usb web cam. No udev configuration needed. Camera runs with stvid but isn't sensitive enough to be used.


Enter virtualenv, if used:

cd stvid/
source env/bin/activate

Get the latest TLEs:


Configure a position (example). XXX Best way to generate ?

echo \
 '2022-08-07T23:44:14 R: 00:00:00.00 D:  00:00:00.0 H: -152.691 A: 180.000 E: 90.000 q: -28.18' |
 > data/obs/control/position.txt

# Maybe
echo \
 '2022-08-07T23:44:14 R: 00:00:00.00 D:  00:00:00.0 H: -152.691 A: 180.000 E: 90.000 q: -28.18' |
 > $ST_DATADIR/data/position.txt

Acquire image, first download archives:


stvid acquired image stvid acquired image, viewed with astroimagej.


This scriptlet isn't in upstream. It does a preview of the camera using the standard configuration file. So you can get a preview similar to what it actually looks like for focus, perhaps. Does not require X running, but it does need xinit installed. Also need to set X11Forwarding yes in /etc/ssh/sshd_config. Then login to your host with -XY ala:

ssh -XY odroidn2
cd stvid
source env/bin/activate


When running on amd64 architecture it gives this error:

OSError: cannot open shared object file: No such file or directory

The is a (non-libre?) firmware file that is part of Raspberry Pi.

That error comes from installing picamerax on amd64, which was added to requirements.txt, but should really just be when on Raspberry Pi.

env/lib/python3.10/site-packages/picamerax/ = ct.CDLL('')

For now, just import the library that calls for that binary if the Pi camera is used. No need to call it (and crash) if CV2 is used on non-Pi.




© 2018-2022 Cees Bassa


Same as upstream license, GPLv3.

© 2022, Jeff Moe