Commit b9d3d9ea authored by Jasem Mutlaq's avatar Jasem Mutlaq

Prefer named stars over unnamed ones when finding objects nearest to a point

parent edb0e036
......@@ -606,11 +606,11 @@ SkyObject* StarComponent::objectNearest( SkyPoint *p, double &maxrad )
// Check up with our Deep Star Components too!
double rTry, rBest;
SkyObject *oTry;
rBest = maxrad;
// JM 2016-03-30: Multiply rBest by a factor of 0.5 so that named stars are preferred to unnamed stars searched below
rBest = maxrad * 0.5;
rTry = maxrad;
for( int i = 0; i < m_DeepStarComponents.size(); ++i ) {
oTry = i )->objectNearest( p, rTry );
// TODO: Should we multiply rBest by a factor < 1, so that we give higher priority to named stars?
if( rTry < rBest ) {
rBest = rTry;
oBest = oTry;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment