|
FOUND
|
The IterativeSphericalDistanceDeterminationAlgorithm is a variation of the SphericalDistanceDeterminationAlgorithm algorithm in that it runs it repeatedly to use all the points given to it. More...
#include <distance.hpp>


Public Member Functions | |
| IterativeSphericalDistanceDeterminationAlgorithm (decimal radius, Camera &&cam, size_t minimumIterations, 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. | |
Public Member Functions inherited from found::SphericalDistanceDeterminationAlgorithm | |
| 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. | |
Public Member Functions inherited from found::FunctionStage< Points, PositionVector > | |
| 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. | |
Public Member Functions inherited from found::Stage< Input, Output > | |
| virtual Output | Run (Input input)=0 |
| Runs this stage. | |
Private Member Functions | |
| decimal | GenerateLoss (PositionVector &position, decimal targetDistanceSq, decimal targetRadiusSq, std::unique_ptr< Vec3[]> &projectedPoints, size_t size) |
| Generates a loss on a position vector. | |
| void | Shuffle (size_t size, size_t n, std::unique_ptr< size_t[]> &indicies) |
| Shuffles the indexes into triplets, attempting to create triplets whose indicies are far from each other. | |
| uint64_t | Pow (uint64_t base, uint64_t power) |
| Performs exponentiation for uint64_t. | |
Additional Inherited Members | |
Protected Member Functions inherited from found::SphericalDistanceDeterminationAlgorithm | |
| Vec3 | getCenter (Vec3 *spats) |
| Returns the center of earth as a 3d Vector. | |
| PreciseDecimal | getRadius (Vec3 *spats, Vec3 center) |
| Returns the radius of the calculated "earth" (normalized) | |
| PreciseDecimal | getDistance (PreciseDecimal r, PreciseDecimal c) |
| Returns the scaled distance from earth. | |
Protected Attributes inherited from found::SphericalDistanceDeterminationAlgorithm | |
| 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. | |
Protected Attributes inherited from found::FunctionStage< Points, PositionVector > | |
| 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
test/common/assets/example_earth1.png:SDDA -> (1.0456e+07, -67903.8, -972.935) m
ISDDA(100000, 0.8, INF, Quadratic Radius Loss AND Randomization) -> (1.0384e+07, -12571.3, -1057.05) m
ISDDA(100000, 0.8, INF, Quartic Radius Loss OR Randomization) -> (1.03781e+07, -11536.7, -927.331) m
In optimized mode (-O3), all algorithms are less than 1 second.
| found::IterativeSphericalDistanceDeterminationAlgorithm::IterativeSphericalDistanceDeterminationAlgorithm | ( | decimal | radius, |
| Camera && | cam, | ||
| size_t | minimumIterations, | ||
| decimal | distanceRatio, | ||
| decimal | discriminatorRatio, | ||
| int | pdfOrder, | ||
| int | radiusLossOrder | ||
| ) |
Creates a IterativeSphericalDistanceDeterminationAlgorithm.
| radius | The radius of Earth |
| cam | The camera used to capture the picture of Earth |
| minimumIterations | The minimum number of iterations to perform |
| distanceRatio | The maximum distance error between the evaluated and reference positions to be considered "the same" distance |
| discriminatorRatio | The maximum ratio between the evaluated and reference loss to accept for data |
| pdfOrder | The Shuffle Randomization Distribution Order |
| radiusLossOrder | The Loss Radius Error Order |
|
private |
Generates a loss on a position vector.
| position | The vector to evaluate |
| targetDistanceSq | The target distance squared of the position |
| targetRadiusSq | The target "radius" squared |
| projectedPoints | The projected points to evaluate against |
| size | The size of the projected points |
|
inlineprivate |
Performs exponentiation for uint64_t.
| base | The base |
| power | The power |
|
override |
Obtains the position of the planet relative to the camera.
| p | The points on the edge of Earth (in the image taken by the camera given to this) |
|
private |
Shuffles the indexes into triplets, attempting to create triplets whose indicies are far from each other.
| size | The size of indicies, or how many indicies to generate |
| n | The end of the range to generate indicies for |
| indicies | The array to write into |