# stvid Fork/clone of cbassa's `stvid`. # Installation Debian. Install package dependencies: ``` sudo apt install python3-virtualenv python3-pip python3-dev \ source-extractor astrometry.net \ libeigen3-dev ``` Perhaps need some of the `astrometry.net` data files: ``` sudo apt install \ astrometry-data-tycho2 astrometry-data-tycho2-07 \ astrometry-data-tycho2-08 astrometry-data-tycho2-09 \ astrometry-data-tycho2-10-19 ``` ``` git clone https://spacecruft.org/spacecruft/stvid # Or use upstream: git clone https://github.com/cbassa/stvid ``` Optionally, set up python virtual environment: ``` cd stvid virtualenv -p python3 env source env/bin/activate pip install --upgrade pip ``` Install dependencies with ``` pip install -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: ``` git clone https://gitlab.com/pierros/hough3d-code cd hough3d-code make all sudo cp -p hough3dlines /usr/local/bin/hough3dlines ``` # Configure Thusly... ``` 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 `astrometry.net` to run in parallel, assuming you have enough RAM: (This doesn't appear to work? Breaks?). ``` sudo vim /etc/astrometry.cfg # Uncomment: inparallel ``` # Usage Enter `virtualenv`, if used: ``` cd stvid/ source env/bin/activate ``` Get the latest TLEs: ``` ./update_tle.py ``` # Fixed When running `acquire.py` on `amd64` architecture it gives this error: ``` OSError: libbcm_host.so: cannot open shared object file: No such file or directory ``` The `libbcm_host.so` is a (non-libre?) firmware file that is part of Raspberry Pi. https://github.com/raspberrypi/firmware/blob/master/opt/vc/lib/libbcm_host.so 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/bcm_host.py:_lib = ct.CDLL('libbcm_host.so') ``` 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. # Upstream See `README-upstream.md`. `stvid`: * https://github.com/cbassa/stvid # License Same as upstream license, GPLv3. © 2018-2022 Cees Bassa © 2022, Jeff Moe