Planet.hpp   Planet.hpp 
skipping to change at line 94 skipping to change at line 94
enum PlanetType enum PlanetType
{ {
isStar, // ssystem.ini: type="star" isStar, // ssystem.ini: type="star"
isPlanet, // ssystem.ini: type="planet" isPlanet, // ssystem.ini: type="planet"
isMoon, // ssystem.ini: type="moon" isMoon, // ssystem.ini: type="moon"
isAsteroid, // ssystem.ini: type="asteroid" isAsteroid, // ssystem.ini: type="asteroid"
isPlutino, // ssystem.ini: type="plutino" isPlutino, // ssystem.ini: type="plutino"
isComet, // ssystem.ini: type="comet" isComet, // ssystem.ini: type="comet"
isDwarfPlanet, // ssystem.ini: type="dwarf planet" isDwarfPlanet, // ssystem.ini: type="dwarf planet"
isCubewano, // ssystem.ini: type="cubewano" isCubewano, // ssystem.ini: type="cubewano"
isSDO, // ssystem.ini: type="sdo" isSDO, // ssystem.ini: type="scattered disc object"
isOCO, // ssystem.ini: type="oco" isOCO, // ssystem.ini: type="oco"
isSednoid, // ssystem.ini: type="sednoid"
isUNDEFINED // ssystem.ini: type=<anything else> isUNDEFINED // ssystem.ini: type=<anything else>
}; };
enum PlanetOrbitColorStyle enum PlanetOrbitColorStyle
{ {
ocsOneColor, // One color for all orbits ocsOneColor, // One color for all orbits
ocsGroups, // Separate colors for each group of Solar system bodies ocsGroups, // Separate colors for each group of Solar system bodies
ocsMajorPlanets // Separate colors for each of major planets of Solar system ocsMajorPlanets // Separate colors for each of major planets of Solar system
}; };
enum ApparentMagnitudeAlgorithm /* enum ApparentMagnitudeAlgorithm
{ {
Planesas, // Algorithm provided by Pere Planes as (Observatorio Astronomico Nacional) Planesas, // Algorithm provided by Pere Planes as (Observatorio Astronomico Nacional)
Mueller, // G. Mueller, based on visual obser vations 1877-91. [Expl.Suppl.1961] Mueller, // G. Mueller, based on visual obser vations 1877-91. [Expl.Suppl.1961]
Harris, // Astronomical Almanac 1984 and lat er. These give V (instrumental) magnitudes (D.L. Harris) Harris, // Astronomical Almanac 1984 and lat er. These give V (instrumental) magnitudes (D.L. Harris)
UndefinedAlgorithm, UndefinedAlgorithm,
Generic // Visual magnitude based on phase a ngle and albedo Generic // Visual magnitude based on phase a ngle and albedo
}; };
*/
enum ApparentMagnitudeAlgorithm
{
Mueller_1893, // G. Mueller, based on visual observations
1877-91. [Expl.Suppl.1961]
Astr_Alm_1984, // Astronomical Almanac 1984 and later. Thes
e give V (instrumental) magnitudes (allegedly from D.L. Harris, but this is
wrong!)
Expl_Sup_1992, // Algorithm provided by Pere Planesas (Obse
rvatorio Astronomico Nacional) (Was called "Planesas")
Expl_Sup_2013, // Explanatory Supplement to the Astronomica
l Almanac, 3rd edition 2013
// Planesas, // Algorithm provided by Pere Planes
as (Observatorio Astronomico Nacional)
// Mueller, // G. Mueller, based on visual obser
vations 1877-91. [Expl.Suppl.1961]
// Harris, // Astronomical Almanac 1984 and lat
er. These give V (instrumental) magnitudes (D.L. Harris)
UndefinedAlgorithm,
Generic // Visual magnitude based on phase angle and
albedo. The formula source for this is totally unknown!
};
Planet(const QString& englishName, Planet(const QString& englishName,
int flagLighting, int flagLighting,
double radius, double radius,
double oblateness, double oblateness,
Vec3f halocolor, Vec3f halocolor,
float albedo, float albedo,
const QString& texMapName, const QString& texMapName,
const QString& normalMapName, const QString& normalMapName,
posFuncType _coordFunc, posFuncType _coordFunc,
skipping to change at line 154 skipping to change at line 168
//! - RaDec //! - RaDec
//! - AltAzi //! - AltAzi
//! - Distance //! - Distance
//! - Size //! - Size
//! - PlainText //! - PlainText
//! - Extra: Heliocentric Ecliptical Coordinates & Observer-planetoc entric Ecliptical Coordinates, Phase, illumination, phase angle & elongatio n from the Sun //! - Extra: Heliocentric Ecliptical Coordinates & Observer-planetoc entric Ecliptical Coordinates, Phase, illumination, phase angle & elongatio n from the Sun
//! @param core the StelCore object //! @param core the StelCore object
//! @param flags a set of InfoStringGroup items to include in the re turn value. //! @param flags a set of InfoStringGroup items to include in the re turn value.
//! @return a QString containing an HMTL encoded description of the Planet. //! @return a QString containing an HMTL encoded description of the Planet.
virtual QString getInfoString(const StelCore *core, const InfoString Group& flags) const; virtual QString getInfoString(const StelCore *core, const InfoString Group& flags) const;
//! In addition to the entries from StelObject::getInfoMap(), Planet
objects provide
//! - distance
//! - phase (result of getPhase)
//! - illumination (=100*phase)
//! - phase-angle
//! - phase-angle-dms (formatted string)
//! - phase-angle-deg (formatted string)
//! - elongation
//! - elongation-dms (formatted string)
//! - elongation-deg (formatted string)
//! - type (object type description)
virtual QVariantMap getInfoMap(const StelCore *core) const;
virtual double getCloseViewFov(const StelCore* core) const; virtual double getCloseViewFov(const StelCore* core) const;
virtual double getSatellitesFov(const StelCore* core) const; virtual double getSatellitesFov(const StelCore* core) const;
virtual double getParentSatellitesFov(const StelCore* core) const; virtual double getParentSatellitesFov(const StelCore* core) const;
virtual float getVMagnitude(const StelCore* core) const; virtual float getVMagnitude(const StelCore* core) const;
virtual float getSelectPriority(const StelCore* core) const; virtual float getSelectPriority(const StelCore* core) const;
virtual Vec3f getInfoColor(void) const; virtual Vec3f getInfoColor(void) const;
virtual QString getType(void) const {return "Planet";} virtual QString getType(void) const {return "Planet";}
virtual Vec3d getJ2000EquatorialPos(const StelCore *core) const; virtual Vec3d getJ2000EquatorialPos(const StelCore *core) const;
virtual QString getEnglishName(void) const; virtual QString getEnglishName(void) const;
virtual QString getNameI18n(void) const; virtual QString getNameI18n(void) const;
skipping to change at line 192 skipping to change at line 218
double getRadius(void) const {return radius;} double getRadius(void) const {return radius;}
//! Get the value (1-f) for oblateness f. //! Get the value (1-f) for oblateness f.
double getOneMinusOblateness(void) const {return oneMinusOblateness; } double getOneMinusOblateness(void) const {return oneMinusOblateness; }
//! Get duration of sidereal day //! Get duration of sidereal day
double getSiderealDay(void) const {return re.period;} double getSiderealDay(void) const {return re.period;}
//! Get duration of sidereal year //! Get duration of sidereal year
// must be virtual for Comets. // must be virtual for Comets.
virtual double getSiderealPeriod(void) const { return re.siderealPer iod; } virtual double getSiderealPeriod(void) const { return re.siderealPer iod; }
//! Get duration of mean solar day //! Get duration of mean solar day
double getMeanSolarDay(void) const; double getMeanSolarDay(void) const;
//! Get albedo
double getAlbedo(void) const { return albedo; }
const QString& getTextMapName() const {return texMapName;} const QString& getTextMapName() const {return texMapName;}
const QString getPlanetTypeString() const {return pTypeMap.value(pTy pe);} const QString getPlanetTypeString() const {return pTypeMap.value(pTy pe);}
PlanetType getPlanetType() const {return pType;} PlanetType getPlanetType() const {return pType;}
void setNativeName(QString planet) { nativeName = planet; } void setNativeName(QString planet) { nativeName = planet; }
//! Return the absolute magnitude (read from file ssystem.ini)
float getAbsoluteMagnitude() const {return absoluteMagnitude;}
//! Return the mean opposition magnitude, defined as V(1,0)+5log10(a
(a-1))
//! A return value of 100 signals invalid result.
float getMeanOppositionMagnitude() const;
ApparentMagnitudeAlgorithm getApparentMagnitudeAlgorithm() const { r eturn vMagAlgorithm; } ApparentMagnitudeAlgorithm getApparentMagnitudeAlgorithm() const { r eturn vMagAlgorithm; }
const QString getApparentMagnitudeAlgorithmString() const { return v MagAlgorithmMap.value(vMagAlgorithm); } const QString getApparentMagnitudeAlgorithmString() const { return v MagAlgorithmMap.value(vMagAlgorithm); }
void setApparentMagnitudeAlgorithm(QString algorithm); void setApparentMagnitudeAlgorithm(QString algorithm);
//! Compute the z rotation to use from equatorial to geographic coor dinates. For general applicability we need both time flavours: //! Compute the z rotation to use from equatorial to geographic coor dinates. For general applicability we need both time flavours:
//! @param JD is JD(UT) for Earth //! @param JD is JD(UT) for Earth
//! @param JDE is used for other locations //! @param JDE is used for other locations
double getSiderealTime(double JD, double JDE) const; double getSiderealTime(double JD, double JDE) const;
Mat4d getRotEquatorialToVsop87(void) const; Mat4d getRotEquatorialToVsop87(void) const;
void setRotEquatorialToVsop87(const Mat4d &m); void setRotEquatorialToVsop87(const Mat4d &m);
const RotationElements &getRotationElements(void) const {return re;} const RotationElements &getRotationElements(void) const {return re;}
// Set the orbital elements
void setRotationElements(float _period, float _offset, double _epoch
,
float _obliquity, float _ascendingNode,
float _precessionRate, double _siderealPeri
od);
double getRotAscendingnode(void) const {return re.ascendingNode;}
// return angle between axis and normal of ecliptic plane (or, for a
moon, equatorial/reference plane defined by parent).
// TODO: decide if this is always angle between axis and J2000 eclip
tic, or should be axis//current ecliptic!
double getRotObliquity(double JDE) const;
// Compute the position in the parent Planet coordinate system //! Compute the position in the parent Planet coordinate system
void computePositionWithoutOrbits(const double dateJDE); void computePositionWithoutOrbits(const double dateJDE);
void computePosition(const double dateJDE); void computePosition(const double dateJDE);
// Compute the transformation matrix from the local Planet coordinat //! Compute the transformation matrix from the local Planet coordina
e to the parent Planet coordinate. te to the parent Planet coordinate.
// This requires both flavours of JD in cases involving Earth. //! This requires both flavours of JD in cases involving Earth.
void computeTransMatrix(double JD, double JDE); void computeTransMatrix(double JD, double JDE);
// Get the phase angle (rad) for an observer at pos obsPos in helioc entric coordinates (in AU) //! Get the phase angle (rad) for an observer at pos obsPos in helio centric coordinates (in AU)
double getPhaseAngle(const Vec3d& obsPos) const; double getPhaseAngle(const Vec3d& obsPos) const;
// Get the elongation angle (rad) for an observer at pos obsPos in h eliocentric coordinates (in AU) //! Get the elongation angle (rad) for an observer at pos obsPos in heliocentric coordinates (in AU)
double getElongation(const Vec3d& obsPos) const; double getElongation(const Vec3d& obsPos) const;
// Get the angular size of the spheroid of the planet (i.e. without the rings) //! Get the angular size of the spheroid of the planet (i.e. without the rings)
double getSpheroidAngularSize(const StelCore* core) const; double getSpheroidAngularSize(const StelCore* core) const;
// Get the planet phase for an observer at pos obsPos in heliocentri c coordinates (in AU) //! Get the planet phase for an observer at pos obsPos in heliocentr ic coordinates (in AU)
float getPhase(const Vec3d& obsPos) const; float getPhase(const Vec3d& obsPos) const;
// Set the orbital elements
void setRotationElements(float _period, float _offset, double _epoch
,
float _obliquity, float _ascendingNode,
float _precessionRate, double _siderealPeri
od);
double getRotAscendingnode(void) const {return re.ascendingNode;}
// return angle between axis and normal of ecliptic plane (or, for a
moon, equatorial/reference plane defined by parent).
// TODO: decide if this is always angle between axis and J2000 eclip
tic, or should be axis//current ecliptic!
double getRotObliquity(double JDE) const;
//! Get the Planet position in the parent Planet ecliptic coordinate in AU //! Get the Planet position in the parent Planet ecliptic coordinate in AU
Vec3d getEclipticPos() const; Vec3d getEclipticPos() const;
// Return the heliocentric ecliptical position // Return the heliocentric ecliptical position
Vec3d getHeliocentricEclipticPos() const {return getHeliocentricPos( eclipticPos);} Vec3d getHeliocentricEclipticPos() const {return getHeliocentricPos( eclipticPos);}
// Return the heliocentric transformation for local coordinate // Return the heliocentric transformation for local coordinate
Vec3d getHeliocentricPos(Vec3d) const; Vec3d getHeliocentricPos(Vec3d) const;
void setHeliocentricEclipticPos(const Vec3d &pos); void setHeliocentricEclipticPos(const Vec3d &pos);
skipping to change at line 338 skipping to change at line 370
static const Vec3f& getScatteredDiscObjectOrbitColor() {return orbit ScatteredDiscObjectsColor;} static const Vec3f& getScatteredDiscObjectOrbitColor() {return orbit ScatteredDiscObjectsColor;}
static Vec3f orbitOortCloudObjectsColor; static Vec3f orbitOortCloudObjectsColor;
static void setOortCloudObjectOrbitColor(const Vec3f& oc) { orbitOor tCloudObjectsColor = oc;} static void setOortCloudObjectOrbitColor(const Vec3f& oc) { orbitOor tCloudObjectsColor = oc;}
static const Vec3f& getOortCloudObjectOrbitColor() {return orbitOort CloudObjectsColor;} static const Vec3f& getOortCloudObjectOrbitColor() {return orbitOort CloudObjectsColor;}
static Vec3f orbitCometsColor; static Vec3f orbitCometsColor;
static void setCometOrbitColor(const Vec3f& oc) { orbitCometsColor = oc;} static void setCometOrbitColor(const Vec3f& oc) { orbitCometsColor = oc;}
static const Vec3f& getCometOrbitColor() {return orbitCometsColor;} static const Vec3f& getCometOrbitColor() {return orbitCometsColor;}
static Vec3f orbitSednoidsColor;
static void setSednoidOrbitColor(const Vec3f& oc) { orbitSednoidsCol
or = oc;}
static const Vec3f& getSednoidOrbitColor() {return orbitSednoidsColo
r;}
static Vec3f orbitMercuryColor; static Vec3f orbitMercuryColor;
static void setMercuryOrbitColor(const Vec3f& oc) { orbitMercuryColo r = oc;} static void setMercuryOrbitColor(const Vec3f& oc) { orbitMercuryColo r = oc;}
static const Vec3f& getMercuryOrbitColor() {return orbitMercuryColor ;} static const Vec3f& getMercuryOrbitColor() {return orbitMercuryColor ;}
static Vec3f orbitVenusColor; static Vec3f orbitVenusColor;
static void setVenusOrbitColor(const Vec3f& oc) { orbitVenusColor = oc;} static void setVenusOrbitColor(const Vec3f& oc) { orbitVenusColor = oc;}
static const Vec3f& getVenusOrbitColor() {return orbitVenusColor;} static const Vec3f& getVenusOrbitColor() {return orbitVenusColor;}
static Vec3f orbitEarthColor; static Vec3f orbitEarthColor;
static void setEarthOrbitColor(const Vec3f& oc) { orbitEarthColor = oc;} static void setEarthOrbitColor(const Vec3f& oc) { orbitEarthColor = oc;}
skipping to change at line 411 skipping to change at line 447
RotationElements re; // Rotation param RotationElements re; // Rotation param
double radius; // Planet radius in AU double radius; // Planet radius in AU
double oneMinusOblateness; // (polar radius)/(equatorial radiu s) double oneMinusOblateness; // (polar radius)/(equatorial radiu s)
Vec3d eclipticPos; // Position in AU in the rectangula r ecliptic coordinate system Vec3d eclipticPos; // Position in AU in the rectangula r ecliptic coordinate system
// centered on the parent Planet // centered on the parent Planet
Vec3d screenPos; // Used to store temporarily the 2D position on screen Vec3d screenPos; // Used to store temporarily the 2D position on screen
Vec3d previousScreenPos; // The position of this planet in t he previous frame. Vec3d previousScreenPos; // The position of this planet in t he previous frame.
Vec3f haloColor; // exclusively used for drawing the planet halo Vec3f haloColor; // exclusively used for drawing the planet halo
float albedo; // Planet albedo. Used for magnitud e computation (but formula dubious!) float albedo; // Planet albedo. Used for magnitud e computation (but formula dubious!)
float absoluteMagnitude; // since 2017: V(1,0) from Explanat
ory Supplement or WGCCRE2009 paper for the planets, H in the H,G magnitude
system for Minor planets, H10 for comets.
// This is the apparent visual magn
itude when 1AU from sun and observer, with zero phase angle.
Mat4d rotLocalToParent; // GZ2015: was undocumented. Mat4d rotLocalToParent; // GZ2015: was undocumented.
// Apparently this is the axis orie ntation with respect to the parent body. For planets, this is axis orientat ion w.r.t. VSOP87A/J2000 ecliptical system. // Apparently this is the axis orie ntation with respect to the parent body. For planets, this is axis orientat ion w.r.t. VSOP87A/J2000 ecliptical system.
float axisRotation; // Rotation angle of the Planet on its axis. float axisRotation; // Rotation angle of the Planet on its axis.
// For Earth, this should be Greenw ich Mean Sidereal Time GMST. // For Earth, this should be Greenw ich Mean Sidereal Time GMST.
StelTextureSP texMap; // Planet map texture StelTextureSP texMap; // Planet map texture
StelTextureSP normalMap; // Planet normal map texture StelTextureSP normalMap; // Planet normal map texture
Ring* rings; // Planet rings Ring* rings; // Planet rings
double distance; // Temporary variable used to store the distance to a given point double distance; // Temporary variable used to store the distance to a given point
// it is used for sorting while dra wing // it is used for sorting while dra wing
 End of changes. 17 change blocks. 
23 lines changed or deleted 77 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/