Clone of cbassa's stvid. Satellite tracking with video cameras.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jeff Moe 6dc5025e69 position.txt file for acquire 2 days ago
data Add tyc2.fits catalogue 3 years ago
stvid Minor change 4 months ago
.gitignore Ignore fits files 1 week ago
LICENSE Create configuration file and add LICENSE 4 years ago mv upstream README 1 week ago position.txt file for acquire 2 days ago Just import picamerax if Pi is used 1 week ago Reduced wait time 4 months ago
configuration.ini-dist Update configuration.ini 2 months ago Rename observer elevation to height 3 years ago Add for astrometric solving 3 years ago Merge pull request #67 from EelkeVisser/fixprocess 4 weeks ago
requirements.txt Latest matplotlib for python 3.10 + pyparsing dep 1 week ago
setup.cfg Add for astrometric solving 3 years ago update_tle: Add status messages on stdout 3 years ago


Fork/clone of cbassa's stvid.


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

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



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/bin/source-extractor

Store downloads here:

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

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.

Make sure you're in groups that may be needed:

sudo adduser debian plugdev
sudo adduser debian video


Download SDK from ASI. It is under a permissive license, for the binaries, but where is the source? It appears it is proprietary software. There are libre implementations, such as for INDI.

tar xf ASI_linux_mac_SDK_V1.26.tar.bz2
cd ASI_linux_mac_SDK_V1.26/

# Set up permissions with udev:
cat lib/asi.rules | sudo tee /etc/udev/rules.d/50-asi.rules

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.


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

Acquire image, first download archives:



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