MinorPlanet.cpp   MinorPlanet.cpp 
skipping to change at line 64 skipping to change at line 64
albedo, albedo,
atexMapName, atexMapName,
"", "",
coordFunc, coordFunc,
auserDataPtr, auserDataPtr,
osculatingFunc, osculatingFunc,
acloseOrbit, acloseOrbit,
hidden, hidden,
false, //No atmosphere false, //No atmosphere
true, //Halo true, //Halo
pTypeStr) pTypeStr),
minorPlanetNumber(0),
absoluteMagnitude(0.0f),
slopeParameter(-1.0f), //== mark as uninitialized: used in getVMagni
tude()
semiMajorAxis(0.),
nameIsProvisionalDesignation(false),
properName(englishName)
{ {
texMapName = atexMapName;
lastOrbitJDE =0;
deltaJDE = StelCore::JD_SECOND;
orbitCached = 0;
closeOrbit = acloseOrbit;
semiMajorAxis = 0.;
eclipticPos=Vec3d(0.,0.,0.); eclipticPos=Vec3d(0.,0.,0.);
rotLocalToParent = Mat4d::identity(); rotLocalToParent = Mat4d::identity();
texMap = StelApp::getInstance().getTextureManager().createTextureThr ead(StelFileMgr::getInstallationDir()+"/textures/"+texMapName, StelTexture: :StelTextureParams(true, GL_LINEAR, GL_REPEAT)); texMap = StelApp::getInstance().getTextureManager().createTextureThr ead(StelFileMgr::getInstallationDir()+"/textures/"+texMapName, StelTexture: :StelTextureParams(true, GL_LINEAR, GL_REPEAT));
//MinorPlanet specific members
minorPlanetNumber = 0;
absoluteMagnitude = 0;
slopeParameter = -1;//== uninitialized: used in getVMagnitude()
//TODO: Fix the name //TODO: Fix the name
// - Detect numeric prefix and set number if any // - Detect numeric prefix and set number if any
// - detect provisional designation // - detect provisional designation
// - create the HTML name // - create the HTML name
//Try to detect number //Try to detect number
//TODO: Move this to the minor planet parse code in the plug-in? //TODO: Move this to the minor planet parse code in the plug-in?
/* /*
QString name = englishName; QString name = englishName;
QRegExp bracketedNumberPrefixPattern("^\\((\\d+)\\)\\s"); QRegExp bracketedNumberPrefixPattern("^\\((\\d+)\\)\\s");
QRegExp freeNumberPrefixPattern("^(\\d+)\\s[A-Za-z]{3,}"); QRegExp freeNumberPrefixPattern("^(\\d+)\\s[A-Za-z]{3,}");
skipping to change at line 120 skipping to change at line 114
number = 0; number = 0;
//TODO: Handle a name consisting only of a number //TODO: Handle a name consisting only of a number
name.remove(0, numberString.length() + 3); name.remove(0, numberString.length() + 3);
htmlName = QString("(%1) ").arg(number); htmlName = QString("(%1) ").arg(number);
}*/ }*/
//Try to detect a naming conflict //Try to detect a naming conflict
if (englishName.endsWith('*')) if (englishName.endsWith('*'))
properName = englishName.left(englishName.count() - 1); properName = englishName.left(englishName.count() - 1);
else
properName = englishName;
//Try to detect provisional designation //Try to detect provisional designation
nameIsProvisionalDesignation = false;
QString provisionalDesignation = renderProvisionalDesignationinHtml( englishName); QString provisionalDesignation = renderProvisionalDesignationinHtml( englishName);
if (!provisionalDesignation.isEmpty()) if (!provisionalDesignation.isEmpty())
{ {
nameIsProvisionalDesignation = true; nameIsProvisionalDesignation = true;
provisionalDesignationHtml = provisionalDesignation; provisionalDesignationHtml = provisionalDesignation;
} }
nameI18 = englishName;
flagLabels = true;
} }
MinorPlanet::~MinorPlanet() MinorPlanet::~MinorPlanet()
{ {
//Do nothing for the moment //Do nothing for the moment
} }
void MinorPlanet::setSemiMajorAxis(double value) void MinorPlanet::setSemiMajorAxis(double value)
{ {
semiMajorAxis = value; semiMajorAxis = value;
skipping to change at line 293 skipping to change at line 280
if (flags&Size && aSize>1e-6) if (flags&Size && aSize>1e-6)
{ {
if (withDecimalDegree) if (withDecimalDegree)
oss << q_("Apparent diameter: %1").arg(StelUtils::ra dToDecDegStr(aSize,5,false,true)) << "<br>"; oss << q_("Apparent diameter: %1").arg(StelUtils::ra dToDecDegStr(aSize,5,false,true)) << "<br>";
else else
oss << q_("Apparent diameter: %1").arg(StelUtils::ra dToDmsStr(aSize, true)) << "<br>"; oss << q_("Apparent diameter: %1").arg(StelUtils::ra dToDmsStr(aSize, true)) << "<br>";
} }
// If semi-major axis not zero then calculate and display orbital pe riod for asteroid in days // If semi-major axis not zero then calculate and display orbital pe riod for asteroid in days
double siderealPeriod = getSiderealPeriod(); double siderealPeriod = getSiderealPeriod();
if ((flags&Extra) && (siderealPeriod>0)) if (flags&Extra)
{ {
// TRANSLATORS: Sidereal (orbital) period for solar system b if (siderealPeriod>0)
odies in days and in Julian years (symbol: a) {
oss << q_("Sidereal period: %1 days (%2 a)").arg(QString::nu // TRANSLATORS: Sidereal (orbital) period for solar
mber(siderealPeriod, 'f', 2)).arg(QString::number(siderealPeriod/365.25, 'f system bodies in days and in Julian years (symbol: a)
', 3)) << "<br>"; oss << q_("Sidereal period: %1 days (%2 a)").arg(QSt
ring::number(siderealPeriod, 'f', 2)).arg(QString::number(siderealPeriod/36
5.25, 'f', 3)) << "<br>";
}
const Vec3d& observerHelioPos = core->getObserverHeliocentri
cEclipticPos();
const double elongation = getElongation(observerHelioPos);
if (withDecimalDegree)
{
oss << QString(q_("Phase Angle: %1")).arg(StelUtils:
:radToDecDegStr(getPhaseAngle(observerHelioPos),4,false,true)) << "<br>";
oss << QString(q_("Elongation: %1")).arg(StelUtils::
radToDecDegStr(elongation,4,false,true)) << "<br>";
}
else
{
oss << QString(q_("Phase Angle: %1")).arg(StelUtils:
:radToDmsStr(getPhaseAngle(observerHelioPos), true)) << "<br>";
oss << QString(q_("Elongation: %1")).arg(StelUtils::
radToDmsStr(elongation, true)) << "<br>";
}
} }
postProcessInfoString(str, flags); postProcessInfoString(str, flags);
return str; return str;
} }
double MinorPlanet::getSiderealPeriod() const double MinorPlanet::getSiderealPeriod() const
{ {
double period; double period;
 End of changes. 8 change blocks. 
26 lines changed or deleted 36 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/