Skip to content

Commit

Permalink
just display the proper motion from the catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
henrysky committed Nov 20, 2024
1 parent 3c6ac84 commit 23352d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/core/modules/StarMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -717,9 +717,8 @@ void StarMgr::populateHipparcosLists()
doubleHipStars.push_back(sd);
}
// use separate variables for avoid the overflow (esp. for Barnard's star)
PMData properMotion = getProperMotion(s->getHip());
float pmX = properMotion.first;
float pmY = properMotion.second;
float pmX = 0.01f*s->getDx0();
float pmY = 0.01f*s->getDx0();
float pm = 0.001f * std::sqrt((pmX*pmX) + (pmY*pmY));
if (qAbs(pm)>=pmLimit)
{
Expand Down
7 changes: 3 additions & 4 deletions src/core/modules/StarWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ QString StarWrapper1::getInfoString(const StelCore *core, const InfoStringGroup&
const double vPeriod = StarMgr::getGcvsPeriod(s->getHip());
const int vMm = StarMgr::getGcvsMM(s->getHip());
const float plxErr = StarMgr::getPlxError(s->getHip());
const PMData properMotion = StarMgr::getProperMotion(s->getHip());
if (s->getHip())
{
if ((flags&Name) || (flags&CatalogNumber))
Expand Down Expand Up @@ -325,10 +324,10 @@ QString StarWrapper1::getInfoString(const StelCore *core, const InfoStringGroup&
oss << getExtraInfoStrings(Distance).join("");
}

if (flags&ProperMotion && (!isNan(properMotion.first) && !isNan(properMotion.second)))
if (flags)
{
float dx = properMotion.first;
float dy = properMotion.second;
float dx = 0.1f*s->getDx0();
float dy = 0.1f*s->getDx1();
float pa = std::atan2(dx, dy)*M_180_PIf;
if (pa<0)
pa += 360.f;
Expand Down

0 comments on commit 23352d2

Please sign in to comment.