gnthibault / RemoteObservatory

Astronomical observatory control system
https://gnthibault.github.io/RemoteObservatory/README.md
GNU General Public License v3.0
10 stars 3 forks source link
astronomy observatory observatory-platform telescope telescope-focuser telescope-mount telescopes

RemoteObservatory

astropy

Another astronomical observatory manager. This project either uses, or is directly inspired by:

Overview, scratching the surface

Quick overview of what you will be able to see and manage through this project Telescope and observatory 1 Telescope mount Telescope and observatory 2 Monitoring dashboard overview 1 Monitoring dashboard overview 2

Install

System requirements when using ubuntu

sudo apt-add-repository ppa:mutlaqja/ppa
sudo add-apt-repository ppa:pch/phd2
sudo apt-get update
sudo apt-get install \
    astrometry-data-4208-4219\
    extra-cmake-modules\
    gpsd\
    indi-full\
    kdelibs5-dev\
    kdoctools-dev\
    kstars-bleeding\
    libastrometry*\
    libboost-dev\
    libboost-regex-dev\
    libcfitsio-dev\
    libcurl4-openssl-dev\
    libfftw3-dev\
    libftdi-dev\
    libftdi1-dev\
    libgphoto2-dev\
    libgps-dev\
    libgraphviz-dev \
    libgsl-dev\
    libindi-dev\
    libindi1\
    libjpeg-dev\
    libkf5configwidgets-dev\
    libkf5crash-dev\
    libkf5declarative-dev\
    libkf5globalaccel-dev\
    libkf5kdelibs4support5-bin\
    libkf5newstuff-dev\
    libkf5notifications-dev\
    libkf5notifyconfig-dev\
    libkf5plotting-dev\
    libkf5windowsystem-dev\
    libkf5xmlgui-dev\
    libnova*\
    libogg-dev\
    libpython3-dev\
    libqt5svg5-dev\
    libqt5websockets5-dev\
    libraw-dev\
    librtlsdr-dev\
    libtheora-dev\
    libtiff-dev\
    libusb-1.0-0-dev\
    libwxgtk3.0-dev\
    phd2\
    qttools5-dev-tools\
    swig3.0\
    wcslib-dev\
    xplanet\
    zlib1g-dev\
    -y

Setup virtual environment

    pip install virtualenv
    virtualenv venv
    source venv/bin/activate
    pip install -r requirements.txt

Building the nice reporting / latex reports

  sudo apt-get update
  sudo apt-get install -y texlive-latex-recommended texlive-publishers texlive-bibtex-extra texlive-science

Then build with

  python setup.py gen_report

Python requirements

pip install Cython setuptools wheel requests pyindi-client requests-cache watchdog astropy ntplib astroplan matplotlib tzwhere astroquery pymongo rawpy serial pyserial socket astroalign If you want to run the astrometry server locally, use: pip install django Pillow

Kafka GCN stuff

  sudo apt-get install libzstd-dev
  sudo apt-get install libz-dev
  sudo apt-get install rapidjson-dev
  sudo apt-get -y install libsasl2-dev
  sudo apt-get -y install libssl-dev
  git clone https://github.com/edenhill/librdkafka
  cd ./librdkafka
  git checkout v1.9.2-RC3
  ./configure && make -j8 && sudo make install && ldconfig
  pip install --no-binary :all: confluent-kafka

Arduino stuff

If you are interested in compiling/using the arduino stuff here, please download the official Arduino IDE, and define the following environment variable: $ARDUINO_SDK_PATH

  export ARDUINO_SDK_PATH="/opt/arduino-1.8.19/"
  cd Arduino
  mkdir build && cd build
  cmake ..
  make
  cd ..
  ./upload.sh

Setup indiweb on the machine that will host drivers

check installation information on: https://github.com/knro/indiwebmanager

pip install indiweb
sudo cp indiwebmanager.service /etc/systemd/system/
sudo chmod 644 /etc/systemd/system/indiwebmanager.service
sudo systemctl daemon-reload
sudo systemctl enable indiwebmanager.service

content of indiwebmanager.service

# From https://github.com/knro/indiwebmanager
# sudo pip install indiweb
# sudo cp indiwebmanager.service /etc/systemd/system/
# sudo chmod 644 /etc/systemd/system/indiwebmanager.service
# sudo systemctl daemon-reload
# sudo systemctl enable indiwebmanager.service
# sudo reboot
# sudo systemctl status indiwebmanager.service

[Unit]
Description=INDI Web Manager
After=multi-user.target

[Service]
Type=idle
# MUST SET YOUR USERNAME HERE.

User=rock
ExecStart=/usr/local/bin/indi-web -v --xmldir /home/user/projects/RemoteObservatory/conf_files/indi_driver_conf
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

Specific case of aarch64 kernel and armv8 userland

go to your set of build directories:

How to launch the full stuff

First, if you have a custom configuration for your own setup, set the proper variable in you console:

export REMOTE_OBSERVATORY_CONFIG=backyard_config

If you want to try the software with simulators:

./apps/launch_indi_simu.sh
PYTHONPATH=. python ./apps/launch_remote_observatory.py

If, in addition you want the nice dashboard (might require additional dependencies, scripts are untested)

./apps/launch_PAWS.sh

Legacy or optional features

Support for DBus scripting ()

sudo apt-get install libgirepository1.0-dev gobject-introspection pip install PyGObject or conda install -c conda-forge pygobject

Support for the Dash dashboard (legacy, not used anymore):

pip install dash dash-core-components dash-html-components dash-renderer plotly

Web service (legacy, not used anymore)

For now, RemoteObservatory uses some web service to acquire data, so ensure that you have a json file containing the key for each API in your home directory:

TODO: WORK IN PROGRESS: Check before calling this a production software

Helper