kstars
starhopper.cpp
Go to the documentation of this file.
30 QList<const StarObject *> StarHopper::computePath( const SkyPoint &src, const SkyPoint &dest, float fov_, float maglim_ ) {
49 kDebug() << "StarHopper is trying to compute a path from source: " << src.ra().toHMSString() << src.dec().toDMSString() << " to destination: " << dest.ra().toHMSString() << dest.dec().toDMSString() << "; a starhop of " << src.angularDistanceTo( &dest ).Degrees() << " degrees!";
67 kDebug() << "Lowest fscore (vertex distance-plus-cost score) is " << lowfscore << " with coords: " << curr_node->ra().toHMSString() << curr_node->dec().toDMSString() << ". Considering this node now.";
73 // Just a test -- try to print out useful instructions to the debug console. Once we make star hopper unexperimental, we should move this to some sort of a display
86 kDebug() << " Slew " << angDist.Degrees() << " degrees " << direction << " to find a " << hopStar->spchar() << " star of mag " << hopStar->mag();
102 kDebug() << "Node under consideration has larger distance to destination (h-score) than start node! Ignoring it.";
182 magcost = nextstar->mag() - 7.0 + 5 * log10( fov ); // The brighter, the better. FIXME: 8.0 is now an arbitrary reference to the average faint star. Should actually depend on FOV, something like log( FOV ).
190 // We use the cosine rule to find the angle between the hop direction, and the direction to destination
209 double distcost = (curr->angularDistanceTo( next ).Degrees() / fov); // 1 "magnitude" incremental cost for 1 FOV. Is this even required, or is it just equivalent to halving our distance unit? I think it is required since the hop is not necessarily in the direction of the object -- asimha
212 // double distredcost = -((src->angularDistanceTo( dest ).Degrees() - next->angularDistanceTo( dest ).Degrees()) * 60 / fov)*3; // 3 "magnitudes" for 1 FOV closer
217 double stardensitycost = 1 - localNeighbors.count(); // -1 "magnitude" for every neighbouring star
222 kDebug() << "Mag cost: " << magcost << "; Spec Cost: " << speccost << "; Dist Cost: " << distcost << "; Net cost: " << netcost;
SkyPoint deprecess(const KSNumbers *num, long double epoch=J2000)
Obtain a Skypoint with RA0 and Dec0 set from the RA, Dec of this skypoint.
Definition: skypoint.cpp:190
QList< StarObject const * > computePath(const SkyPoint &src, const SkyPoint &dest, float fov_, float maglim_)
Definition: starhopper.cpp:30
char spchar() const
Returns just the first character of the spectral type string.
Definition: starobject.cpp:344
void starsInAperture(QList< StarObject * > &list, const SkyPoint ¢er, float radius, float maglim=-29)
Add to the given list, the stars from this component, that lie within the specified circular aperture...
Definition: starcomponent.cpp:611
QString toDirectionString(dms angle)
Return a string corresponding to an angle specifying direction.
dms angularDistanceTo(const SkyPoint *sp, double *const positionAngle=0) const
Computes the angular distance between two SkyObjects.
Definition: skypoint.cpp:608
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.