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

Tetra Star-ID algorithm #91

Open
wants to merge 106 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
52fd2c5
Save
zeddie888 Aug 15, 2022
652c607
Cleanup starter tetra code
zeddie888 Aug 15, 2022
2d306b8
Implement Pattern construction
zeddie888 Aug 16, 2022
3259203
Stop before database work
zeddie888 Aug 16, 2022
3d350d8
Finish bad Tetra database reading code
zeddie888 Aug 16, 2022
2ad07f9
Continue with hashing code
zeddie888 Aug 16, 2022
39be1be
Finish bad database generation code, fix seg fault- allocate catalog …
zeddie888 Aug 16, 2022
e19a515
Save progress
zeddie888 Aug 16, 2022
f388785
Implement argsort- note that must define in .hpp
zeddie888 Aug 16, 2022
c5b44a2
Finish basic star ID working
zeddie888 Aug 16, 2022
b9f4528
Finish centroid matching, now just return catalog INDEX, not star ID
zeddie888 Aug 17, 2022
a728d5c
Add questionable catalog indexing for LOST attitude step to work
zeddie888 Aug 17, 2022
8412944
Update todos
zeddie888 Aug 17, 2022
302cae6
Continue documentation
zeddie888 Aug 17, 2022
5bb9ea9
Confirm our previous camera.CameraToSpatial does same thing
zeddie888 Aug 20, 2022
2c18c59
Test read from binary, default database
zeddie888 Sep 15, 2022
51b625a
Bug with generator function
zeddie888 Sep 15, 2022
c6fb96b
Bring back version of naive database loading
zeddie888 Sep 15, 2022
1bb5e5d
Fix false failure bug
zeddie888 Sep 15, 2022
ce775db
Test on database with fov=12, stable sort- success for now
zeddie888 Sep 15, 2022
f624299
Database generation working as of now!
zeddie888 Sep 15, 2022
bb4ff51
Use pair for range values in binning
zeddie888 Sep 20, 2022
9b035b9
Fix star ID inclusion issue for db
zeddie888 Sep 22, 2022
77286d0
Add final star table preprocessing step
zeddie888 Oct 21, 2022
927bdec
Continue Tetra db integration
zeddie888 Nov 9, 2022
cb3238a
Save progress on Serialization functions
zeddie888 Nov 25, 2022
0133514
Finish first draft of serialize Tetra db
zeddie888 Nov 25, 2022
d81e120
Remove outdated TetraDatabase from star-id
zeddie888 Nov 25, 2022
c6e6357
Add BuilderTetraDatabase code to io.cpp
zeddie888 Nov 25, 2022
00da9fe
Implement a hacky way to generate Tetra db
zeddie888 Nov 26, 2022
1468cb2
Save changes, bugs in pattern generation
zeddie888 Nov 29, 2022
26372bc
Debug Tetra db generation
zeddie888 Dec 24, 2022
eeaa255
Remove unecessary looping, db preprocessing is much faster now
zeddie888 Dec 24, 2022
8346734
Debug preprocessing, fixed now
zeddie888 Dec 24, 2022
f03d245
Use Vec3 for hashing
zeddie888 Dec 25, 2022
51a6a14
Redo coarse sky map parsing
zeddie888 Dec 25, 2022
c60945d
Review pattern generation for db
zeddie888 Dec 25, 2022
151db86
Implement TetraDatabase functions for parsing db from buffer
zeddie888 Dec 27, 2022
ffaa685
Restore working tetra version, reading from premade binary
zeddie888 Dec 27, 2022
47e31ff
Argsort for centroid indices, save a good bit of work
zeddie888 Dec 27, 2022
97d0960
Bug with Tetra db serialization - collision rate extremely high
zeddie888 Dec 27, 2022
5b5d541
Fix tetra serialization bug
zeddie888 Dec 27, 2022
c78ec82
First successful run with integrated Tetra db
zeddie888 Dec 27, 2022
acdec96
Integration for Tetra db generation
zeddie888 Dec 27, 2022
9720c73
Fix centroid selection bug
zeddie888 Dec 28, 2022
e406596
Save working version with full integration, work still todo
zeddie888 Dec 28, 2022
cddc040
Draft centroid combination generator function
zeddie888 Dec 29, 2022
16e8efa
Integrate centroid combination generator
zeddie888 Dec 29, 2022
e09aeaf
Remove hardcoded catalog length from tetra Go
zeddie888 Dec 29, 2022
2385761
Success on fake generated images!
zeddie888 Dec 29, 2022
491b3c9
Use CLI options for tetraMaxAngle in database
zeddie888 Jan 3, 2023
a008e02
Include maxAngle in tetra db
zeddie888 Jan 3, 2023
81e35a8
Prepare for pattern bin testing
zeddie888 Jan 4, 2023
9d94296
Test binning parameter values
zeddie888 Jan 14, 2023
7cdc236
Testing with database fov size, smaller is better
zeddie888 Feb 17, 2023
6ded84e
Add attitude testing script
zeddie888 Feb 19, 2023
ba2e2a7
Fix Tetra testing script
zeddie888 Feb 20, 2023
f7d9d75
Fix centroid-algo flag error
zeddie888 Feb 23, 2023
f50fb5f
Use normalized spatial vectors, surprisingly powerful improvements
zeddie888 Feb 27, 2023
1ea4f11
Factor out KeyToIndex function
zeddie888 Feb 28, 2023
7c6c5a7
Factor out more common functions- pattern construction, etc.
zeddie888 Mar 1, 2023
44cace3
Fix bug with testing script
zeddie888 Mar 1, 2023
5fab88c
Fix bug with pattern construction - ratios be sorted
zeddie888 Mar 1, 2023
0797b14
Enable other star ID algos, stopped overwriting original Catalog
zeddie888 Mar 1, 2023
65045ac
Enable old tests
zeddie888 Mar 5, 2023
07fe80f
Merge from master
zeddie888 Mar 5, 2023
d613ede
Get rid of static variables in generator function
zeddie888 Mar 5, 2023
e5b941b
Cleanup and documentation
zeddie888 Mar 5, 2023
3c79e84
More cleanup
zeddie888 Mar 5, 2023
7dbfbb7
Restore original tests
zeddie888 Mar 5, 2023
9fe67e7
Remove old db
zeddie888 Mar 5, 2023
7539bda
Indentation set to 4
zeddie888 Mar 8, 2023
ec96726
merge from master
zeddie888 Mar 15, 2023
4be5522
fixing pr
zeddie888 Mar 15, 2023
09a54a4
layout fixes, move preprocessing to databases.hpp
zeddie888 Mar 17, 2023
43306ac
get rid of shorts for db stuff, replaced with uint16_t
zeddie888 Mar 17, 2023
24f4fb5
replace dot product magic with intuitive angle comparisons
zeddie888 Mar 17, 2023
8a41648
split Tetra db serialization into two
zeddie888 Mar 17, 2023
f91beeb
clarity changes
zeddie888 Mar 17, 2023
0519d13
fix compiler warnings
zeddie888 Mar 17, 2023
8a2cb6f
smol comments
zeddie888 Mar 20, 2023
72b15a5
merge from master
zeddie888 Apr 3, 2023
286b29b
Merge branch 'master' of https://github.com/UWCubeSat/lost into ezhan…
zeddie888 Apr 3, 2023
2714892
merge master
zeddie888 Apr 4, 2023
c7231a6
smol comment
zeddie888 May 20, 2023
042f295
merge master
zeddie888 May 20, 2023
4f59c67
move GetPatternMatches functionality to TetraDatabase
zeddie888 May 29, 2023
62212e9
get rid of linear catalog search
zeddie888 May 29, 2023
4bc1fc4
add iterator class for centroid combo, Tetra
zeddie888 May 29, 2023
461f018
change debug output to cerr, man page documentation updated
zeddie888 May 29, 2023
3d41e5b
smol comment
zeddie888 May 29, 2023
a45eed6
hyperparam tuning, interesting results
zeddie888 May 30, 2023
882322e
Merge remote-tracking branch 'origin/master' into ezhang8-tetra2
zeddie888 May 30, 2023
15bc5f1
smol cleanup
zeddie888 May 30, 2023
9e8d031
get rid of special Vec3 comparison function:
zeddie888 May 31, 2023
e592d3d
revert formatting changes to otherwise unmodified code (tetra)
markasoftware Jun 2, 2023
2f6c369
refactor Tetra serialization to use new serdes
zeddie888 Nov 5, 2023
35e2f84
finish tetra serialization
zeddie888 Nov 5, 2023
ac37fef
add extremely simple regression testing script
zeddie888 Nov 13, 2023
3834a3a
Merge remote-tracking branch 'origin/master' into ezhang8-tetra2
zeddie888 Nov 14, 2023
bdcc396
refactoring for tetra stuff
zeddie888 Nov 14, 2023
2cddbcf
line refactoring
zeddie888 Nov 14, 2023
0d284cd
update reg test test to recursively look at subdirectories
zeddie888 Nov 15, 2023
e4e94c8
enable catalog minsep narrowing
zeddie888 Nov 16, 2023
1fa7f28
Merge branch 'master' into ezhang8-tetra2
zeddie888 Nov 16, 2023
917e19a
disable camera printing for testing
zeddie888 Dec 4, 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
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Copyright (c) 2020 Mark Polyakov, Karen Haining (If you edit the file, add your name here!)
#
# Copyright (c) 2020 Mark Polyakov, Karen Haining, Edward Zhang
# (If you edit the file, add your name here!)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand Down Expand Up @@ -88,6 +89,7 @@ test: $(BIN) $(BSC) $(TEST_BIN)
# bash ./test/scripts/pyramid-incorrect.sh
bash ./test/scripts/readme-examples-test.sh
bash ./test/scripts/random-crap.sh
bash ./test/scripts/tetra.sh

$(TEST_BIN): $(TEST_OBJS)
$(CXX) $(LDFLAGS) -o $(TEST_BIN) $(TEST_OBJS) $(LIBS)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ You need Linux or macOS. On Windows, we recommend installing the Windows Subsyst
libeigen3-dev`. Elsewhere, download the latest stable release from https://eigen.tuxfamily.org/.
You can install it system-wide, or just extract it so that the main folder is in
`vendor/eigen3/Eigen` under the LOST repository.

### macOS Prerequisites

- Download [Homebrew](https://brew.sh/), run `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"` in terminal
- Install [cairo](https://formulae.brew.sh/formula/cairo#default) via homebrew `brew install cairo`
- Install [Eigen]("https://formulae.brew.sh/formula/eigen#default") via homebrew `brew install eigen`
- Locate Eigen files and move them to `vendor/eigen3/Eigen` under the LOST repository

### Building

Clone this repository (`git clone https://github.com/uwcubesat/lost`), then `cd lost`, then
Expand Down
2 changes: 1 addition & 1 deletion download-bsc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# copied from Firefox dev tools. Alternately, follow documentation/downloading-stars.md
curl 'https://vizier.cds.unistra.fr/viz-bin/asu-tsv' --compressed -H 'Content-Type: application/x-www-form-urlencoded' -H 'Origin: https://vizier.u-strasbg.fr' --data-raw '-ref=VIZ5f9b96c42e6d&-to=4&-from=-3&-this=-3&%2F%2Fsource=V%2F50%2Fcatalog&%2F%2Ftables=V%2F50%2Fcatalog&-out.max=unlimited&%2F%2FCDSportal=http%3A%2F%2Fcdsportal.u-strasbg.fr%2FStoreVizierData.html&-out.form=%7C+-Separated-Values&-out.add=_RAJ%2C_DEJ&%2F%2Foutaddvalue=default&-oc.form=dec&-nav=cat%3AV%2F50%26tab%3A%7BV%2F50%2Fcatalog%7D%26key%3Asource%3DV%2F50%2Fcatalog%26HTTPPRM%3A%26&-c=&-c.eq=J2000&-c.r=++2&-c.u=arcmin&-c.geom=r&-source=V%2F50%2Fcatalog&-order=I&recno=&-out=HR&HR=&Name=&DM=&HD=&SAO=&FK5=&IRflag=&r_IRflag=&-out=Multiple&Multiple=&ADS=&ADScomp=&VarID=&RAJ2000=&DEJ2000=&GLON=&GLAT=&-out=Vmag&Vmag=&n_Vmag=&u_Vmag=&B-V=&u_B-V=&U-B=&u_U-B=&R-I=&n_R-I=&SpType=&n_SpType=&pmRA=&pmDE=&n_Parallax=&Parallax=&RadVel=&n_RadVel=&l_RotVel=&RotVel=&u_RotVel=&Dmag=&Sep=&MultID=&MultCnt=&NoteFlag=&%2F%2Fnoneucd1p=on&-file=.&-meta.ucd=2&-meta=1&-meta.foot=1&-usenav=1&-bmark=POST' | \
grep -E '^[0-9]{3}\.[0-9]{6}' > bright-star-catalog.tsv
grep -E '^[0-9]{3}\.[0-9]{6}' > bright-star-catalog.tsv
2 changes: 1 addition & 1 deletion src/attitude-estimators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ float QuestCharPoly(float x, float a, float b, float c, float d, float s) {retur
float QuestCharPolyPrime(float x, float a, float b, float c) {return 4*pow(x,3) - 2*(a+b)*x - c;}

/**
* Approximates roots of a real function using the Newton-Raphson algorithm
* Approximates roots of a real function using the Newton-Raphson algorithm
* @see https://www.geeksforgeeks.org/program-for-newton-raphson-method/
*/
float QuestEigenvalueEstimator(float guess, float a, float b, float c, float d, float s) {
Expand Down
26 changes: 24 additions & 2 deletions src/attitude-utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ float FloatModulo(float x, float mod) {
return result >= 0 ? result : result + mod;
}

std::ostream& operator<< (std::ostream& output, const Vec2 &vec){
output << "Vec2(x: " << vec.x << ", y: " << vec.y << ")";
return output;
}

std::ostream& operator<< (std::ostream& output, const Vec3 &vec){
output << "Vec3(x: " << vec.x << ", y: " << vec.y << ", z: " << vec.z << ")";
return output;
}

/// The square of the magnitude
float Vec3::MagnitudeSq() const {
return fma(x,x,fma(y,y, z*z));
Expand All @@ -187,17 +197,24 @@ Vec3 Vec3::Normalize() const {
};
}

// Allows Vec3 to be used as key in associative containers
bool Vec3::operator<(const Vec3 &other) const{
if (x != other.x) return (x < other.x);
if (y != other.y) return (y < other.y);
return z < other.z;
}

/// Dot product
float Vec3::operator*(const Vec3 &other) const {
return fma(x,other.x, fma(y,other.y, z*other.z));
}

/// Dot product
/// Vector-scalar multiplication
Vec2 Vec2::operator*(const float &other) const {
return { x*other, y*other };
}

/// Vector-Scalar multiplication
/// Vector-scalar multiplication
Vec3 Vec3::operator*(const float &other) const {
return { x*other, y*other, z*other };
}
Expand All @@ -217,6 +234,10 @@ Vec3 Vec3::operator-(const Vec3 &other) const {
return { x - other.x, y - other.y, z - other.z };
}

Vec3 Vec3::operator+(const Vec3 &other) const{
return {x + other.x, y + other.y, z + other.z};
}

/// Usual vector cross product
Vec3 Vec3::CrossProduct(const Vec3 &other) const {
return {
Expand Down Expand Up @@ -473,4 +494,5 @@ float Distance(const Vec2 &v1, const Vec2 &v2) {
return sqrt(pow(v1.x-v2.x, 2) + pow(v1.y-v2.y, 2));
}


}
71 changes: 51 additions & 20 deletions src/attitude-utils.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#ifndef ATTITUDE_UTILS_H
#define ATTITUDE_UTILS_H

#include <algorithm>
#include <fstream>
#include <memory>
#include <numeric> // iota
#include <vector>

namespace lost {

Expand All @@ -23,32 +27,42 @@ struct Vec2 {
Vec2 operator*(const float &) const;
Vec2 operator-(const Vec2 &) const;
Vec2 operator+(const Vec2 &) const;

friend std::ostream &operator<<(std::ostream &output, const Vec2 &vec);
};

class Mat3; // define above so we can use in Vec3 class
class Mat3; // define above so we can use in Vec3 class

/// Three dimensional vector with floating point components
class Vec3 {
public:
public:
float x;
float y;
float z;

Vec3(){};
Vec3(float x, float y, float z) : x(x), y(y), z(z){};

float Magnitude() const;
float MagnitudeSq() const;
Vec3 Normalize() const;

bool operator<(const Vec3 &other) const;

float operator*(const Vec3 &) const;
Vec3 operator*(const float &) const;
Vec3 operator*(const Mat3 &) const;
Vec3 operator-(const Vec3 &) const;
Vec3 operator+(const Vec3 &) const;
Vec3 CrossProduct(const Vec3 &) const;
Mat3 OuterProduct(const Vec3 &) const;

friend std::ostream &operator<<(std::ostream &output, const Vec3 &vec);
};

/// 3x3 vector with floating point components
class Mat3 {
public:
public:
float x[9];

float At(int i, int j) const;
Expand All @@ -75,31 +89,31 @@ float Distance(const Vec3 &, const Vec3 &);

/**
* A "human-readable" way to represent a 3d rotation or orientation.
* Euler angles roughly correspond to yaw, pitch, and roll of an airplane, which are easy for humans to understand.
* There's no one single way to store Euler angles. We use z-y'-x'' angles, according to the notation used on the wikipedia page for euler angles.
* Euler angles roughly correspond to yaw, pitch, and roll of an airplane, which are easy for humans
* to understand. There's no one single way to store Euler angles. We use z-y'-x'' angles, according
* to the notation used on the wikipedia page for euler angles.
*/
class EulerAngles {
public:
EulerAngles(float ra, float de, float roll)
: ra(ra), de(de), roll(roll) { };
public:
EulerAngles(float ra, float de, float roll) : ra(ra), de(de), roll(roll){};

/// Right ascension. How far we yaw left. Yaw is performed first.
float ra;
/// Declination. How far we pitch up (or down if negative). Pitch is performed second, after yaw.
/// Declination. How far we pitch up (or down if negative). Pitch is performed second, after
/// yaw.
float de;
/// How far we roll counterclockwise. Roll is performed last (after yaw and pitch).
float roll;
};

/// A quaternion is a common way to represent a 3d rotation.
class Quaternion {
public:
public:
Quaternion() = default;
explicit Quaternion(const Vec3 &);
Quaternion(const Vec3 &, float);

Quaternion(float real, float i, float j, float k)
: real(real), i(i), j(j), k(k) { };
Quaternion(float real, float i, float j, float k) : real(real), i(i), j(j), k(k){};

Quaternion operator*(const Quaternion &other) const;
Quaternion Conjugate() const;
Expand All @@ -121,31 +135,32 @@ class Quaternion {
//
/**
* The attitude (orientation) of a spacecraft.
* The Attitude object stores either a rotation matrix (direction cosine matrix) or a quaternion, and converts automatically to the other format when needed.
* @note When porting to an embedded device, you'll probably want to get rid of this class and adapt to
* either quaternions or DCMs exclusively, depending on the natural output format of whatever
* The Attitude object stores either a rotation matrix (direction cosine matrix) or a quaternion,
* and converts automatically to the other format when needed.
* @note When porting to an embedded device, you'll probably want to get rid of this class and adapt
* to either quaternions or DCMs exclusively, depending on the natural output format of whatever
* attitude estimation algorithm you're using.
*/
class Attitude {
public:
public:
Attitude() = default;
explicit Attitude(const Quaternion &); // NOLINT
explicit Attitude(const Quaternion &); // NOLINT
explicit Attitude(const Mat3 &dcm);

Quaternion GetQuaternion() const;
Mat3 GetDCM() const;
EulerAngles ToSpherical() const;
Vec3 Rotate(const Vec3 &) const;

private:
private:
enum AttitudeType {
NullType,
QuaternionType,
DCMType,
};

Quaternion quaternion;
Mat3 dcm; // direction cosine matrix
Mat3 dcm; // direction cosine matrix
AttitudeType type;
};

Expand Down Expand Up @@ -173,8 +188,24 @@ float ArcSecToRad(float);
/// Always returns something in [0,mod) Eg -0.8 mod 0.6 = 0.4
float FloatModulo(float x, float mod);

// Argsort function - Tetra
// Sort first vector based on values of second vector (asc)
template <class T, class U>
std::vector<T> ArgsortVector(std::vector<T> arr, std::vector<U> cmp) {
std::vector<T> res;
std::vector<int> indices(arr.size());
std::iota(indices.begin(), indices.end(), 0);
std::sort(indices.begin(), indices.end(),
[&](int a, int b) -> bool { return cmp[a] < cmp[b]; });

for (int ind : indices) {
res.push_back(arr[ind]);
}
return res;
}

// TODO: quaternion and euler angle conversion, conversion between ascension/declination to rec9tu

}
} // namespace lost

#endif
17 changes: 17 additions & 0 deletions src/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,23 @@ Vec3 Camera::CameraToSpatial(const Vec2 &vector) const {
};
}

Vec3 Camera::CameraToSpatialFov(const Vec2 &vector) const{
// float fov = DegToRad(this->Fov());
float fov = this->Fov();
float centerX = this->XResolution() / 2.0;
float centerY = this->YResolution() / 2.0;
float scaleFactor = std::tan(fov / 2) / centerX;

float jOverI = (centerX - vector.x) * scaleFactor;
float kOverI = (centerY - vector.y) * scaleFactor;
float i = 1.0 / std::sqrt(1 + jOverI * jOverI + kOverI * kOverI);
float j = jOverI * i;
float k = kOverI * i;
Vec3 res(i, j, k);

return res;
}

/// Returns whether a given pixel is actually in the camera's field of view
bool Camera::InSensor(const Vec2 &vector) const {
// if vector.x == xResolution, then it is at the leftmost point of the pixel that's "hanging
Expand Down
4 changes: 3 additions & 1 deletion src/camera.hpp
zeddie888 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class Camera {
Vec2 SpatialToCamera(const Vec3 &) const;
Vec3 CameraToSpatial(const Vec2 &) const;

Vec3 CameraToSpatialFov(const Vec2 &) const;

// converts from a 2d point in the camera sensor to right ascension and declination relative to
// the center of the camera.
// void CoordinateAngles(const Vec2 &vector, float *ra, float *de) const;
Expand All @@ -41,7 +43,7 @@ class Camera {
/// Focal length in pixels
float FocalLength() const { return focalLength; };
/// Horizontal field of view in radians
float Fov() const;
float Fov() const; // in radians

void SetFocalLength(float focalLength) { this->focalLength = focalLength; }

Expand Down
4 changes: 3 additions & 1 deletion src/database-options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

LOST_CLI_OPTION("min-mag" , float , minMag , 100 , atof(optarg) , kNoDefaultArgument)
LOST_CLI_OPTION("max-stars" , int , maxStars , 10000 , atoi(optarg) , kNoDefaultArgument)
LOST_CLI_OPTION("min-separation" , float , minSeparation , 0.08 , atof(optarg) , kNoDefaultArgument)
LOST_CLI_OPTION("min-separation" , float , minSeparation , 0.05 , atof(optarg) , kNoDefaultArgument)
LOST_CLI_OPTION("kvector" , bool , kvector , false , atobool(optarg), true)
LOST_CLI_OPTION("kvector-min-distance" , float , kvectorMinDistance , 0.5 , atof(optarg) , kNoDefaultArgument)
LOST_CLI_OPTION("kvector-max-distance" , float , kvectorMaxDistance , 15 , atof(optarg) , kNoDefaultArgument)
LOST_CLI_OPTION("kvector-distance-bins", long , kvectorNumDistanceBins, 10000 , atol(optarg) , kNoDefaultArgument)
LOST_CLI_OPTION("tetra" , bool , tetra , false , atobool(optarg), true)
LOST_CLI_OPTION("tetra-max-angle" , float , tetraMaxAngle , 12 , atof(optarg) , kNoDefaultArgument)
LOST_CLI_OPTION("output" , std::string, outputPath , "-" , optarg , kNoDefaultArgument)
Loading