LOST 0.0.1
LOST: Open-source Star Tracker
Loading...
Searching...
No Matches
star-id.hpp
Go to the documentation of this file.
1#ifndef STAR_ID_H
2#define STAR_ID_H
3
4#include "camera.hpp"
5#include "star-utils.hpp"
6
7namespace lost {
8
15 public:
17 virtual StarIdentifiers Go(const unsigned char* database,
18 const Stars&,
19 const Catalog&,
20 const Camera&) const = 0;
21
22 virtual ~StarIdAlgorithm() {};
23};
24
30 public:
31 // How to pair the 4 observed stars with the 4 catalog stars of a matched pattern
33 TRIAD_PERMUTATION, // Try all 24 pairings, pick the one with lowest TRIAD residual
34 CENTROID_RADIUS, // Sort by distance from centroid (can swap stars in more symmetric
35 // patterns, cheaper)
36 };
37
39 decimal patternSearchRange,
40 decimal patternMatchTolerance)
41 : pairingMode_(pairingMode),
42 patternSearchRange_(patternSearchRange),
43 patternMatchTolerance_(patternMatchTolerance) {};
44
45 StarIdentifiers Go(const unsigned char* database,
46 const Stars& centroids,
47 const Catalog& catalog,
48 const Camera&) const;
49
50 private:
51 PairingMode pairingMode_;
52 decimal patternSearchRange_;
53 decimal patternMatchTolerance_;
54};
55
58public:
59 StarIdentifiers Go(const unsigned char *database, const Stars &, const Catalog &, const Camera &) const;
60};
61
67public:
68 StarIdentifiers Go(const unsigned char *database, const Stars &, const Catalog &, const Camera &) const;
69
73 explicit GeometricVotingStarIdAlgorithm(decimal tolerance): tolerance(tolerance) { };
74private:
75 decimal tolerance;
76};
77
78
84public:
85 StarIdentifiers Go(const unsigned char *database, const Stars &, const Catalog &, const Camera &) const;
94 PyramidStarIdAlgorithm(decimal tolerance, int numFalseStars, decimal maxMismatchProbability, long cutoff)
95 : tolerance(tolerance), numFalseStars(numFalseStars),
96 maxMismatchProbability(maxMismatchProbability), cutoff(cutoff) { };
97private:
98 decimal tolerance;
99 int numFalseStars;
100 decimal maxMismatchProbability;
101 long cutoff;
102};
103
104} // namespace lost
105
106#endif
A full description of a camera. Enough information to reconstruct the camera matrix and then some.
Definition camera.hpp:9
A star-id algorithm that returns random results. For debugging.
Definition star-id.hpp:57
StarIdentifiers Go(const unsigned char *database, const Stars &, const Catalog &, const Camera &) const
Actualy perform the star idenification. This is the "main" function for StarIdAlgorithm.
Definition star-id.cpp:282
GeometricVotingStarIdAlgorithm(decimal tolerance)
Definition star-id.hpp:73
StarIdentifiers Go(const unsigned char *database, const Stars &, const Catalog &, const Camera &) const
Actualy perform the star idenification. This is the "main" function for StarIdAlgorithm.
Definition star-id.cpp:294
PyramidStarIdAlgorithm(decimal tolerance, int numFalseStars, decimal maxMismatchProbability, long cutoff)
Definition star-id.hpp:94
StarIdentifiers Go(const unsigned char *database, const Stars &, const Catalog &, const Camera &) const
Actualy perform the star idenification. This is the "main" function for StarIdAlgorithm.
Definition star-id.cpp:857
A star idenification algorithm.
Definition star-id.hpp:14
virtual ~StarIdAlgorithm()
Definition star-id.hpp:22
virtual StarIdentifiers Go(const unsigned char *database, const Stars &, const Catalog &, const Camera &) const =0
Actualy perform the star idenification. This is the "main" function for StarIdAlgorithm.
StarIdentifiers Go(const unsigned char *database, const Stars &centroids, const Catalog &catalog, const Camera &) const
Actualy perform the star idenification. This is the "main" function for StarIdAlgorithm.
Definition star-id.cpp:162
TetraStarIdAlgorithm(PairingMode pairingMode, decimal patternSearchRange, decimal patternMatchTolerance)
Definition star-id.hpp:38
double decimal
Definition decimal.hpp:8
LOST starting point.
std::vector< StarIdentifier > StarIdentifiers
std::vector< Star > Stars
std::vector< CatalogStar > Catalog