LOST
0.0.1
LOST: Open-source Star Tracker
|
A database storing distances between pairs of stars. More...
#include <databases.hpp>
Public Member Functions | |
PairDistanceKVectorDatabase (DeserializeContext *des) | |
Create the database from a serialized buffer. More... | |
const int16_t * | FindPairsLiberal (decimal min, decimal max, const int16_t **end) const |
Return at least all the star pairs whose inter-star distance is between min and max. More... | |
const int16_t * | FindPairsExact (const Catalog &, decimal min, decimal max, const int16_t **end) const |
std::vector< decimal > | StarDistances (int16_t star, const Catalog &) const |
Return the distances from the given star to each star it's paired with in the database (for debugging). More... | |
decimal | MaxDistance () const |
Upper bound on stored star pair distances. More... | |
decimal | MinDistance () const |
Lower bound on stored star pair distances. More... | |
long | NumPairs () const |
Exact number of stored pairs. More... | |
Static Public Attributes | |
static const int32_t | kMagicValue = 0x2536f009 |
Magic value to use when storing inside a MultiDatabase. More... | |
A database storing distances between pairs of stars.
Supports fast range queries to find all pairs of stars separated by approximately a certain distance.
Definition at line 54 of file databases.hpp.
|
explicit |
Create the database from a serialized buffer.
Definition at line 221 of file databases.cpp.
const int16_t * lost::PairDistanceKVectorDatabase::FindPairsExact | ( | const Catalog & | catalog, |
decimal | min, | ||
decimal | max, | ||
const int16_t ** | end | ||
) | const |
Definition at line 248 of file databases.cpp.
const int16_t * lost::PairDistanceKVectorDatabase::FindPairsLiberal | ( | decimal | minQueryDistance, |
decimal | maxQueryDistance, | ||
const int16_t ** | end | ||
) | const |
Return at least all the star pairs whose inter-star distance is between min and max.
end[out] | Is set to an "off-the-end" pointer, one past the last pair being returned by the query. |
Definition at line 237 of file databases.cpp.
|
inline |
Upper bound on stored star pair distances.
Definition at line 63 of file databases.hpp.
|
inline |
Lower bound on stored star pair distances.
Definition at line 65 of file databases.hpp.
long lost::PairDistanceKVectorDatabase::NumPairs | ( | ) | const |
Exact number of stored pairs.
Number of star pairs stored in the database.
Definition at line 282 of file databases.cpp.
std::vector< decimal > lost::PairDistanceKVectorDatabase::StarDistances | ( | int16_t | star, |
const Catalog & | catalog | ||
) | const |
Return the distances from the given star to each star it's paired with in the database (for debugging).
Definition at line 287 of file databases.cpp.
|
static |
Magic value to use when storing inside a MultiDatabase.
Definition at line 70 of file databases.hpp.