File indexing completed on 2025-03-23 09:40:53
0001 /* 0002 SPDX-FileCopyrightText: 2016 Jasem Mutlaq <mutlaqja@ikarustech.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "astrometryparser.h" 0010 #include "fitsviewer/fitsdata.h" 0011 #include "indi/indicamera.h" 0012 0013 namespace Ekos 0014 { 0015 class Align; 0016 0017 /** 0018 * @class RemoteAstrometryParser 0019 * RemoteAstrometryParser invokes the remote astrometry.net solver in the remote CCD driver to solve the captured image. 0020 * The offline astrometry.net plus index files must be installed and configured on the remote host running the INDI CCD driver. 0021 * 0022 * @author Jasem Mutlaq 0023 */ 0024 class RemoteAstrometryParser : public AstrometryParser 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 RemoteAstrometryParser(); 0030 virtual ~RemoteAstrometryParser() override = default; 0031 0032 virtual void setAlign(Align *_align) override 0033 { 0034 align = _align; 0035 } 0036 virtual bool init() override; 0037 virtual void verifyIndexFiles(double fov_x, double fov_y) override; 0038 virtual bool startSolver(const QString &filename, const QStringList &args, bool generated = true) override; 0039 virtual bool stopSolver() override; 0040 0041 void setAstrometryDevice(const QSharedPointer<ISD::GenericDevice> &device); 0042 void setEnabled(bool enable); 0043 bool sendArgs(const QStringList &args); 0044 bool setCCD(const QString &ccd); 0045 0046 public slots: 0047 void checkStatus(INDI::Property prop); 0048 void checkResults(INDI::Property prop); 0049 0050 private: 0051 QSharedPointer<ISD::GenericDevice> m_RemoteAstrometry; 0052 bool solverRunning { false }; 0053 bool captureRunning { false }; 0054 Align *align { nullptr }; 0055 FITSImage::Parity parity = FITSImage::BOTH; 0056 QString targetCCD; 0057 }; 0058 }