oresat-star-tracker-software
Introduction
This is a modified version of OpenStarTracker, originally developed by Andrew Tennenbaum at the University at Buffalo. Some of the information below comes from the original README file in the OpenStarTracker repository.
Dependencies
The following should be readily available from standard package repositories.
$ sudo apt install python3 python3-numpy python3-opencv python3-pydbus python3-systemd
In addition, this software depends on python3-prucam and swig (version 4.0.1 or greater), both of which will likely have to be manually built and installed.
Building
# Build everything (source + two packages)
$ dpkg-buildpackage -us -uc
# Build just oresat-star-tracker
$ dpkg-buildpackage -us -uc -B
# Build just oresat-star-tracker-data
$ dpkg-buildpackage -us -uc -A
This repository can build two separate packages, oresat-star-tracker
and oresat-star-tracker-data
. The former contains the daemon and the latter contains the data (star catalog, calibration parameters, etc.) that the daemon requires to run. Splitting up the packages means we can update the daemon without having to put megabytes of redundant information in the package.
Note that oresat-star-tracker
formally depends on oresat-star-tracker-data
. You won't be able to install it until you have the data in place.
Installing
$ sudo dpkg -i [name].deb
Usage
# Start the daemon
sudo systemctl start oresat-star-trackerd
# Stop the daemon
sudo systemctl stop oresat-star-trackerd
The star tracker runs as a daemon, which sends runtime details to /var/log/syslog
and exposes the following methods and properties via D-Bus. Note that states are encoded as integers, where 0
represents the standby state and 1
represents the solving state.
CurrentState
-- Current state.CapturePath
-- Filepath of last image manually captured.SolvePath
-- Filepath of last image for which a solution was attempted.Coor
-- The results of the last solution attempt, represented as (declination, right ascension, orientation, Unix timestamp). If the first three numbers are all 0, it means the solution attempt failed.Capture()
-- A method to take a photo and updateCapturePath
. Only works when in standby.ChangeState(NewState)
-- A method to change states.
Behavior
After being started, the daemon will first load and filter the star database in memory and then go into standby mode. This process may take five minutes or more.
While in standby mode, images can be manually captured and saved using the Capture()
function. If put in the solving state, the software will automatically take images and attempt to solve them continuously. In this state, calling the Capture()
function will not do anything.
Images will be stored in /usr/share/oresat-star-tracker/data/[snaps|solves]
, with the former being used for manual captures and the latter for automatic captures during star tracking. Each folder will contain (up to) the most recent fifty images, though CapturePath
and SolvePath
will only point to the most recent images.