Changeset View
Changeset View
Standalone View
Standalone View
kstars/tools/jmoontool.cpp
Show All 12 Lines | |||||
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * | ||
14 | * * | 14 | * * | ||
15 | ***************************************************************************/ | 15 | ***************************************************************************/ | ||
16 | 16 | | |||
17 | #include "jmoontool.h" | 17 | #include "jmoontool.h" | ||
18 | 18 | | |||
19 | #include "ksnumbers.h" | 19 | #include "ksnumbers.h" | ||
20 | #include "kstars.h" | 20 | #include "kstars.h" | ||
21 | | ||||
22 | #include "skymapcomposite.h" | ||||
21 | #include "skyobjects/jupitermoons.h" | 23 | #include "skyobjects/jupitermoons.h" | ||
22 | #include "skyobjects/ksplanet.h" | 24 | #include "skyobjects/ksplanet.h" | ||
23 | #include "skyobjects/kssun.h" | 25 | #include "skyobjects/kssun.h" | ||
24 | 26 | | |||
25 | #include <KPlotting/KPlotObject> | 27 | #include <KPlotting/KPlotObject> | ||
26 | #include <KPlotting/KPlotWidget> | 28 | #include <KPlotting/KPlotWidget> | ||
29 | #include <KPlotAxis> | ||||
27 | 30 | | |||
28 | #include <QFrame> | 31 | #include <QFrame> | ||
29 | #include <QGridLayout> | 32 | #include <QGridLayout> | ||
30 | #include <QKeyEvent> | 33 | #include <QKeyEvent> | ||
31 | #include <QVBoxLayout> | 34 | #include <QVBoxLayout> | ||
32 | 35 | | |||
33 | JMoonTool::JMoonTool(QWidget *parent) : QDialog(parent) | 36 | JMoonTool::JMoonTool(QWidget *parent) : QDialog(parent) | ||
34 | { | 37 | { | ||
▲ Show 20 Lines • Show All 86 Lines • ▼ Show 20 Line(s) | 113 | { | |||
121 | orbit[1] = new KPlotObject(colEu, KPlotObject::Lines, 1.0); | 124 | orbit[1] = new KPlotObject(colEu, KPlotObject::Lines, 1.0); | ||
122 | orbit[2] = new KPlotObject(colGn, KPlotObject::Lines, 1.0); | 125 | orbit[2] = new KPlotObject(colGn, KPlotObject::Lines, 1.0); | ||
123 | orbit[3] = new KPlotObject(colCa, KPlotObject::Lines, 1.0); | 126 | orbit[3] = new KPlotObject(colCa, KPlotObject::Lines, 1.0); | ||
124 | jpath = new KPlotObject(colJp, KPlotObject::Lines, 1.0); | 127 | jpath = new KPlotObject(colJp, KPlotObject::Lines, 1.0); | ||
125 | 128 | | |||
126 | QRectF dataRect = pw->dataRect(); | 129 | QRectF dataRect = pw->dataRect(); | ||
127 | double dy = 0.01 * dataRect.height(); | 130 | double dy = 0.01 * dataRect.height(); | ||
128 | 131 | | |||
132 | /*Debug | ||||
133 | //For testing position of each satellite | ||||
134 | for(double t = dataRect.y(); t <= dataRect.bottom(); t += 1){ | ||||
135 | KSNumbers num(jd0 + t); | ||||
136 | jm.findPosition(&num, jup, ksun); | ||||
137 | | ||||
138 | qDebug() << "Position [Io] : " << 0.5 * jup->angSize() * jm.x(0) << " at " << t << " arcmin"; | ||||
139 | qDebug() << "Position [Europa] : " << 0.5 * jup->angSize() * jm.x(1) << " at " << t << " arcmin"; | ||||
140 | qDebug() << "Position [Ganymede] : " << 0.5 * jup->angSize() * jm.x(2) << " at " << t << " arcmin"; | ||||
141 | qDebug() << "Position [Callisto] : " << 0.5 * jup->angSize() * jm.x(3) << " at " << t << " arcmin"; | ||||
142 | } | ||||
143 | */ | ||||
144 | | ||||
129 | //t is the offset from jd0, in days. | 145 | //t is the offset from jd0, in days. | ||
130 | for (double t = dataRect.y(); t <= dataRect.bottom(); t += dy) | 146 | for (double t = dataRect.y(); t <= dataRect.bottom(); t += dy) | ||
131 | { | 147 | { | ||
132 | KSNumbers num(jd0 + t); | 148 | KSNumbers num(jd0 + t); | ||
133 | jm.findPosition(&num, jup, ksun); | 149 | jm.findPosition(&num, jup, ksun); | ||
134 | 150 | | |||
135 | //jm.x(i) tells the offset from Jupiter, in units of Jupiter's angular radius. | 151 | //jm.x(i) tells the offset from Jupiter, in units of Jupiter's angular radius. | ||
136 | //multiply by 0.5*jup->angSize() to get arcminutes | 152 | //multiply by 0.5*jup->angSize() to get arcminutes | ||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |