Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking mode #105

Open
wants to merge 55 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
89d0883
backbone of the tracking mode database
karenhaining Jun 27, 2022
e1977a1
add tracking mode to CLI
karenhaining Jun 27, 2022
74560ae
fix bug in sort
karenhaining Jun 27, 2022
52e04c0
fixed segfault with sorting stars
karenhaining Jun 27, 2022
549f32c
serializes sorted indices of stars
karenhaining Jun 30, 2022
04ebb59
added constructor for TrackingSortedDatabase
karenhaining Jul 2, 2022
8700009
added query function
karenhaining Jul 6, 2022
e6aa00b
do math with full vector instead of its components
karenhaining Jul 6, 2022
6f44b40
got rid of warning
karenhaining Jul 7, 2022
d062459
template for tracking mode added
karenhaining Jul 29, 2022
4ad6bdd
removed unnecessary function
karenhaining Jul 29, 2022
3f24f61
starting to write tracking mode algo (initial attempt)
karenhaining Aug 4, 2022
052300a
fix int16_t radius to float
karenhaining Aug 4, 2022
0cf4f54
rewriting query to make use of sorted property
karenhaining Aug 4, 2022
e0abcee
adding files to gitignore
karenhaining Aug 9, 2022
4d11776
add previous attitude class
karenhaining Aug 12, 2022
99e9c1d
add prevAttitude arg to all starid algos, set its value with command …
karenhaining Aug 12, 2022
80ea959
first try at implementing starid algorithm
karenhaining Aug 13, 2022
43bffc8
fix cli desciption, style constant name according to Google guidelines
karenhaining Aug 13, 2022
16f7108
compare vec3 equality based on threshold passed through cli
karenhaining Aug 13, 2022
0722366
second attempt at tracking starid
karenhaining Aug 14, 2022
8912d80
pipeline fixes
karenhaining Aug 14, 2022
209c14b
fix png error
karenhaining Aug 14, 2022
55ee888
fix infinite loop in query
karenhaining Aug 14, 2022
e320cc8
change rotation type from quaternion to dcm, fix bug in query
karenhaining Aug 14, 2022
b14869e
fix bug in uncertainty default value
karenhaining Aug 14, 2022
6706376
fix errors in querying
karenhaining Aug 14, 2022
fe4833e
identifies stars! (incorrectly, but at least not 0 identified)
karenhaining Aug 14, 2022
c4c3892
directly use StarIdentifer
karenhaining Aug 15, 2022
0a537ed
switch back to describing rotation with quaternions
karenhaining Aug 15, 2022
c088f80
fix database bugs
karenhaining Aug 15, 2022
5b87217
account for impossible rotations?
karenhaining Aug 15, 2022
0824c8e
fix binary search left bug
karenhaining Aug 15, 2022
bee762c
add check for not comparing the same catalog star
karenhaining Aug 15, 2022
b71ab21
small code cleanup
karenhaining Aug 16, 2022
43b8e9f
fix default value for compare threshold
karenhaining Aug 16, 2022
d789857
fixing bugs in database
karenhaining Aug 16, 2022
632647c
skip pairs that are close by, impossible rotations
karenhaining Aug 16, 2022
e252f03
angle between two vectors function in Vec3 class
karenhaining Aug 17, 2022
7c93c23
create list of stars definitely sure about
karenhaining Aug 17, 2022
e564591
no more angles
karenhaining Aug 17, 2022
119bc2e
bug fix in generated pipeline input expected stars
karenhaining Aug 18, 2022
f956e3f
working version!!!!
karenhaining Aug 18, 2022
ba76233
some code cleanup
karenhaining Aug 18, 2022
77b4198
tracking mode unit tests, clean up query
karenhaining Aug 18, 2022
8b919c2
update to cover catalog
karenhaining Aug 18, 2022
01ba8b9
fix bug in query
karenhaining Aug 19, 2022
bbe64d9
don't pass threshold as parameter, just add it directly when passing …
karenhaining Aug 19, 2022
ce74e1d
change default values for uncertainty and compare threshold
karenhaining Aug 19, 2022
40b8415
code cleanup
karenhaining Aug 19, 2022
9e16953
giant shortcut to tracking mode
karenhaining Mar 20, 2023
905103b
change default threshold values
karenhaining Mar 20, 2023
3e5cbbf
smol fix, maybe saves quite a bit of copying to/from Catalog
zeddie888 Mar 21, 2023
eb95e44
working tracking mode
karenhaining Mar 28, 2023
5291c39
Merge branch 'tracking_mode' of https://github.com/UWCubeSat/lost int…
karenhaining Mar 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
smol fix, maybe saves quite a bit of copying to/from Catalog
zeddie888 committed Mar 21, 2023
commit 3e5cbbf03f55080c0bec8ab57ef7d5ada6702a9b
10 changes: 5 additions & 5 deletions src/databases.cpp
Original file line number Diff line number Diff line change
@@ -219,7 +219,7 @@ void SerializePairDistanceKVector(const Catalog &catalog, float minDistance, flo

PairDistanceKVectorDatabase::PairDistanceKVectorDatabase(const unsigned char *buffer)
: index(KVectorIndex(buffer)) {

// TODO: errors? (not even sure what i meant by this comment anymore)
buffer += SerializeLengthKVectorIndex(index.NumBins());
pairs = (const int16_t *)buffer;
@@ -345,7 +345,7 @@ void SerializeTrackingCatalog(const Catalog &catalog, unsigned char *buffer) {
}

std::sort(stars.begin(), stars.end(), CompareTrackingStars);

// serialize into buffer
unsigned char *bufferStart = buffer;

@@ -377,7 +377,7 @@ TrackingSortedDatabase::TrackingSortedDatabase(const unsigned char *buffer) {
}

// query database (returns list of indices into the catalog that have stars within radius of point)
std::vector<int16_t> TrackingSortedDatabase::QueryNearestStars(const Catalog catalog, const Vec3 point, float radius) {
std::vector<int16_t> TrackingSortedDatabase::QueryNearestStars(const Catalog& catalog, const Vec3 point, float radius) {
assert(radius >= 0);

std::vector<int16_t> query_ind;
@@ -388,7 +388,7 @@ std::vector<int16_t> TrackingSortedDatabase::QueryNearestStars(const Catalog cat
int16_t index = -1;

while (left <= right) {
int16_t mid = left + (right - left) / 2;
int16_t mid = left + (right - left) / 2;
CatalogStar s = catalog[indices[mid]];
Vec3 diff = s.spatial - point;
if (abs(diff.x) <= radius) {
@@ -428,7 +428,7 @@ std::vector<int16_t> TrackingSortedDatabase::QueryNearestStars(const Catalog cat
sRight = catalog[indices[right]];
diffRight = sRight.spatial - point;
}

return query_ind;
}

2 changes: 1 addition & 1 deletion src/databases.hpp
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@ class TrackingSortedDatabase {
public:
TrackingSortedDatabase(const unsigned char *databaseBytes);
const static int32_t kMagicValue = 0x2536f0A9;
std::vector<int16_t> QueryNearestStars(const Catalog c, const Vec3 point, float radius);
std::vector<int16_t> QueryNearestStars(const Catalog &, const Vec3 point, float radius);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have short documentation comment in header file


private:
int16_t length; // length of catalog