SNOUG/src/Software.tex

806 lines
29 KiB
TeX
Raw Permalink Normal View History

2022-08-26 22:30:31 -06:00
%
2022-08-29 18:42:05 -06:00
% Software.tex
2022-08-26 22:30:31 -06:00
%
% SatNOGS Optical Unofficial Guide
%
% Copyright (C) 2022, Jeff Moe
%
% This document is licensed under the Creative Commons Attribution 4.0
% International Public License (CC BY-SA 4.0) by Jeff Moe.
%
2022-08-29 20:33:32 -06:00
\section{Software Overview}
2022-08-31 18:08:48 -06:00
\label{sec:software-overview}
\index{software}
2022-08-30 00:50:14 -06:00
See \ref{fig:operation}, page \pageref{fig:operation}
for a diagram with an overview of the software process.
2022-08-29 20:33:32 -06:00
\begin{center}
\begin{figure}[h!]
2022-08-31 12:44:17 -06:00
% XXX diagram is too large for frame
% \begin{framed}
2022-08-29 20:33:32 -06:00
\smartdiagramset{border color=none,
uniform color list=jebba-light-blue!60 for 4 items,
module x sep=3.75,
back arrow distance=0.75,
}
\smartdiagram[flow diagram:horizontal]{Acquire, Process, Analyze, Upload}
\caption{\gls{SatNOGS-Optical} Operation Pipeline}
2022-08-29 20:33:32 -06:00
\label{fig:operation}
\index{operation}
2022-08-31 12:44:17 -06:00
% \end{framed}
2022-08-29 20:33:32 -06:00
\end{figure}
\end{center}
2022-09-06 00:16:31 -06:00
\index{acquire}\index{process}\index{analyze}\index{upload}
2022-08-29 20:33:32 -06:00
2022-08-26 22:30:31 -06:00
\section{Setup Optical Ground Station Software}
2022-08-29 20:33:32 -06:00
\label{sec:software-setup}
2022-08-27 17:01:04 -06:00
\index{software}
2022-09-01 22:39:51 -06:00
HOWTO set up and configure a \gls{SatNOGS-Optical} \gls{ground-station} prototype.
2022-09-06 14:09:43 -06:00
Note: the \gls{SatNOGS} network is not yet ready for optical data.
2022-08-26 22:30:31 -06:00
2022-09-04 17:45:02 -06:00
For a description of installation using \gls{Docker}, see
section \ref{sec:software-docker}, page \pageref{sec:software-docker}.
For a ``manual'' install, see immediately below.
2022-09-05 23:48:35 -06:00
Setup an \gls{embedded-system}, such as a \gls{Raspberry-Pi} or an Odroid N2,
with \gls{Debian} stable (11/Bullseye) or testing (Bookworm).
2022-09-06 00:16:31 -06:00
\index{Odroid}
2022-08-26 22:30:31 -06:00
2022-09-05 23:48:35 -06:00
See each \gls{software-repository} for latest documentation.
2022-09-03 20:15:26 -06:00
\index{repository}
2022-08-26 22:30:31 -06:00
2022-09-05 23:48:35 -06:00
Install dependencies from the \gls{Debian} \gls{software-repository}:
2022-08-26 22:30:31 -06:00
\begin{minted}{sh}
sudo apt update
sudo apt install python3-virtualenv python3-pip python3-dev \
source-extractor astrometry.net \
libeigen3-dev giza-dev libx11-dev \
astrometry-data-tycho2 astrometry-data-tycho2-07 \
astrometry-data-tycho2-08 astrometry-data-tycho2-09 \
astrometry-data-tycho2-10-19
\end{minted}
2022-09-06 14:09:43 -06:00
\index{virtualenv}\index{PIP}
2022-09-03 20:15:26 -06:00
\index{Giza}\index{Source Extractor}
2022-08-26 22:30:31 -06:00
2022-08-27 23:44:59 -06:00
Next, install the \texttt{\gls{hough3d-code}} dependency.
2022-09-06 00:16:31 -06:00
2022-08-26 22:30:31 -06:00
\begin{minted}{sh}
git clone https://gitlab.com/pierros/hough3d-code
cd hough3d-code
make all
sudo cp -p hough3dlines /usr/local/bin/hough3dlines
\end{minted}
Install \texttt{\gls{satpredict}} from using either the cbassa or spacecruft
2022-09-05 23:48:35 -06:00
\gls{software-repository}.
2022-09-06 00:16:31 -06:00
\index{repository}
2022-08-26 22:30:31 -06:00
\begin{minted}{sh}
cd ../
git clone https://spacecruft.org/spacecruft/satpredict
# Or
#git clone https://github.com/cbassa/satpredict
cd satpredict/
make
sudo make install
\end{minted}
2022-09-06 14:09:43 -06:00
Now install \texttt{\gls{stvid}}, the main acquisition and processing
2022-08-30 14:59:32 -06:00
application. It is written in \gls{Python}. Either use the spacecruft
2022-09-05 23:48:35 -06:00
\texttt{git} \gls{software-repository} or the cbassa one.
2022-09-06 00:16:31 -06:00
\index{acquire}
2022-08-26 22:30:31 -06:00
\begin{minted}{sh}
cd ../
git clone https://spacecruft.org/spacecruft/stvid
# Or use upstream:
#git clone https://github.com/cbassa/stvid
\end{minted}
2022-09-02 15:10:58 -06:00
Optionally, set up a \gls{Python} virtual environment and use \gls{PIP}:
2022-09-06 00:16:31 -06:00
\index{virtualenv}
2022-08-26 22:30:31 -06:00
\begin{minted}{sh}
cd stvid
virtualenv -p python3 env
source env/bin/activate
pip install --upgrade pip
\end{minted}
Install dependencies. Numpy needs to be installed first, or the
install fails.
\begin{minted}{sh}
pip install --upgrade numpy
pip install --upgrade -r requirements.txt
\end{minted}
2022-09-06 00:16:31 -06:00
\index{numpy}
2022-08-26 22:30:31 -06:00
If the system \texttt{python3-numpy} conflicts, you could try installing
numpy with \gls{PIP} in the virtualenv thusly:
2022-08-26 22:30:31 -06:00
\begin{minted}{sh}
pip install --upgrade --ignore-installed numpy
\end{minted}
2022-08-27 23:44:59 -06:00
\gls{Debian} in bug \texttt{\#941466} changed the name of the
2022-08-26 22:30:31 -06:00
\texttt{sextractor} dependency to \texttt{source-extractor},
so a symlink is needed for now:
2022-09-06 00:16:31 -06:00
\index{Source Extractor}\index{SExtractor}
2022-08-26 22:30:31 -06:00
\begin{minted}{sh}
sudo ln -s /usr/bin/source-extractor /usr/local/bin/sextractor
\end{minted}
2022-08-31 18:08:48 -06:00
\section{Configure Software}
\label{sec:software-configure}
2022-09-05 23:48:35 -06:00
Configure the \gls{embedded-system}.
2022-08-26 22:30:31 -06:00
\begin{minted}{sh}
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
\end{minted}
2022-09-06 00:16:31 -06:00
\index{configuration.ini}
2022-08-26 22:30:31 -06:00
Edit various \texttt{configuration.ini} fields:
\begin{minted}{sh}
# 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/default.sex
\end{minted}
2022-09-06 14:09:43 -06:00
\index{Source Extractor}\index{COSPAR}\index{TLE}
2022-08-26 22:30:31 -06:00
Store downloads here:
\begin{minted}{sh}
mkdir -p ./data/obs ./data/tle ./data/results
\end{minted}
The \texttt{ST\_DATADIR} variable is still used, from \texttt{sattools}.
2022-08-26 23:36:00 -06:00
Maybe set all these in \texttt{\~/.bashrc} (suit to fit directory setup):
2022-09-06 00:16:31 -06:00
\index{bashrc}
2022-08-26 22:30:31 -06:00
\begin{minted}{sh}
export ST_DATADIR=$HOME/sattools
export ST_TLEDIR=$HOME/TLE
export ST_OBSDIR=$HOME/satobs
export ST_LOGIN="identity=foo@no:pass"
\end{minted}
2022-09-06 00:16:31 -06:00
2022-09-02 15:10:58 -06:00
Set \texttt{astrometry.net} to run in parallel, assuming you have enough \gls{RAM}:
2022-08-26 22:30:31 -06:00
(This doesn't appear to work? Breaks?).
2022-08-26 22:30:31 -06:00
\begin{minted}{sh}
sudo vim /etc/astrometry.cfg
# Uncomment:
inparallel
\end{minted}
2022-09-06 14:09:43 -06:00
\index{astrometry.net}
2022-08-26 22:30:31 -06:00
2022-08-30 16:27:30 -06:00
\section{skymap}
2022-08-31 18:08:48 -06:00
\label{sec:skymap}
2022-09-06 00:16:31 -06:00
2022-09-04 18:23:21 -06:00
Use \gls{skymap} for viewing \gls{satellite} \glspl{orbit} trails
2022-09-06 14:09:43 -06:00
projected on a map of of the sky. \Gls{skymap} is part of \gls{sattools}.
\Gls{skymap} isn't a required part of the \gls{toolchain}, but it is useful
to see what \glspl{satellite} are visible at a particular time and
2022-08-30 17:48:27 -06:00
location.
2022-08-30 16:27:30 -06:00
2022-08-30 17:11:24 -06:00
Source:
* \url{https://github.com/cbassa/sattools}
My fork:
* \url{https://spacecruft.org/spacecruft/sattools}
2022-08-31 13:07:18 -06:00
\begin{sidewaysfigure}[p!]
2022-08-30 17:11:24 -06:00
\begin{center}
2022-08-31 13:07:18 -06:00
\includegraphics[keepaspectratio=true,height=1.00\textheight,width=1.00\textwidth,angle=0]{skymap-giza-21.png}
\caption{\texttt{\gls{skymap}} example screenshot.}
2022-09-06 14:09:43 -06:00
\label{fig:skymap-giza-21}
2022-08-30 17:11:24 -06:00
\end{center}
2022-08-31 13:07:18 -06:00
\end{sidewaysfigure}
2022-08-30 17:11:24 -06:00
\fbox{
\parbox{\linewidth}{
\textcolor{red}{NOTICE:} \\
The main upstream \gls{sattools} package requires non-\gls{libre} \texttt{pgplot} on the host computer which is not \gls{DFSG} compatible.
2022-09-06 00:16:31 -06:00
\index{proprietary}\index{pgplot}
2022-08-30 17:11:24 -06:00
}
}
Described below is how to build and install my fork of \gls{sattools} to use
\gls{skymap} instead of upstream. \Gls{upstream} requires non-\gls{libre} software which
2022-08-31 16:26:34 -06:00
also happens to be very difficult for most users to compile. My fork uses the
Giza library which replaces pgplot. It is much easier to build.
2022-09-06 00:16:31 -06:00
\index{fork}\index{Giza}\index{pgplot}
2022-08-30 17:11:24 -06:00
\begin{minted}{sh}
2022-08-31 16:26:34 -06:00
# Install dependencies
2022-08-30 17:11:24 -06:00
sudo apt install giza-dev git make dos2unix source-extractor wcslib-dev \
libgsl-dev gfortran libpng-dev libx11-dev libjpeg-dev libexif-dev
2022-08-31 16:26:34 -06:00
# Clone repo
2022-08-30 17:11:24 -06:00
git clone https://spacecruft.org/spacecruft/sattools
2022-08-31 16:26:34 -06:00
# Or use upstream (needs more steps)
git clone https://gitub.com/cbassa/sattools
2022-08-30 17:11:24 -06:00
cd sattools/
2022-08-31 16:26:34 -06:00
# Build
2022-08-30 17:11:24 -06:00
make
2022-08-31 16:26:34 -06:00
# Install
2022-08-30 17:11:24 -06:00
sudo make install
2022-08-31 16:26:34 -06:00
# Clean
2022-08-30 17:11:24 -06:00
make clean
# To rebuild
make clean
make
# To uninstall
sudo make uninstall
\end{minted}
2022-08-31 16:26:34 -06:00
See below for \gls{skymap} (fork) usage:
2022-09-06 00:16:31 -06:00
2022-08-30 17:11:24 -06:00
\begin{minted}{sh}
2022-08-31 16:26:34 -06:00
tleupdate
2022-08-30 17:11:24 -06:00
# set config in ~/.bashrc XXX
2022-08-31 16:26:34 -06:00
skymap --help
2022-08-30 17:11:24 -06:00
Usage: skymap [OPTION]
Visualize satellites on a map of the sky.
-t, --time Date/time (yyyy-mm-ddThh:mm:ss.sss) [default: now]
-c, --catalog TLE catalog file [default: satnogs.tle]
-i, --id Satellite ID (NORAD) [default: all]
-R, --ra R.A. [hh:mm:ss.sss]
-D, --decl Decl. [+dd:mm:ss.ss]
-A, --azimuth Azimuth (deg)
-E, --elevation Elevation (deg)
-w, --width Screen width (default: 1024). Set height too.
-g, --height Screen height (default: 768). Set width too.
-n, --nmax nmax line resolution/speed (default 128)
-S, --all-night All night
-Q, --no-stars No stars
-a, --all-objects Show all objects from catalog (default: LEO)
-h, --help This help
-s, --site Site (COSPAR)
-d, --iod IOD observations
-l, --length Trail length [default: 60s]
-P, --planar-id planar search satellite ID
-r, --planar-alt planar search altitude
-V, --visibility-alt altitude for visibility contours
-p, --positions-file File with xyz positions
-L, --longitude manual site longitude (deg)
-B, --latitude manual site latitude (deg)
-H, --elevation manual site elevation (m)
\end{minted}
2022-09-06 00:16:31 -06:00
\section{Tracking Software}
\label{sec:software-tracking}
2022-09-03 20:15:26 -06:00
\index{track}\index{software}\index{mount}
The tracking software used depends upon the tracking mount.
See section \ref{sec:hardware-tracking-ground-station},
page \pageref{sec:hardware-tracking-ground-station}
for discussion of hardware tracking mounts.
For our uses here, there are three broad categories of tracking
software:
\begin{mdframed}[backgroundcolor=blue!10,linecolor=blue!30]
\begin{description}
\item [\Glspl{telescope}] --- Controlling \glspl{telescope} remotely.
\item [\Glspl{antenna}] --- Controlling \glspl{antenna} remotely with hamlib.
2022-09-02 15:10:58 -06:00
\item [Cameras] --- Controlling \gls{PTZ} cameras remotely.
\end{description}
\end{mdframed}
2022-09-06 00:16:31 -06:00
\index{hamlib}
2022-09-03 20:15:26 -06:00
\index{camera}
\subsection{Telescope Tracking Software}
Software that can be used with \gls{telescope} tracking mounts:
\index{mount}\index{track}
\begin{mdframed}[backgroundcolor=blue!10,linecolor=blue!30]
\begin{description}
2022-09-02 15:10:58 -06:00
\item [\gls{INDI}] --- Main client/server used by other applications.
2022-09-05 23:48:35 -06:00
\item [\gls{KStars}] --- \Glspl{sky-chart}, \gls{INDI} control.
\item [Ekos] --- Application used within \gls{KStars} for remote control
2022-09-01 18:26:24 -06:00
of \glspl{telescope} and related hardware via \gls{INDI}.
2022-09-05 23:48:35 -06:00
\item [Stellarium] --- \Glspl{sky-chart}, has \gls{INDI} plugin.
2022-09-02 15:10:58 -06:00
\item [Other \gls{INDI}] --- Many more applications work with \gls{INDI}.
\item [INDIGO] --- Positions itself as a next-generation \gls{INDI} (?).
\end{description}
\end{mdframed}
2022-09-06 00:16:31 -06:00
\index{Ekos}\index{Stellarium}
2022-09-05 23:48:35 -06:00
\index{INDIGO}
Using \gls{INDI} with \gls{KStars} and Ekos on a Sky-Watcher or \gls{Celestron}
\gls{telescope} mount is a known working solution.
2022-09-06 14:09:43 -06:00
\index{Sky-Watcher}\index{Ekos}
2022-09-15 16:52:40 -06:00
\gls{Celestron} \glspl{telescope} are widely used and available for many years.
There is a variety of software written to control the mounts. The below list
covers the drivers (e.g. \gls{INDI}), not the software on top (e.g \gls{KStars}).
\gls{Celestron} Nexstar \gls{telescope} tracking mount drivers:%
\footnote{\url{https://www.indilib.org/telescopes/celestron.html}}%
\footnote{\url{https://github.com/indigo-astronomy/libnexstar}}%
\footnote{\url{https://github.com/indigo-astronomy/indigo/blob/master/indigo_drivers/mount_nexstar/README.md}}
\begin{mdframed}[backgroundcolor=blue!10,linecolor=blue!30]
\begin{description}
\item [Celestron INDI] --- \gls{Celestron} \gls{INDI}
\item [libnexstar INDIGO] --- libnexstar INDIGO.
\end{description}
\end{mdframed}
Sky-Watcher EQ6-R Pro \gls{telescope} tracking mount drivers:%
\footnote{\url{https://www.indilib.org/telescopes/skywatcher.html}}%
\footnote{\url{https://www.indilib.org/telescopes/skywatcher/eqmod.html}}%
\footnote{\url{https://www.indilib.org/telescopes/skywatcher/synscan-telescope.html}}
\begin{mdframed}[backgroundcolor=blue!10,linecolor=blue!30]
\begin{description}
\item [EQMod Mount INDI] --- Drives Sky-Watcher protocol.
\item [Synscan INDI] --- Drives Synscan hand controller.
\gls{INDI} recommends using EQMod Mount over Synscan.
\item [libnexstar INDIGO] --- libnexstar INDIGO.
\end{description}
\end{mdframed}
\subsection{INDI}
\gls{INDI} does much, \gls{KStars}, etc.
One option to consider is making \gls{stvid} an \gls{INDI} client.
\subsection{INDIGO}
INDIGO%
\footnote{\url{https://www.indigo-astronomy.org/}}
works with libnexstar, which supports many mounts:%
\footnote{\url{https://github.com/indigo-astronomy/libnexstar}}
\begin{quote}
This library implements the serial commands supported by the Celestron
NexStar hand control (HC) and SkyWatcher/Orion SynScan HC. This applies
to the Celestron: NexStar GPS, NexStar GPS-SA, NexStar iSeries, NexStar
SE Series, NexStar GT, CPC, SLT, Advanced-VX, Advanced-GT, CGE, CGEM etc.
SkyWatcher: EQ5, HEQ5, EQ6 (Pro), AZ-EQ5 GT, AZ-EQ6 GT, EQ8 etc. and the
corresponding Orion mounts.
\end{quote}
\subsection{Antenna Tracking Software}
At present, for the \gls{SatNOGS} network \gls{RF} \glspl{ground-station},
hamlib is typically used for tracking, if directional \glspl{antenna} are
2022-09-05 23:48:35 -06:00
used. Hamlib was originally created for \gls{amateur-radio} equipment, but has
2022-09-15 16:52:40 -06:00
expanded to control many more devices. Hamlib can be used for some
telescope mounts.
2022-09-06 00:16:31 -06:00
\index{hamlib}
\begin{mdframed}[backgroundcolor=blue!10,linecolor=blue!30]
\begin{description}
\item [hamlib] --- \Gls{antenna} \gls{rotator} control.
\end{description}
\end{mdframed}
2022-09-15 16:52:40 -06:00
\subsection{Hamlib}
I don't know of anyone prototyping a satellite tracking mount with hamlib,
but it should be possible using the ``leap frog'' method, perhaps on the
same mount as existing \gls{SatNOGS} \glspl{antenna}. The mount may not
be steady enough.
\index{hamlib}\index{mount}\index{track}
2022-09-15 16:52:40 -06:00
Hamlib lists support for the following tracking mounts, usually
used with \glspl{telescope}.%
\footnote{Output from version 4.3.1 of \texttt{rotctl --list}}
2022-09-15 20:07:04 -06:00
\begin{minted}{sh}
1401 Celestron NexStar 20110821.0 Untested ROT_MODEL_NEXSTAR
1801 Meade LX200/Autostar 20200610.0 Stable ROT_MODEL_MEADE
1901 iOptron iOptron 20191209.0 Alpha ROT_MODEL_IOPTRON
\end{minted}
2022-09-15 16:52:40 -06:00
\subsection{Camera Tracking Software}
2022-09-06 00:16:31 -06:00
2022-09-02 15:10:58 -06:00
There are applications for using \gls{PTZ} control of cameras, such as used in
``security'' cameras.
\begin{mdframed}[backgroundcolor=blue!10,linecolor=blue!30]
\begin{description}
2022-09-02 15:10:58 -06:00
\item [motion] --- \gls{PTZ} camera control. XXX check
\end{description}
\end{mdframed}
I don't know of any of these being used in satellite tracking prototypes
at present.
2022-09-01 18:26:24 -06:00
2022-09-01 18:39:18 -06:00
\section{GNSS with \texttt{gpsd}}
2022-09-01 19:51:39 -06:00
\label{sec:software-gnss}
2022-09-06 13:06:35 -06:00
\index{Galileo}
2022-09-06 00:16:31 -06:00
\gls{GNSS} is used for time synchronization and for (somewhat)
2022-09-01 18:26:24 -06:00
accurately determining the location of the observation.
\gls{GNSS} collectively includes the USA \gls{GPS}, Europe's Galileo,
2022-09-02 15:10:58 -06:00
Russia's \gls{GLONASS}, and China's \gls{BDS}, as well as other
2022-09-01 18:26:24 -06:00
regional systems.
2022-09-09 15:13:34 -06:00
\index{Galileo}
2022-09-03 20:15:26 -06:00
\index{USA}\index{Europe}\index{Russia}\index{China}
2022-09-01 18:26:24 -06:00
2022-09-02 15:10:58 -06:00
A basic, widely available \gls{COTS} \gls{USB} \gls{GNSS} device
2022-09-05 23:48:35 -06:00
with a basic (or no!) \gls{antenna} plugged into the \gls{embedded-system}
can get time and location accurate enough for the
2022-09-01 18:26:24 -06:00
purposes here. See various U-Blox devices, for example.
\index{U-Blox}
2022-09-01 18:26:24 -06:00
2022-09-02 15:10:58 -06:00
In \gls{Debian} \gls{GNSS} service with a \gls{USB} device can be provided
by the \texttt{\gls{gpsd}} application.
2022-09-06 00:16:31 -06:00
2022-09-01 18:26:24 -06:00
\begin{minted}{sh}
sudo apt install gpsd gpsd-tools
\end{minted}
2022-09-06 00:16:31 -06:00
2022-09-01 18:26:24 -06:00
Edit the configuration file, \texttt{/etc/default/gpsd} like:
\begin{minted}{sh}
DEVICES="/dev/ttyACM0"
GPSD_OPTIONS="-Gn"
USBAUTO="false"
\end{minted}
This will start a \texttt{\gls{gpsd}} \gls{daemon} listening on all interfaces,
2022-09-01 18:26:24 -06:00
so it can be used by other computers on the network (such as if
acquire and process are on different machines). Using the
device \texttt{/dev/ttyACM0} can be problematic if there are multiple
\texttt{/dev/ttyACM*} devices. Perhaps something like this could be
used in that case:
2022-09-06 00:16:31 -06:00
\index{/dev/ttyACM}
2022-09-01 18:26:24 -06:00
\begin{minted}{sh}
DEVICES="/dev/serial/by-id/usb-u-blox_AG_-_www.u-blox.com_u-blox_GNSS_receiver-if00"
\end{minted}
Even with \texttt{\gls{gpsd}} configuration listening on all \glspl{IP},
2022-09-01 18:26:24 -06:00
don't think \texttt{systemd} won't do what it likes. So
you may have to do:
\begin{minted}{sh}
systemctl edit --full gpsd.socket
\end{minted}
2022-09-03 20:15:26 -06:00
\index{systemd}
2022-09-01 18:26:24 -06:00
And create a \gls{gpsd} configuration like this (I have \gls{IPv6} disabled, in this case):
2022-09-06 00:16:31 -06:00
2022-09-01 18:26:24 -06:00
\begin{minted}{sh}
[Unit]
Description=GPS (Global Positioning System) Daemon Sockets
[Socket]
ListenStream=/run/gpsd.sock
# ListenStream=[::]:2947
ListenStream=0.0.0.0:2947
SocketMode=0600
BindIPv6Only=no
[Install]
WantedBy=sockets.target
\end{minted}
2022-09-06 00:16:31 -06:00
\index{systemd}
2022-09-01 18:26:24 -06:00
(Re)start:
\begin{minted}{sh}
sudo systemctl restart gpsd.service gpsd.socket
\end{minted}
2022-09-06 00:16:31 -06:00
\index{systemctl}
2022-09-01 18:26:24 -06:00
Test all is good:
\begin{minted}{sh}
gpsmon -n
# or
cgps -u m
\end{minted}
2022-09-06 00:16:31 -06:00
\index{gpsmon}\index{cgps}
2022-09-01 18:26:24 -06:00
Enable to start on boot:
\begin{minted}{sh}
sudo systemctl enable gpsd.service gpsd.socket
\end{minted}
2022-09-06 00:16:31 -06:00
\index{systemctl}
2022-09-01 18:26:24 -06:00
2022-09-01 18:43:08 -06:00
See below for sample output from \texttt{cgps}.
\begin{minted}{sh}
┌───────────────────────────────────────────┐┌──────────────────Seen 39/Used 28┐
│ Time: 2022-09-02T00:40:28.000Z (18)││GNSS PRN Elev Azim SNR Use│
│ Latitude: 40.56896250 N ││GP 1 1 24.0 237.0 44.0 Y │
│ Longitude: 105.22600420 W ││GP 3 3 63.0 297.0 50.0 Y │
│ Alt (HAE, MSL): 1848.352, 1869.637 m ││GP 4 4 33.0 292.0 45.0 Y │
│ Speed: 0.05 km/h ││GP 16 16 21.0 162.0 36.0 Y │
│ Track (true, var): 85.1, 8.2 deg ││GP 21 21 13.0 218.0 40.0 Y │
│ Climb: 0.00 m/min ││GP 22 22 40.0 77.0 18.0 Y │
│ Status: 3D DGPS FIX (29 secs) ││GP 26 26 43.0 140.0 46.0 Y │
│ Long Err (XDOP, EPX): 0.40, +/- 1.5 m ││GP 31 31 57.0 49.0 39.0 Y │
│ Lat Err (YDOP, EPY): 0.36, +/- 1.3 m ││SB131 44 42.0 198.0 44.0 Y │
│ Alt Err (VDOP, EPV): 0.90, +/- 0.7 m ││SB133 46 37.0 214.0 41.0 Y │
│ 2D Err (HDOP, CEP): 0.51, +/- 0.5 m ││GL 6 70 48.0 99.0 21.0 Y │
│ 3D Err (PDOP, SEP): 1.04, +/- 5.1 m ││GL 7 71 62.0 352.0 51.0 Y │
│ Time Err (TDOP): 0.57 ││GL 8 72 19.0 314.0 47.0 Y │
│ Geo Err (GDOP): 1.18 ││GL 9 73 71.0 149.0 45.0 Y │
│ ECEF X, VX: -1274598.340 m -0.010 m/s ││GL 10 74 28.0 194.0 29.0 Y │
│ ECEF Y, VY: -4682900.030 m -0.010 m/s ││GL 23 87 13.0 305.0 48.0 Y │
│ ECEF Z, VZ: 4127382.070 m 0.020 m/s ││GA 2 302 31.0 168.0 40.0 Y │
│ Speed Err (EPS): +/- 0.4 km/h ││GA 3 303 72.0 40.0 39.0 Y │
│ Track Err (EPD): n/a ││GA 8 308 40.0 300.0 47.0 Y │
│ Time offset: -0.005160195 s ││GA 13 313 22.0 285.0 43.0 Y │
│ Grid Square: DN70jn26 ││GA 15 315 17.0 232.0 43.0 Y │
└───────────────────────────────────────────┘└More...──────────────────────────┘
\end{minted}
2022-09-06 00:16:31 -06:00
\index{cgps}
2022-09-01 18:43:08 -06:00
2022-09-01 19:51:39 -06:00
2022-09-01 19:04:43 -06:00
\section{NTP}
\label{sec:software-ntp}
2022-09-01 19:04:43 -06:00
With all the above, time still needs to be configured.
Configuring \texttt{\gls{gpsd}} isn't enough for correct system time.
2022-09-02 15:10:58 -06:00
The main system on the Internet used for time synchronization is \gls{NTP}.
In \gls{Debian} there are a few options for \gls{NTP}.
The best is to use a hardware \gls{GNSS} (\gls{GPS}), with \gls{PPS} for improved
accuracy. The easiest is to just use \gls{NTP}.
2022-09-06 00:16:31 -06:00
All systems in the \gls{pipeline} need to have the correct time and
2022-09-02 15:10:58 -06:00
location. It is best if they all pull from the same \gls{NTP}
2022-09-01 19:04:43 -06:00
server, or even better than best if they all run \gls{GNSS}
2022-09-02 15:10:58 -06:00
hardware with \gls{PPS} enabled.
2022-09-01 19:04:43 -06:00
Some quick and dirty time synchronization commands.
The \texttt{ntpd} daemon can have slow startup synchronization
sometimes. If so, perhaps run like this:
\begin{minted}{sh}
# Get the daemon out of the way.
sudo systemctl stop ntp
# Get time from someone, MIT in this case:
sudo ntpdate time.mit.edu
# OR
# Get time from local server, such as router (made up IP):
sudo ntpdate 192.168.1.1
# If above complains, to do an initial sync at boot (force ntpdate):
sudo ntpdate -b 192.168.1.1
2022-09-01 19:04:43 -06:00
# Restart daemon
sudo systemctl start ntp
\end{minted}
2022-09-03 20:15:26 -06:00
\index{ntpd}\index{ntpdate}
2022-09-01 19:04:43 -06:00
Go through each of the systems used in the \gls{toolchain} and make
sure they all have accurate time or processing will be off.
2022-09-01 19:04:43 -06:00
2022-09-01 19:51:39 -06:00
2022-09-04 17:18:37 -06:00
\section{KStars with Tracking Mount}
2022-09-01 19:51:39 -06:00
\label{sec:software-kstars}
2022-09-06 00:16:31 -06:00
\index{software}\index{track}\index{mount}
2022-09-04 17:18:37 -06:00
\index{Ekos}
\gls{KStars} is an application that has been used for years in the astronomy
2022-09-09 15:13:34 -06:00
community. It is well established, well supported, and included in \gls{Debian}.
2022-09-01 19:51:39 -06:00
\gls{KStars} has multiple uses for imaging \glspl{satellite}.
One main use is to control a \gls{telescope} tracking mount, such as the
2022-09-01 19:51:39 -06:00
hardware described in section \ref{sec:hardware-mounts}, page \pageref{sec:hardware-mounts}.
\index{track}\index{mount}
2022-09-01 19:51:39 -06:00
For the purposes here, described below will be using \gls{KStars} with a
2022-09-02 15:10:58 -06:00
Sky-Watcher tracking mount with \gls{INDI} and Ekos.
2022-09-01 19:51:39 -06:00
See figure \ref{fig:video-enclosure-mount-tripod}, page \pageref{fig:video-enclosure-mount-tripod}
for a photo of the setup used with \gls{KStars} below.
2022-09-06 00:16:31 -06:00
\index{Ekos}
2022-09-01 19:51:39 -06:00
The \gls{telescope} mount will be used in sidereal tracking mode,
2022-09-01 19:51:39 -06:00
where the stars will appear as
``points'', and the \glspl{satellite} will appear as trails.
The mount is not used in a satellite tracking mode.
Sidereal is the ``standard'' tracking mode of \glspl{telescope}.
2022-09-06 00:16:31 -06:00
\index{Sky-Watcher}\index{Ekos}
2022-09-01 19:51:39 -06:00
\gls{KStars} is the ``main'' application, but it depends on other key parts.
\gls{INDI} is the protocol that \gls{KStars} uses for \gls{telescope} control.
2022-09-01 19:51:39 -06:00
\gls{INDI} itself is a collection of applications.
2022-09-05 23:48:35 -06:00
While \gls{KStars} has the main \gls{sky-chart} and Ekos is launched within it,
2022-09-01 19:51:39 -06:00
the actual mount control is done with the Ekos application.
While it may sound complex, all of this is set up pretty easily in
\gls{Debian}.
2022-09-06 00:16:31 -06:00
\index{Ekos}\index{mount}
2022-09-01 19:51:39 -06:00
\begin{minted}{sh}
# Quick and dirty from memory, something like:
sudo apt update
sudo apt install kstars indi-bin indi-eqmod indi-gpsd
\end{minted}
2022-09-05 23:48:35 -06:00
\gls{KStars} has a \gls{sky-chart}, as can be see in figure \ref{fig:kstars-skychart},
2022-09-01 19:51:39 -06:00
page \pageref{fig:kstars-skychart}.
2022-09-05 23:48:35 -06:00
When mount control is functioning, a location on the \gls{sky-chart}, such as a star,
2022-09-02 21:42:16 -06:00
can be clicked on and the mount will \gls{GoTo} that location and optionally track it.
Using this, a \gls{telescope} mount can be used to easily point the camera at a location
2022-09-09 15:13:34 -06:00
and track it to observe \glspl{satellite}. It should also provide a superior \gls{FITS} file
for extracting data than using a static mount with \glspl{star-trail} (XXX made up).
\index{mount}\index{track}
2022-09-03 20:15:26 -06:00
\index{camera}
2022-09-01 19:51:39 -06:00
2022-09-09 15:13:34 -06:00
To use a \gls{telescope} tracking mount for use with \texttt{\gls{stvid}}, the following steps need to be performed in
2022-09-01 19:51:39 -06:00
roughly this order, assuming everything has been configured.
An overview of steps:
2022-09-06 00:16:31 -06:00
2022-09-01 19:51:39 -06:00
\begin{mdframed}[backgroundcolor=blue!10,linecolor=blue!30]
\begin{enumerate}
\item Physically mount all hardware.
\item Plug in and power everything up.
\item Confirm all hardware looks ok (e.g. \texttt{lsusb}).
2022-09-02 15:10:58 -06:00
\item Confirm \gls{GNSS} time and location are ok (e.g. \texttt{cgps -u m}).
2022-09-01 19:51:39 -06:00
See section \ref{sec:software-gnss}, page \pageref{sec:software-gnss}.
\item Confirm time is correct on all systems in the \gls{toolchain}
(e.g. \texttt{date}).
2022-09-06 14:09:43 -06:00
See section \ref{sec:software-ntp}, page \pageref{sec:software-ntp},
for information about \gls{NTP}.
2022-09-01 19:51:39 -06:00
\item Run camera configuration script (e.g. \texttt{v4l2-ctl} commands).
2022-09-05 23:48:35 -06:00
\item Start \texttt{indiserver} on the \gls{embedded-system}, using scripts to
2022-09-01 20:17:03 -06:00
include a camera (such as \texttt{indi\_v4l2\_ccd}.
\item Start \gls{KStars} on the workstation.
\item Launch Ekos within \gls{KStars}, under \texttt{Tools}.
2022-09-02 15:10:58 -06:00
\item In Ekos, select a configuration with the \gls{EQ} Mount for the Sky-Watcher,
and \texttt{\gls{V4L2}} for the \gls{CCD}, which will work with The Imaging Source
2022-09-01 19:51:39 -06:00
camera used in this example. Alternatively, the ZWO ASI could be used with a similar configuration.
\item The Ekos configuration should also be set to use the remote \texttt{indiserver}
2022-09-05 23:48:35 -06:00
\gls{IP} address of the \gls{embedded-system} \gls{USB} connected to the Sky-Watcher mount.
2022-09-02 15:10:58 -06:00
\item Hit the start button to start Ekos/\gls{INDI}.
2022-09-01 19:51:39 -06:00
\item On the screen that pops up, confirm all the tabs are good.
\item Check the last configuration tab for the camera, it often
resets the size.
2022-09-02 15:10:58 -06:00
\item Hit close on the screen with the \gls{INDI} devices.
2022-09-01 19:51:39 -06:00
\item Click the mount icon, and start tracking.
2022-09-06 14:09:43 -06:00
\item Perhaps do some focusing... XXX \index{focus}
2022-09-01 19:51:39 -06:00
\item Click the solver icon.
\item Click the Sync radio button.
\item Click Capture and Solve. XXX what is it.
\item If everything is tracking happily, good.
2022-09-06 14:09:43 -06:00
\item If not, do all the alignment steps. \index{alignment}
2022-09-01 19:51:39 -06:00
\item When alignment is good and tracking is accurate, stop Ekos and close it.
2022-09-05 23:48:35 -06:00
\item Stop the \texttt{indiserver} running on the \gls{embedded-system}.
\item Start the \texttt{indiserver} on the \gls{embedded-system},
but without using a camera (e.g. remove \texttt{indi\_v4l2\_ccd}.
2022-09-02 15:10:58 -06:00
\item Select the \gls{INDI} configuration with a remote \texttt{indiserver},
the \gls{EQ} Mount, and the Simulated \gls{CCD}.
\item Hit start in Ekos to get \gls{INDI} connections going.
2022-09-01 19:51:39 -06:00
\item Confirm all is ok in hardware tabs, then hit close.
2022-09-05 23:48:35 -06:00
\item Now in the \gls{KStars} \gls{sky-chart} window there is
control of the mount without interfering with the camera.
2022-09-06 14:09:43 -06:00
\item Start \texttt{\gls{stvid}}. See XXX for more info.
\item When done capturing that part of the sky with \texttt{\gls{stvid}},
stop \texttt{\gls{stvid}}
2022-09-05 23:48:35 -06:00
\item Go to the \gls{KStars} \gls{sky-chart} and right-click
on the new location, and \gls{slew} to it.
2022-09-06 14:09:43 -06:00
\item Start \texttt{\gls{stvid}} again, pointing at the new location.
2022-09-01 19:51:39 -06:00
\item Repeat the last few steps each time a new sky location is desired.
\end{enumerate}
\end{mdframed}
2022-09-06 00:16:31 -06:00
\index{v4l2-ctl}\index{mount}\index{track}
\index{lsusb}\index{cgps}\index{indiserver}
2022-09-06 00:16:31 -06:00
\index{Ekos}\index{Sky-Watcher}\index{The Imaging Source}
2022-09-01 19:51:39 -06:00
\begin{sidewaysfigure}[p!]
\begin{center}
\includegraphics[keepaspectratio=true,height=1.00\textheight,width=1.00\textwidth,angle=0]{kstars-skychart.png}
\caption{\gls{KStars} \gls{sky-chart}, example screenshot.}
2022-09-01 19:51:39 -06:00
\label{fig:kstars-skychart}
\end{center}
\end{sidewaysfigure}
\begin{sidewaysfigure}[p!]
\begin{center}
\includegraphics[keepaspectratio=true,height=1.00\textheight,width=1.00\textwidth,angle=0]{kstars-profile-edit-v4l2.png}
\caption{\gls{KStars} using \gls{V4L2}, example screenshot.}
2022-09-01 19:51:39 -06:00
\label{fig:kstars-profile-edit-v4l2}
\end{center}
\end{sidewaysfigure}
\begin{sidewaysfigure}[p!]
\begin{center}
\includegraphics[keepaspectratio=true,height=1.00\textheight,width=1.00\textwidth,angle=0]{kstars-profile-edit-simulator.png}
\caption{\gls{KStars} using simulated \gls{CCD}, example screenshot.}
2022-09-01 19:51:39 -06:00
\label{fig:kstars-profile-edit-simulator}
\end{center}
\end{sidewaysfigure}
2022-09-05 23:48:35 -06:00
If the camera and mount are connected to the \gls{embedded-system} OK, it will
2022-09-01 20:17:03 -06:00
look like below, in this case with The Imaging Source camera and Sky-Watcher
mount:
\begin{minted}{sh}
jebba@odroid-01:~$ lsusb
Bus 002 Device 003: ID 199e:9004 The Imaging Source Europe GmbH DMK 33UX174
Bus 002 Device 002: ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 067b:23d3 Prolific Technology, Inc. USB-Serial Controller
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
\end{minted}
2022-09-06 14:09:43 -06:00
\index{The Imaging Source}\index{Sky-Watcher}
2022-09-01 20:17:03 -06:00
Note the \texttt{The Imaging Source Europe GmbH DMK 33UX174} device is the
camera and the
2022-09-03 20:15:26 -06:00
\texttt{Prolific Technology, Inc. USB-Serial Controller} is the
Sky-Watcher \gls{telescope} mount. Other views of the devices:
\index{Sky-Watcher}
2022-09-01 20:17:03 -06:00
\begin{minted}{sh}
jebba@odroid-01:~$ ls -l /dev/bus/usb/002/003 /dev/bus/usb/001/003 /dev/video* /dev/ttyUSB0
crw-rw---- 1 root plugdev 189, 2 Sep 1 20:08 /dev/bus/usb/001/003
crw-rw-rw- 1 root video 189, 130 Sep 1 20:08 /dev/bus/usb/002/003
crw-rw---- 1 root dialout 188, 0 Sep 1 20:08 /dev/ttyUSB0
crw-rw---- 1 root video 81, 0 Sep 1 20:08 /dev/video0
crw-rw---- 1 root video 81, 1 Sep 1 20:08 /dev/video1
crw-rw---- 1 root video 81, 2 Sep 1 20:08 /dev/video2
\end{minted}
2022-09-03 20:15:26 -06:00
\index{/dev/video}\index{/dev/ttyUSB}
2022-09-01 20:17:03 -06:00
Side note: you need to be in the \texttt{plugdev, video, dialout} groups.
Side note: on the Odroid N2, there is another \texttt{/dev/video} device,
so three devices are appearing. The The Imaging Source camera appears
as two \texttt{/dev/video} devices.
2022-09-03 20:15:26 -06:00
\index{Odroid}\index{The Imaging Source}
2022-09-01 19:51:39 -06:00
2022-09-04 17:45:02 -06:00
\section{\texttt{stvid} with Docker}
\label{sec:software-docker}
2022-09-06 00:16:31 -06:00
\index{Ekman, Daniel}
2022-09-04 17:45:02 -06:00
Daniel Ekman has created a \gls{Docker} setup for easier installation
and configuration.
2022-09-05 11:50:28 -06:00
The \gls{Docker} source code repo is available here:
2022-09-04 17:45:02 -06:00
2022-09-05 11:50:28 -06:00
* \url{https://github.com/kng/stvid-docker}
The \gls{Docker} itself is here:
* \url{https://hub.docker.com/repository/docker/knegge/stvid}
2022-09-04 17:45:02 -06:00