LOST 0.0.1
LOST: Open-source Star Tracker
Loading...
Searching...
No Matches
pipeline-options.hpp
Go to the documentation of this file.
1// this file uses the "X" pattern.
2
3// Arguments to LOST_CLI_OPTION:
4// 1. String used as the command line option.
5// 2. Type of the option value.
6// 3. Property name
7// 4. Default value
8// 5. Code to convert optarg into the value.
9// 6. The default value if the option is specified with no argument, or kNoDefaultArgument
10
11// To properly align these fields, I recommend using an editor plugin. In Vim, try `vim-lion`; in
12// Emacs, try `evil-lion`. With your cursor inside any of the blocks, type `glip,` to aLign the
13// Inside of the current Paragraph to comma.
14
15#include <string>
16
17#include "decimal.hpp"
18
19// CAMERA
20LOST_CLI_OPTION("png" , std::string , png , "" , optarg , kNoDefaultArgument)
21LOST_CLI_OPTION("focal-length" , decimal , focalLength , 0 , atof(optarg) , kNoDefaultArgument)
22LOST_CLI_OPTION("pixel-size" , decimal , pixelSize , -1 , atof(optarg) , kNoDefaultArgument)
23LOST_CLI_OPTION("fov" , decimal , fov , 20 , atof(optarg) , kNoDefaultArgument)
24
25// PIPELINE STAGES
26LOST_CLI_OPTION("centroid-algo" , std::string, centroidAlgo , "" , optarg , "cog")
27LOST_CLI_OPTION("centroid-dummy-stars" , int , centroidDummyNumStars , 5 , atoi(optarg) , kNoDefaultArgument)
28LOST_CLI_OPTION("centroid-mag-filter" , decimal , centroidMagFilter , -1 , STR_TO_DECIMAL(optarg) , 5)
29LOST_CLI_OPTION("centroid-filter-brightest", int , centroidFilterBrightest , -1 , atoi(optarg) , 10)
30LOST_CLI_OPTION("database" , std::string, databasePath , "" , optarg , kNoDefaultArgument)
31LOST_CLI_OPTION("star-id-algo" , std::string, idAlgo , "" , optarg , "pyramid")
32LOST_CLI_OPTION("angular-tolerance" , decimal , angularTolerance , .04 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
33LOST_CLI_OPTION("false-stars-estimate" , int , estimatedNumFalseStars , 500 , atoi(optarg) , kNoDefaultArgument)
34LOST_CLI_OPTION("max-mismatch-probability" , decimal , maxMismatchProb , .001, STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
35LOST_CLI_OPTION("attitude-algo" , std::string, attitudeAlgo , "" , optarg , "dqm")
36
37// OUTPUT COMPARISON
38LOST_CLI_OPTION("centroid-compare-threshold", decimal , centroidCompareThreshold, 2 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
39LOST_CLI_OPTION("attitude-compare-threshold", decimal , attitudeCompareThreshold, 1 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
40LOST_CLI_OPTION("plot-raw-input" , std::string, plotRawInput , "", optarg , "-")
41LOST_CLI_OPTION("plot-input" , std::string, plotInput , "", optarg , "-")
42LOST_CLI_OPTION("plot-expected" , std::string, plotExpected , "", optarg , "-")
43LOST_CLI_OPTION("plot-centroid-indices" , std::string, plotCentroidIndices , "", optarg , "-")
44LOST_CLI_OPTION("plot-output" , std::string, plotOutput , "", optarg , "-")
45LOST_CLI_OPTION("print-expected-centroids" , std::string, printExpectedCentroids , "", optarg , "-")
46LOST_CLI_OPTION("print-input-centroids" , std::string, printInputCentroids , "", optarg , "-")
47LOST_CLI_OPTION("print-actual-centroids" , std::string, printActualCentroids , "", optarg , "-")
48LOST_CLI_OPTION("print-attitude" , std::string, printAttitude , "", optarg , "-")
49LOST_CLI_OPTION("print-expected-attitude" , std::string, printExpectedAttitude , "", optarg , "-")
50LOST_CLI_OPTION("print-speed" , std::string, printSpeed , "", optarg , "-")
51LOST_CLI_OPTION("compare-centroids" , std::string, compareCentroids , "", optarg , "-")
52LOST_CLI_OPTION("compare-star-ids" , std::string, compareStarIds , "", optarg , "-")
53LOST_CLI_OPTION("compare-attitudes" , std::string, compareAttitudes , "", optarg , "-")
54
55// IMAGE GENERATION
56LOST_CLI_OPTION("generate" , int , generate , 0 , atoi(optarg) , 1)
57LOST_CLI_OPTION("generate-x-resolution" , int , generateXRes , 1024 , atoi(optarg) , kNoDefaultArgument)
58LOST_CLI_OPTION("generate-y-resolution" , int , generateYRes , 1024 , atoi(optarg) , kNoDefaultArgument)
59LOST_CLI_OPTION("generate-centroids-only" , bool , generateCentroidsOnly , false , atobool(optarg) , true)
60LOST_CLI_OPTION("generate-zero-mag-photons" , decimal , generateZeroMagPhotons , 20000 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
61LOST_CLI_OPTION("generate-saturation-photons" , decimal , generateSaturationPhotons , 150 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
62LOST_CLI_OPTION("generate-spread-stddev" , decimal , generateSpreadStdDev , 1 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
63LOST_CLI_OPTION("generate-shot-noise" , bool , generateShotNoise , true , atobool(optarg) , kNoDefaultArgument)
64LOST_CLI_OPTION("generate-dark-current" , decimal , generateDarkCurrent , 0.1 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
65LOST_CLI_OPTION("generate-read-noise-stddev" , decimal , generateReadNoiseStdDev , .05 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
66LOST_CLI_OPTION("generate-ra" , decimal , generateRa , 88 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
67LOST_CLI_OPTION("generate-de" , decimal , generateDe , 7 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
68LOST_CLI_OPTION("generate-roll" , decimal , generateRoll , 0 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
69LOST_CLI_OPTION("generate-random-attitudes" , bool , generateRandomAttitudes , false , atobool(optarg) , true)
70LOST_CLI_OPTION("generate-blur-ra" , decimal , generateBlurRa , 0 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
71LOST_CLI_OPTION("generate-blur-de" , decimal , generateBlurDe , 0 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
72LOST_CLI_OPTION("generate-blur-roll" , decimal , generateBlurRoll , 0 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
73LOST_CLI_OPTION("generate-exposure" , decimal , generateExposure , 0.2 , STR_TO_DECIMAL(optarg) , 0.1)
74LOST_CLI_OPTION("generate-readout-time" , decimal , generateReadoutTime , 0 , STR_TO_DECIMAL(optarg) , 0.01)
75LOST_CLI_OPTION("generate-oversampling" , int , generateOversampling , 4 , atoi(optarg) , kNoDefaultArgument)
76LOST_CLI_OPTION("generate-false-stars" , int , generateNumFalseStars , 0 , atoi(optarg) , 50)
77LOST_CLI_OPTION("generate-false-min-mag" , decimal , generateFalseMinMag , 8 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
78LOST_CLI_OPTION("generate-false-max-mag" , decimal , generateFalseMaxMag , 1 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
79LOST_CLI_OPTION("generate-perturb-centroids" , decimal , generatePerturbationStddev, 0 , STR_TO_DECIMAL(optarg) , 0.2)
80LOST_CLI_OPTION("generate-cutoff-mag" , decimal , generateCutoffMag , 6.0 , STR_TO_DECIMAL(optarg) , kNoDefaultArgument)
81LOST_CLI_OPTION("generate-seed" , int , generateSeed , 394859, atoi(optarg) , kNoDefaultArgument)
82LOST_CLI_OPTION("generate-time-based-seed" , bool , timeSeed , false , atobool(optarg) , true)
double decimal
Definition decimal.hpp:11
#define STR_TO_DECIMAL(x)
Definition decimal.hpp:12
#define LOST_CLI_OPTION(name, type, prop, defaultVal, converter, defaultArg)
Definition io.hpp:83