Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b81f455
Inhibit landscape and atmosphere drawing when on an "observer" pseudo…
gzotti Jan 30, 2023
f59f3c2
Make Location.longitude/latitude private
gzotti Jan 30, 2023
1dfc584
Inhibit location name if observing from Observer pseudo-planet
gzotti Jan 30, 2023
8999d95
Inhibit drawing of a few grids/markers when on Observer pseudo-planet
gzotti Jan 30, 2023
31641aa
Safer (but slower) retrieval of longitude/latitude
gzotti Jan 30, 2023
be27760
New default observer location
gzotti Jan 31, 2023
fa7971b
Getting closer to the pole.
gzotti Jan 31, 2023
0dd7fc9
Fix compilation with GPSD use
gzotti Jan 31, 2023
78c3e98
Fix compilation
gzotti Jan 31, 2023
d051762
Fix compilation for tests
gzotti Jan 31, 2023
e1834a8
cosmetics
gzotti Jan 31, 2023
51958b3
Avoid searching planets in every frame
gzotti Feb 1, 2023
35762e4
disabled a few data entries for observers (may be removed later)
gzotti Feb 1, 2023
02d5096
SUG: Update doc on observers
gzotti Feb 1, 2023
03d37a2
Add decorative textures for the observer used in the location panel
gzotti Feb 3, 2023
834e9dc
Hide location panel UI elements when on observer pseudo-planet
gzotti Feb 4, 2023
bce3180
reconfigure distances
gzotti Feb 4, 2023
c5d0df6
Remember location coordinates stored previously
gzotti Feb 4, 2023
ae4f929
Better understandable comments
gzotti Feb 4, 2023
232278e
Also hide the frames around buttons.
gzotti Feb 4, 2023
3fa67f3
fixed other place where location name is printed in bottom bar
gzotti Feb 5, 2023
c69bd16
Fix return to default location (with default landscape)
gzotti Feb 5, 2023
6633b1d
Disabled an actually useless override
gzotti Feb 5, 2023
b8c3132
Replace a 1-line slot by lambda function
gzotti Feb 5, 2023
8d2ee99
Fix other initializer sequence
gzotti Feb 5, 2023
8608e92
Another fix for location name in GUI bottom bar
gzotti Feb 5, 2023
0fce32d
Restore UI hiding
gzotti Feb 5, 2023
9006a6a
Avoid loading planet's default landscape where it has to be avoided
gzotti Feb 5, 2023
79a529c
Fix location changes via Search panel and "Goto" Action
gzotti Feb 6, 2023
54e0293
Allow "goto" action to observers
gzotti Feb 6, 2023
fd1c7ea
Docfix
gzotti Feb 7, 2023
9254d42
Cleanup
gzotti Feb 7, 2023
26cd0f0
SUG updates
gzotti Feb 7, 2023
476973f
Cosmetics
gzotti Feb 7, 2023
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
66 changes: 21 additions & 45 deletions data/ssystem_major.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1950,13 +1950,10 @@ color=0., 0., 0.
halo=false
hidden=true
name=Earth Observer
orbit_Inclination=90
orbit_MeanLongitude=90
orbit_Period=100000000000
; 1AU to make earth orbit less distorted
orbit_SemiMajorAxis=149600000
tex_map=obs_earth.jpg
; 800000 km is about twice Lunar orbit size
orbit_SemiMajorAxis=800000
parent=Earth
rot_obliquity=0
type=observer

[mars_observer]
Expand All @@ -1965,13 +1962,10 @@ color = 0., 0., 0.
halo = false
hidden = true
name = Mars Observer
orbit_Inclination = 90
orbit_MeanLongitude = 90
orbit_Period = 70000000000
; set to 1.5AU: Average light time as seen from earth.
orbit_SemiMajorAxis = 224400000
tex_map=obs_mars.jpg
; 100000 km provides a good view of the moon orbits
orbit_SemiMajorAxis = 100000
parent = Mars
rot_obliquity=0
type = observer

[jupiter_observer]
Expand All @@ -1980,13 +1974,10 @@ color = 0., 0., 0.
halo = false
hidden = true
name = Jupiter Observer
orbit_Inclination = 90
orbit_MeanLongitude = 90
orbit_Period = 70000000000
; set to 5.2AU: Average light time as seen from earth.
orbit_SemiMajorAxis = 777920000
tex_map=obs_jupiter.jpg
; 75 M km is about 1/2 AU, good to see all moon orbits
orbit_SemiMajorAxis = 75000000
parent = Jupiter
rot_obliquity=0
type = observer

[saturn_observer]
Expand All @@ -1995,13 +1986,10 @@ color = 0., 0., 0.
halo = false
hidden = true
name = Saturn Observer
orbit_Inclination = 90
orbit_MeanLongitude = 90
orbit_Period = 70000000000
; set to 9.6AU: Average light time as seen from earth.
orbit_SemiMajorAxis = 1436160000
tex_map=obs_saturn.jpg
; 30 M km to see Phoebe's orbit
orbit_SemiMajorAxis = 30000000
parent = Saturn
rot_obliquity=0
type = observer

[uranus_observer]
Expand All @@ -2010,13 +1998,10 @@ color = 0., 0., 0.
halo = false
hidden = true
name = Uranus Observer
orbit_Inclination = 90
orbit_MeanLongitude = 90
orbit_Period = 70000000000
; set to 19.2AU: Average light time as seen from earth.
orbit_SemiMajorAxis = 2872320000
tex_map=obs_uranus.jpg
; 1 M km to see moons' orbits
orbit_SemiMajorAxis = 1000000
parent = Uranus
rot_obliquity=0
type = observer

[neptune_observer]
Expand All @@ -2025,29 +2010,20 @@ color = 0., 0., 0.
halo = false
hidden = true
name = Neptune Observer
orbit_Inclination = 90
orbit_MeanLongitude = 90
orbit_Period = 70000000000
; set to 19.2AU: Average light time as seen from earth.
orbit_SemiMajorAxis = 4498472000
tex_map=obs_neptune.jpg
; set to 1AU: Neptune has far-out moons!
orbit_SemiMajorAxis = 150000000
parent = Neptune
rot_obliquity=0
type = observer

[solar_system_observer]
albedo=0.
color=0., 0., 0.
; This is parented with the Sun! Therefore we should have comet_orbit, and semimajor axis in AU
; This is parented with the Sun! Therefore semimajor axis in AU
halo=false
hidden=true
name=Solar System Observer
orbit_Inclination=90
;orbit_MeanLongitude=90
orbit_MeanAnomaly=90
orbit_Epoch=2451545.0
orbit_Period=70000000000
;orbit_SemiMajorAxis=70 000 000 000
; place distance around Neptune distance...
tex_map=obs_sun.jpg
; place distance in 30AU, around Neptune distance.
orbit_SemiMajorAxis=30
rot_obliquity=0
type=observer
29 changes: 9 additions & 20 deletions guide/app_ssystem_ini.tex
Original file line number Diff line number Diff line change
Expand Up @@ -273,49 +273,38 @@ \subsubsection{Observers}
\label{sec:ssystem.ini:SolarSystemObserver}

The Solar System Observer has
been provided as a neutral view location high above the North pole of
the Solar System. It has been configured like this:
been provided in earlier versions as a neutral view location high above the North pole of
the Solar System. Meanwhile \newFeature{0.19.2} the location can be changed by keyboard interaction. See section \ref{sec:gui:location:observers}.
\begin{configfile}
[solar_system_observer]
name=Solar System Observer
parent=Sun
halo=false
hidden=true
coord_func=ell_orbit
orbit_Inclination=90
orbit_MeanLongitude=90
orbit_Period=70000000000
orbit_SemiMajorAxis=70000000000
rot_obliquity=90
orbit_SemiMajorAxis=30
type=observer
\end{configfile}
Note the inclination and mean longitude of 90 degrees, and that it is \texttt{hidden} and has no \texttt{halo}.
Note that it is \texttt{hidden} and has no \texttt{halo}.
The observer is attached to the Sun, therefore distance \texttt{orbit\_semiMajorAxis} is given in AU.

\paragraph{Planet Observers}
\label{sec:ssystem.ini:PlanetObserver}

There are other ``observer'' locations for all planets \newFeature{0.19.2} which have moons: Earth, Mars, Jupiter, Saturn, Uranus, and Neptune.
They have all been provided as neutral view locations above the Northern hemisphere of
the respective planet. For example:
For example:
\begin{configfile}
[earth_observer]
name=Earth Observer
parent=Earth
halo=false
hidden=true
coord_func=ell_orbit
orbit_Inclination=90
orbit_MeanLongitude=90
orbit_Period=100000000000
orbit_SemiMajorAxis=149600000
rot_obliquity=90
type=observer
\end{configfile}

The distance \texttt{orbit\_semiMajorAxis} has been configured with a
distance that resembles the semimajor axis of the respective planet:
when you want to compare the views from Earth and from the observer,
light time correction should be at least approximately equal.
The distance \texttt{orbit\_semiMajorAxis} has been preconfigured \newFeature{23.1} with a
distance that gives a good view of the planet with its moons.
Like for moons, the units are \km\ from the planet.

\subsection{File ssystem\_minor.ini}
\label{sec:ssystem.ini:minor}
Expand Down
15 changes: 14 additions & 1 deletion guide/ch_interface.tex
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,20 @@ \subsection{Geographical Regions}
of geographical regions. There is only one known habitable planet, one
humankind, and one sky. Stellarium users should overcome borders!

For ``region'' classification of sky cultures we use same regions (see \ref{sec:skycultures:region}) and we follow UN M49 geoscheme\footnote{https://unstats.un.org/unsd/methodology/m49/} with extensions for other planets.
For the ``region'' classification of sky cultures we use the same regions (see \ref{sec:skycultures:region}),
and we follow the UN~M49 geoscheme\footnote{https://unstats.un.org/unsd/methodology/m49/} with extensions for other planets.

\subsection{Observers}
\label{sec:gui:location:observers}

In the list of Planets you can find entries called \emph{Solar System Observer}, \emph{Jupiter Observer} and
similar for each major planet that has moons: Earth, Mars, Jupiter, Saturn, Uranus, and Neptune.
These are specialized locations. When switching to them, you will find yourself looking
onto the respective observed object (Sun, Jupiter, \ldots) from somewhat above the plane of the Solar system.
By pressing \key{\Alt+\arrowkeyleft}/\key{\Alt+\arrowkeyright} you can rotate around a vertical axis through the observed object.
Likewise, by pressing \key{\Alt+\arrowkeyup}/\key{\Alt+\arrowkeydown} you can change the latitude of observation. Finally,
with \key{\Alt+Home}/\key{\Alt+End} you can change the distance from the observed object.


\section{The Configuration Window}
\label{sec:gui:configuration}
Expand Down
6 changes: 3 additions & 3 deletions plugins/ArchaeoLines/src/ArchaeoLines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ void ArchaeoLines::update(double deltaTime)

static const double b_over_a=0.99664719;
const bool useGeocentric = !core->getUseTopocentricCoordinates();
const double latRad=useGeocentric ? 0.0 : static_cast<double>(loc.latitude)*M_PI_180;
const double latRad=useGeocentric ? 0.0 : static_cast<double>(loc.getLatitude())*M_PI_180;
const double u=std::atan(b_over_a*std::tan(latRad));
const double rhoSinPhiP=useGeocentric ? 0. : b_over_a*std::sin(u)+loc.altitude/6378140.0*std::sin(latRad);
const double rhoCosPhiP=useGeocentric ? 1. : std::cos(u)+loc.altitude/6378140.0*std::cos(latRad);
Expand Down Expand Up @@ -418,8 +418,8 @@ void ArchaeoLines::update(double deltaTime)
southernMajorStandstillLine6->setDefiningAngle(lunarDEtopo[6] *180.0/M_PI);
southernMajorStandstillLine7->setDefiningAngle(lunarDEtopo[7] *180.0/M_PI);

zenithPassageLine->setDefiningAngle(static_cast<double>(loc.latitude));
nadirPassageLine->setDefiningAngle(static_cast<double>(-loc.latitude));
zenithPassageLine->setDefiningAngle(static_cast<double>(loc.getLatitude()));
nadirPassageLine->setDefiningAngle(static_cast<double>(-loc.getLatitude()));

// Selected object?
if (objMgr->getWasSelected())
Expand Down
8 changes: 4 additions & 4 deletions plugins/ArchaeoLines/src/gui/ArchaeoLinesDialogLocations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ void ArchaeoLinesDialogLocations::setLocationFromList(const QModelIndex& index)
switch (modalContext)
{
case 1:
al->setGeographicLocation1Latitude(static_cast<double>(loc.latitude));
al->setGeographicLocation1Longitude(static_cast<double>(loc.longitude));
al->setGeographicLocation1Latitude(static_cast<double>(loc.getLatitude()));
al->setGeographicLocation1Longitude(static_cast<double>(loc.getLongitude()));
al->setGeographicLocation1Label(loc.name);
break;
case 2:
al->setGeographicLocation2Latitude(static_cast<double>(loc.latitude));
al->setGeographicLocation2Longitude(static_cast<double>(loc.longitude));
al->setGeographicLocation2Latitude(static_cast<double>(loc.getLatitude()));
al->setGeographicLocation2Longitude(static_cast<double>(loc.getLongitude()));
al->setGeographicLocation2Label(loc.name);
break;
default:
Expand Down
26 changes: 13 additions & 13 deletions plugins/Calendars/src/Calendar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,23 +152,23 @@ double Calendar::direction(const StelLocation &locFrom, const StelLocation &locT
// We could do that, but south azimuth may cause problems.
//return StelLocation::getAzimuthForLocation(static_cast<double>(loc1.longitude), static_cast<double>(loc1.latitude),
// static_cast<double>(loc2.longitude), static_cast<double>(loc2.latitude));
const double longObs = static_cast<double>(locFrom.longitude) * M_PI_180;
const double latObs = static_cast<double>(locFrom.latitude ) * M_PI_180;
const double longTarget = static_cast<double>(locTo.longitude) * M_PI_180;
const double latTarget = static_cast<double>(locTo.latitude ) * M_PI_180;
const double longObs = static_cast<double>(locFrom.getLongitude()) * M_PI_180;
const double latObs = static_cast<double>(locFrom.getLatitude() ) * M_PI_180;
const double longTarget = static_cast<double>(locTo.getLongitude()) * M_PI_180;
const double latTarget = static_cast<double>(locTo.getLatitude() ) * M_PI_180;

double az = atan2(sin(longTarget-longObs), cos(latObs)*tan(latTarget)-sin(latObs)*cos(longTarget-longObs));
return StelUtils::fmodpos(M_180_PI * az, 360.0);
}
double Calendar::universalFromLocal(double rd_loc, const StelLocation &loc)
{
//qDebug() << "universalFromLocal: Location " << loc.name << "longitude:" << loc.longitude;
return rd_loc-zoneFromLongitude(static_cast<double>(loc.longitude));
return rd_loc-zoneFromLongitude(static_cast<double>(loc.getLongitude()));
}
double Calendar::localFromUniversal(double rd_ut, const StelLocation &loc)
{
//qDebug() << "localFromUniversal: Location " << loc.name << "longitude:" << loc.longitude;
return rd_ut+zoneFromLongitude(static_cast<double>(loc.longitude));
return rd_ut+zoneFromLongitude(static_cast<double>(loc.getLongitude()));
}
double Calendar::standardFromUniversal(double rd_ut, const StelLocation &loc)
{
Expand Down Expand Up @@ -456,8 +456,8 @@ double Calendar::precession(double rd_dt)
// return altitude of the sun at loc, degrees
double Calendar::solarAltitude(double rd_ut, const StelLocation &loc)
{
const double phiRad=static_cast<double>(loc.latitude)*M_PI_180;
const double psi=static_cast<double>(loc.longitude);
const double phiRad=static_cast<double>(loc.getLatitude())*M_PI_180;
const double psi=static_cast<double>(loc.getLongitude());
const double lambda=solarLongitude(rd_ut);

static StelCore *core = StelApp::getInstance().getCore();
Expand Down Expand Up @@ -873,8 +873,8 @@ double Calendar::lunarPhaseAtOrAfter(double phi, double rd_ut)
// return altitude of the moon at loc, degrees (CC:UE 14:64)
double Calendar::lunarAltitude(double rd_ut, const StelLocation &loc)
{
double phiRad=static_cast<double>(loc.latitude)*M_PI_180;
double psi=static_cast<double>(loc.longitude);
double phiRad=static_cast<double>(loc.getLatitude())*M_PI_180;
double psi=static_cast<double>(loc.getLongitude());
double lambda=lunarLongitude(rd_ut);
double beta=lunarLatitude(rd_ut);

Expand Down Expand Up @@ -931,7 +931,7 @@ double Calendar::approxMomentOfDepression(double rd_loc, double alpha, bool earl
// return sine of ... (CC:UE 14.69)
double Calendar::sineOffset(double rd_loc, double alpha, const StelLocation &loc)
{
const double phiRad=static_cast<double>(loc.latitude)*M_PI_180;
const double phiRad=static_cast<double>(loc.getLatitude())*M_PI_180;
const double tP=universalFromLocal(rd_loc, loc);
const double deltaRad=M_PI_180*declination(tP, 0., solarLongitude(tP));
return tan(phiRad)*tan(deltaRad)+sin(alpha*M_PI_180)/(cos(deltaRad)*cos(phiRad));
Expand Down Expand Up @@ -992,7 +992,7 @@ double Calendar::moonrise(int rd, const StelLocation &loc)
const double t=universalFromStandard(rd, loc);
const bool waning=lunarPhase(t) > 180.;
const double alt=observedLunarAltitude(t, loc);
const double lat=static_cast<double>(loc.latitude);
const double lat=static_cast<double>(loc.getLatitude());
const double offset=alt/(4.*(90.-fabs(lat)));

static const QDateTime j2k(QDate(2000, 1, 1), QTime(0, 0, 0), Qt::UTC);
Expand Down Expand Up @@ -1036,7 +1036,7 @@ double Calendar::moonset(int rd, const StelLocation &loc)
const double t=universalFromStandard(rd, loc);
const bool waxing=lunarPhase(t) < 180.;
const double alt=observedLunarAltitude(t, loc);
const double lat=static_cast<double>(loc.latitude);
const double lat=static_cast<double>(loc.getLatitude());
const double offset=alt/(4.*(90.-fabs(lat)));
double approx = t + 0.5 - offset;
if (waxing)
Expand Down
6 changes: 3 additions & 3 deletions plugins/Calendars/src/NewHinduCalendar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ int NewHinduCalendar::hinduCalendarYear(const double rd_ut)
double NewHinduCalendar::hinduAscensionalDifference(const int rd, const StelLocation &loc)
{
const double sinD=(1397./3438.)*hinduSine(hinduTropicalLongitude(rd));
const double phi=static_cast<double>(loc.latitude);
const double phi=static_cast<double>(loc.getLatitude());
const double diurnalRadius=hinduSine(90.+hinduArcsin(sinD));
const double tanPhi=hinduSine(phi)/hinduSine(90.+phi);
const double earthSine=sinD*tanPhi;
Expand Down Expand Up @@ -402,15 +402,15 @@ double NewHinduCalendar::hinduEquationOfTime(const double rd_ut)
// return hindu time of sunrise (CC:UE 20.33)
double NewHinduCalendar::hinduSunrise(const int rd)
{
return rd+0.25+static_cast<double>(ujjain.longitude-hinduLocation.longitude)/360.-hinduEquationOfTime(rd)
return rd+0.25+static_cast<double>(ujjain.getLongitude()-hinduLocation.getLongitude())/360.-hinduEquationOfTime(rd)
+ (1577917828./(1582237828.*360.))*(hinduAscensionalDifference(rd, hinduLocation)+0.25*hinduSolarSiderealDifference(rd));
}

// 20.4 Alternatives
// return hindu time of sunset (CC:UE 20.34)
double NewHinduCalendar::hinduSunset(const int rd)
{
return rd+0.75+static_cast<double>(ujjain.longitude-hinduLocation.longitude)/360.-hinduEquationOfTime(rd)
return rd+0.75+static_cast<double>(ujjain.getLongitude()-hinduLocation.getLongitude())/360.-hinduEquationOfTime(rd)
+ (1577917828./(1582237828.*360.))*(0.75*hinduSolarSiderealDifference(rd) - hinduAscensionalDifference(rd, hinduLocation));
}
// return hindu time (CC:UE 20.35)
Expand Down
4 changes: 2 additions & 2 deletions plugins/NavStars/src/NavStars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,8 @@ void NavStars::extraInfo(StelCore* core, const StelObjectP& selectedObject)

NavStarsCalculator calc;
calc.setUTC(StelUtils::julianDayToISO8601String(jd))
.setLatDeg(core->getCurrentLocation().latitude)
.setLonDeg(core->getCurrentLocation().longitude)
.setLatDeg(core->getCurrentLocation().getLatitude())
.setLonDeg(core->getCurrentLocation().getLongitude())
.setJd(jd)
.setJde(jde)
.setGmst(get_mean_sidereal_time(jd, jde));
Expand Down
4 changes: 2 additions & 2 deletions plugins/Observability/src/Observability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1624,8 +1624,8 @@ void Observability::onLocationChanged(const StelLocation & location)
{
qDebug() << "[Observability] Location updated.";

mylat = static_cast<double>(location.latitude)/Rad2Deg;
mylon = static_cast<double>(location.longitude)/Rad2Deg;
mylat = static_cast<double>(location.getLatitude())/Rad2Deg;
mylon = static_cast<double>(location.getLongitude())/Rad2Deg;
double currheight = (6371. + (location.altitude) / 1000.) / UA;

double temp1 = currheight * std::cos(mylat);
Expand Down
10 changes: 5 additions & 5 deletions plugins/RemoteControl/src/LocationService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,15 @@ void LocationService::post(const QByteArray& operation, const APIParameters &par
bool doneSomething = false;
bool ok = false;
float latitude = sLatitude.toFloat(&ok);
if(ok && (latitude - loc.latitude) != 0.0f)
if(ok && (latitude - loc.getLatitude()) != 0.0f)
{
loc.latitude = latitude;
loc.setLatitude(latitude);
doneSomething = true;
}
float longitude = sLongitude.toFloat(&ok);
if(ok && (longitude - loc.longitude) != 0.0f)
if(ok && (longitude - loc.getLongitude()) != 0.0f)
{
loc.longitude = longitude;
loc.setLongitude(longitude);
doneSomething = true;
}
int altitude = sAltitude.toInt(&ok);
Expand All @@ -194,7 +194,7 @@ void LocationService::post(const QByteArray& operation, const APIParameters &par
}
else if (!parameters.contains("name"))
{
loc.name=QString("%1, %2").arg(loc.latitude).arg(loc.longitude); // Force a preliminary name
loc.name=QString("%1, %2").arg(loc.getLatitude()).arg(loc.getLongitude()); // Force a preliminary name
}
if(!region.isEmpty() && region != loc.region)
{
Expand Down
Loading