|
| | IterativeSphericalDistanceDeterminationAlgorithm (decimal radius, Camera &&cam, size_t minimumIterations, size_t maximumRefreshes, decimal distanceRatio, decimal discriminatorRatio, int pdfOrder, int radiusLossOrder) |
| | Creates a IterativeSphericalDistanceDeterminationAlgorithm.
|
| |
| PositionVector | Run (const Points &p) override |
| | Obtains the position of the planet relative to the camera.
|
| |
| | SphericalDistanceDeterminationAlgorithm (decimal radius, Camera &&cam) |
| | Creates a SphericalDeterminationAlgorithm, which deduces the Position vector of a sattelite from Earth by modeling Earth as a sphere.
|
| |
| PositionVector | Run (const Points &p) override |
| | Obtains the position of the planet relative to the camera.
|
| |
|
| FunctionStage ()=default |
| | Constructs a new Stage.
|
| |
|
virtual | ~FunctionStage ()=default |
| | Destroys this.
|
| |
| void | DoAction () override |
| | Executes Run (with a stored input and storing the output)
|
| |
| Points & | GetResource () |
| | Returns the stored input of this.
|
| |
| PositionVector *& | GetProduct () |
| | Returns the stored output of this.
|
| |
| virtual Output | Run (Input input)=0 |
| | Runs this stage.
|
| |
|
| Vec3 | getCenter (const Vec3 &a, const Vec3 &b, const Vec3 &c) |
| | Returns the center of earth as a 3d Vector.
|
| |
| PositionVector | Run (const Vec3 &a, const Vec3 &b, const Vec3 &c) |
| | Returns the position of the planet relative to the camera.
|
| |
|
Camera | cam_ |
| | cam_ field instance describes the camera settings used for the photo taken
|
| |
| decimal | radius_ |
| | radius_ field instance describes the defined radius of earth.
|
| |
|
Vec3 | center_ |
| | Calculated center vector.
|
| |
|
decimal | r_ |
| | Calculated radius.
|
| |
|
Points | resource |
| | The stored input for this.
|
| |
|
PositionVector * | product |
| | The pointer to the stored output for this.
|
| |
The IterativeSphericalDistanceDeterminationAlgorithm is a variation of the SphericalDistanceDeterminationAlgorithm algorithm in that it runs it repeatedly to use all the points given to it.
It uses
- selective randomization of Points, using a even polynomial distributions to prioritize points farther from selected points within triplets
- loss criterion to evaluate each guess
- softmax activation to figure out the plausibility of each guess
- Note
- Testing data on
test/common/assets/example_earth1.png:
SDDA -> (1.0456e+07, -67903.8, -972.935) m
- Distance Error: 0.752384891562%
- Angle Error: 1339.6805912772 arcseconds
- Execution Time: < 1 sec
ISDDA(100000, 0.8, INF, Quadratic Radius Loss AND Randomization) -> (1.0384e+07, -12571.3, -1057.05) m
- Distance Error: 0.0565676042517%
- Angle Error: 250.59497104116 arcseconds
- Execution Time: 11 sec
ISDDA(100000, 0.8, INF, Quartic Radius Loss OR Randomization) -> (1.03781e+07, -11536.7, -927.331) m
- Distance Error: 0.000294332681557%
- Angle Error: 230.031583013 arcseconds
- Execution Time: 11 sec
In optimized mode (-O3), all algorithms are less than 1 second.