Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions guide/ch_astronomical_concepts.tex
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ \subsection{Ecliptical Coordinates}

The Earth's orbit around the Sun, i.e., the \indexterm{ecliptic},
defines the ``equatorial line'' of this coordinate system, which is traditionally used when computing the coordinates for planets because of their close proximity to this line.
Mirroring Earth's motion, the Sun is seen to move along the ecliptic.

The zero point of \indexterm{ecliptical longitude} $\lambda$ is the
same as for equatorial coordinates (\Aries), and the \indexterm{ecliptical
Expand All @@ -286,11 +287,12 @@ \subsection{Ecliptical Coordinates}
In addition, \indexterm[obliquity, ecliptic]{ecliptic obliquity} against the equatorial coordinates,
which mirrors the Earth's axial tilt, slowly changes.

Therefore, also for ecliptical coordinates is is required to specify
Therefore, also for ecliptical coordinates it is required to specify
which date (epoch) the coordinates refer to. Stellarium can draw grids
for two epochs. Use the \key{,} key to draw the \indexterm{ecliptic}
for the simulation time. The Markings dialog
(\ref{sec:gui:view:markings}) allows you to also show a line for epoch
(\ref{sec:gui:view:markings}) allows you to add date marks to the ecliptic
line \newFeature{23.1} and also show a line for epoch
J2000.0 and grids for the ecliptical coordinates for current epoch and
epoch J2000.0. You can assign your own shortcut keys
(section~\ref{sec:gui:help:hotkeys}) if you frequently operate with
Expand All @@ -309,7 +311,7 @@ \subsection{Ecliptical Coordinates}
ecliptic \indexterm[obliquity, ecliptic]{obliquity}. The real track of where Earth's axis is pointing forms an open helical loop.

The inner planets are best observed when their apparent distance from
the Sun, or \indexterm{elongation} reaches a maximum. Unfortunately
the Sun, or \indexterm{elongation}, reaches a maximum. Unfortunately
there are two definitions for elongation, though:
\begin{description}
\item[$\psi$] angular distance on the sphere. This is today the most widely used definition.
Expand Down
8 changes: 4 additions & 4 deletions guide/ch_interface.tex
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ \subsection{The Solar System Objects (SSO) Tab}
\end{figure}

\begin{figure}[p]
\centering\includegraphics[width=0.75\textwidth]{view_dialog_markings_tab.png}
\centering\includegraphics[width=0.75\textwidth]{view_dialog_markings_tab.jpg}
\caption{View Settings Window: Markings Tab}
\label{fig:gui:view:markings}
\end{figure}
Expand Down Expand Up @@ -732,13 +732,13 @@ \subsection{The Markings Tab}
\label{sec:gui:view:markings}

\noindent The Markings tab of the View window
(Fig.~\ref{fig:gui:view:markings}) controls plot various grids and
lines on celestial sphere. Colors for grids, lines and points can be
(Fig.~\ref{fig:gui:view:markings}) controls plotting various grids and
lines on the celestial sphere. Colors for grids, lines and points can be
adjusted by clicking on the corresponding colored square. The central
column governs lines like equator, ecliptic, meridian etc., where each
can optionally be fine-tuned to \newFeature{0.20.0} show partition
marks and labels. Color settings are stored immediately, all other
flags need an explicit saving of the settings (see section
flags need explicit saving of the settings (see section
\ref{sec:gui:configuration:main}).

\subsection{The Landscape Tab}
Expand Down
Binary file added guide/pictures/view_dialog_markings_tab.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed guide/pictures/view_dialog_markings_tab.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src/core/StelCore.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ public slots:
//! This signal is emitted when the date has changed for a month.
void dateChangedForMonth();
//! This signal is emitted when the date has changed by one year.
void dateChangedByYear();
void dateChangedByYear(const int year);
//! This signal indicates a horizontal display flip
void flipHorzChanged(bool b);
//! This signal indicates a vertical display flip
Expand Down
5 changes: 3 additions & 2 deletions src/core/StelMovementMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,11 +537,12 @@ void StelMovementMgr::handleMouseWheel(QWheelEvent* event)
double jdNow=core->getJD();
int year, month, day, hour, min, sec, millis;
StelUtils::getDateTimeFromJulianDay(jdNow, &year, &month, &day, &hour, &min, &sec, &millis);
year+=qRound(numSteps);
double jdNew;
StelUtils::getJDFromDate(&jdNew, year+qRound(numSteps), month, day, hour, min, static_cast<float>(sec));
StelUtils::getJDFromDate(&jdNew, year, month, day, hour, min, static_cast<float>(sec));
core->setJD(jdNew);
emit core->dateChanged();
emit core->dateChangedByYear();
emit core->dateChangedByYear(year);
}
else if (event->modifiers() & Qt::AltModifier)
{
Expand Down
13 changes: 12 additions & 1 deletion src/core/StelUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1147,10 +1147,21 @@ bool isLeapYear(const int year)
// Meeus, AA 2nd, 1998, ch.7 p.65
int dayInYear(const int year, const int month, const int day)
{
int k=(isLeapYear(year) ? 1:2);
const int k=(isLeapYear(year) ? 1:2);
return static_cast<int>(275*month/9) - k*static_cast<int>((month+9)/12) + day -30;
}

// Find date from day number within year and the year.
// Meeus, AA 2nd, 1998, ch.7 p.66
Vec3i dateFromDayYear(const int day, const int year)
{
const int k=(isLeapYear(year) ? 1:2);
int month = day<32 ? 1 : static_cast<int>(9.f*(k+day)/275.f+0.98f);

int monthDay = day - static_cast<int>(275.f*month/9.f) + k*static_cast<int>((month+9)/12.f) + 30;
return {year, month, monthDay};
}

// Return a fractional year like YYYY.ddddd. For negative years, the year number is of course decrease. E.g. -500.5 occurs in -501.
double yearFraction(const int year, const int month, const double day)
{
Expand Down
4 changes: 4 additions & 0 deletions src/core/StelUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,10 @@ namespace StelUtils
//! Find day number for date in year.
//! Meeus, Astronomical Algorithms 2nd ed., 1998, ch.7, p.65
int dayInYear(const int year, const int month, const int day);
//! Find date from day number within year and the year.
//! Meeus, AA 2nd, 1998, ch.7 p.66
//! @returns Vec3i(year, month, day)
Vec3i dateFromDayYear(const int day, const int year);
//! Return a fractional year like YYYY.ddddd. For negative years, the year number is decreased. E.g. -500.5 occurs in -501.
double yearFraction(const int year, const int month, const double day);

Expand Down
Loading