File indexing completed on 2024-03-24 15:18:08

0001 /*
0002     SPDX-FileCopyrightText: 2005 Pablo de Vicente <pvicentea@wanadoo.es>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "ui_modcalcvlsr.h"
0010 
0011 #include <QTextStream>
0012 
0013 class QWidget;
0014 class SkyPoint;
0015 class GeoLocation;
0016 class dms;
0017 
0018 /**
0019  * Module to compute the heliocentric radial velocity, geocentric radial velocity and
0020  * topocentric radial velocity for a source, given its coordinates, its Vlsr and the date and
0021  * location on the Earth.
0022  *
0023  * @author Pablo de Vicente
0024  */
0025 class modCalcVlsr : public QFrame, public Ui::modCalcVlsrDlg
0026 {
0027     Q_OBJECT
0028 
0029   public:
0030     explicit modCalcVlsr(QWidget *p);
0031     virtual ~modCalcVlsr() override = default;
0032 
0033   private slots:
0034     void slotNow();
0035     void slotLocation();
0036     void slotFindObject();
0037     void slotCompute();
0038 
0039     void slotUtChecked();
0040     void slotDateChecked();
0041     void slotRaChecked();
0042     void slotDecChecked();
0043     void slotEpochChecked();
0044     void slotLongChecked();
0045     void slotLatChecked();
0046     void slotHeightChecked();
0047     void slotVlsrChecked();
0048     void slotInputFile();
0049     void slotOutputFile();
0050     void slotRunBatch();
0051 
0052   private:
0053     /**
0054      * @returns a SkyPoint constructed from the coordinates in the
0055      * RA and Dec dmsBoxes. */
0056     SkyPoint skypoint();
0057 
0058     /**
0059      * Constructs the a GeoLocation object (geoPlace) from the calling classes.
0060      * This is for using as Geolocation the location setup in KStars
0061      */
0062     void initGeo(void);
0063 
0064     /** Method to process the lines from a file */
0065     void processLines(QTextStream &istream);
0066 
0067     GeoLocation *geoPlace { nullptr };
0068     int velocityFlag { 0 };
0069 };