Merge lp:~stellarium/stellarium/0.12.1 into lp:stellarium

Proposed by Alexander Wolf
Status: Merged
Approved by: Alexander Wolf
Approved revision: 5762
Merged at revision: 5787
Proposed branch: lp:~stellarium/stellarium/0.12.1
Merge into: lp:stellarium
Diff against target: 92 lines (+37/-1)
5 files modified
CMakeLists.txt (+1/-1)
src/core/StelCore.cpp (+10/-0)
src/core/StelCore.hpp (+5/-0)
src/scripting/StelMainScriptAPI.cpp (+14/-0)
src/scripting/StelMainScriptAPI.hpp (+7/-0)
To merge this branch: bzr merge lp:~stellarium/stellarium/0.12.1
Reviewer Review Type Date Requested Status
Alexander Wolf Approve
Review via email: mp+145838@code.launchpad.net

Description of the change

Changes to version 0.12.1

To post a comment you must log in.
Revision history for this message
Alexander Wolf (alexwolf) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-01-31 11:23:10 +0000
3+++ CMakeLists.txt 2013-01-31 13:16:30 +0000
4@@ -12,7 +12,7 @@
5 PROJECT(Stellarium)
6 SET(STELLARIUM_MAJOR "0")
7 SET(STELLARIUM_MINOR "12")
8-SET(STELLARIUM_PATCH "0")
9+SET(STELLARIUM_PATCH "1")
10 SET(VERSION "${STELLARIUM_MAJOR}.${STELLARIUM_MINOR}.${STELLARIUM_PATCH}")
11 SET(PACKAGE stellarium)
12
13
14=== modified file 'src/core/StelCore.cpp'
15--- src/core/StelCore.cpp 2013-01-04 17:32:22 +0000
16+++ src/core/StelCore.cpp 2013-01-31 13:16:30 +0000
17@@ -746,6 +746,16 @@
18 return JDay;
19 }
20
21+void StelCore::setMJDay(double MJD)
22+{
23+ JDay=MJD+2400000.5;
24+}
25+
26+double StelCore::getMJDay() const
27+{
28+ return JDay-2400000.5;
29+}
30+
31 double StelCore::getPresetSkyTime() const
32 {
33 return presetSkyTime;
34
35=== modified file 'src/core/StelCore.hpp'
36--- src/core/StelCore.hpp 2013-01-04 17:17:17 +0000
37+++ src/core/StelCore.hpp 2013-01-31 13:16:30 +0000
38@@ -278,6 +278,11 @@
39 //! Get the current date in Julian Day
40 double getJDay() const;
41
42+ //! Set the current date in Modified Julian Day
43+ void setMJDay(double MJD);
44+ //! Get the current date in Modified Julian Day
45+ double getMJDay() const;
46+
47 //! Return the preset sky time in JD
48 double getPresetSkyTime() const;
49 //! Set the preset sky time from a JD
50
51=== modified file 'src/scripting/StelMainScriptAPI.cpp'
52--- src/scripting/StelMainScriptAPI.cpp 2013-01-30 15:07:13 +0000
53+++ src/scripting/StelMainScriptAPI.cpp 2013-01-31 13:16:30 +0000
54@@ -117,6 +117,20 @@
55 return StelApp::getInstance().getCore()->getJDay();
56 }
57
58+//! Set the current date in Modified Julian Day
59+//! @param MJD the Modified Julian Date
60+void StelMainScriptAPI::setMJDay(double MJD)
61+{
62+ StelApp::getInstance().getCore()->setMJDay(MJD);
63+}
64+
65+//! Get the current date in Modified Julian Day
66+//! @return the Modified Julian Date
67+double StelMainScriptAPI::getMJDay() const
68+{
69+ return StelApp::getInstance().getCore()->getMJDay();
70+}
71+
72 void StelMainScriptAPI::setDate(const QString& dt, const QString& spec)
73 {
74 StelApp::getInstance().getCore()->setJDay(jdFromDateString(dt, spec));
75
76=== modified file 'src/scripting/StelMainScriptAPI.hpp'
77--- src/scripting/StelMainScriptAPI.hpp 2013-01-30 15:07:13 +0000
78+++ src/scripting/StelMainScriptAPI.hpp 2013-01-31 13:16:30 +0000
79@@ -51,6 +51,13 @@
80 //! @return the Julian Date
81 double getJDay() const;
82
83+ //! Set the current date in Modified Julian Day
84+ //! @param MJD the Modified Julian Date
85+ void setMJDay(double MJD);
86+ //! Get the current date in Modified Julian Day
87+ //! @return the Modified Julian Date
88+ double getMJDay() const;
89+
90 //! set the date in ISO format, e.g. "2008-03-24T13:21:01"
91 //! @param dt the date string to use. Formats:
92 //! - ISO, e.g. "2008-03-24T13:21:01"