Steve's 3rd patch for Eigenization of celestialbrowser

sensor-dev
Fridger Schrempp 2009-07-21 21:04:51 +00:00
parent 889bfd9cb8
commit 8d8cc69b98
1 changed files with 4 additions and 13 deletions

View File

@ -20,7 +20,6 @@
using namespace Eigen;
/*
* Constructs a CelestialBrowser which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
@ -127,16 +126,9 @@ void CelestialBrowser::slotRefresh()
if (starClass == "Bary") continue;
/* Point3f starPos = star->getPosition();
Vec3d v(starPos.x - obsPos.x,
starPos.y - obsPos.y,
starPos.z - obsPos.z);
float dist = v.length();*/
float d = (star->getPosition() - (toEigen((Point3f)ucPos) * 1e-6)).norm();
//CelListViewItem *starItem = new CelListViewItem(listStars, stardb->getStarName(*star), dist, _("ly"),
// astro::absToAppMag(star->getAbsoluteMagnitude(), dist),
CelListViewItem *starItem = new CelListViewItem(listStars, stardb->getStarName(*star), d, _("ly"),
astro::absToAppMag(star->getAbsoluteMagnitude(), d),
float dist = ucPos.offsetFromLy(star->getPosition()).norm();
CelListViewItem *starItem = new CelListViewItem(listStars, stardb->getStarName(*star), dist, _("ly"),
astro::absToAppMag(star->getAbsoluteMagnitude(), dist),
star->getAbsoluteMagnitude(), starClass);
SolarSystemCatalog::iterator iter = solarSystemCatalog->find(star->getCatalogNumber());
@ -158,8 +150,7 @@ void CelestialBrowser::addPlanetarySystem(CelListViewItem* parentItem, const Pla
{
const Body* body = system->getBody(i);
if (body->getClassification() & (Body::Barycenter | Body::Invisible)) continue;
//Point3d bodyPos = body->getAstrocentricPosition(appSim->getTime());
Point3d bodyPos = body->getPosition(appSim->getTime());
Point3d bodyPos = ptFromEigen(body->getAstrocentricPosition(appSim->getTime()));
CelListViewItem* item = NULL;
if (parentBodyPos == NULL)
{