summaryrefslogtreecommitdiffstats
path: root/kstars/kstars/tools/modcalcapcoord.h
blob: 4ac09b388d15a48d650709f137788dc026a8967a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/***************************************************************************
                          modcalcapcoord.h  -  description
                             -------------------
    begin                : Wed Apr 10 2002
    copyright            : (C) 2002 by Pablo de Vicente
    email                : vicente@oan.es
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef MODCALCAPCOORD_H
#define MODCALCAPCOORD_H

#include "modcalcapcoorddlg.h"
#include <kapplication.h>

/** Module to compute the equatorial coordinates for a given date and time
 * from a given epoch or equinox
  *@author Pablo de Vicente
	*@version 0.9
  */

class dms;
class dmsBox;
class SkyPoint;
class KStarsDateTime;
class QTextStream;

class modCalcApCoord : public modCalcApCoordDlg  {

Q_OBJECT
public:
/**Constructor. */
	modCalcApCoord(TQWidget *p, const char *n);
/**Destructor. */
	~modCalcApCoord();

/**Precess the coordinates from epoch 1 to epoch 2 */
	SkyPoint precess (dms ra0, dms dec0, long double j0, long double jf);

/**Apply precession, nutation and aberration corrections to coordinates. */
	SkyPoint apparentCoordinates (dms r0, dms d0, long double j0, long double jf);

	/** Process Lines **/
//	void processLines( const TQFile * f );
	void processLines( TQTextStream &istream );
public slots:


	/** No descriptions */
	void slotComputeCoords();
	/** No descriptions */
	void slotClearCoords();
	void slotUtCheckedBatch();
	void slotDateCheckedBatch();
	void slotRaCheckedBatch();
	void slotDecCheckedBatch();
	void slotEpochCheckedBatch();
	void slotInputFile();
	void slotOutputFile();
	void slotRunBatch();

private:
/**@returns a SkyPoint constructed from the coordinates in the RA and Dec dmsBoxes. */
	SkyPoint getEquCoords(void);

/**Fill the Time and Date fields with the current values from the CPU clock. */
	void showCurrentTime(void);

/**@returns a KStarsDateTime constructed from the Time and Date fields. */
	KStarsDateTime getDateTime (void);

/**Parse the string argument as a double */
	double getEpoch (TQString eName);

/**Fill the RA and Dec dmsBoxes with values of the SkyPoint argument. */
	void showEquCoords ( SkyPoint sp );

};

#endif