Builder class for constructing Input
objects with a friendly interface.
More...
#include <lob.hpp>
Public Member Functions | |
Builder () | |
~Builder () | |
Default constructor. | |
Builder (const Builder &other) | |
Default destructor. | |
Builder (Builder &&other) noexcept | |
Copy constructor. | |
Builder & | operator= (const Builder &rhs) |
Move constructor. | |
Builder & | operator= (Builder &&rhs) noexcept |
Copy assignment constructor. | |
Builder & | BallisticCoefficientPsi (double value) |
Move assignment constructor. | |
Builder & | BCAtmosphere (AtmosphereReferenceT type) |
Sets the atmosphere reference associated with ballistic coefficient. | |
Builder & | BCDragFunction (DragFunctionT type) |
Sets the drag function associated with ballistic coefficient. | |
Builder & | DiameterInch (double value) |
Sets the projectile diameter (caliber) in inches. | |
Builder & | MeplatDiameterInch (double value) |
Sets the projectile meplat diameter in inches. | |
Builder & | BaseDiameterInch (double value) |
Sets the projectile base diameter in inches. | |
Builder & | LengthInch (double value) |
Sets the projectile length in inches. | |
Builder & | NoseLengthInch (double value) |
Sets the projectile nose length in inches. | |
Builder & | TailLengthInch (double value) |
Sets the projectile tail length in inches. | |
Builder & | OgiveRtR (double value) |
Sets the Rt/R ratio of the projectile ogive. | |
Builder & | MachVsDragTable (const float *pmachs, const float *pdrags, size_t size) |
Loads a custom Mach vs Drag table for the projectile. | |
template<size_t N> | |
Builder & | MachVsDragTable (const std::array< float, N > &machs, const std::array< float, N > &drags) |
Loads a custom Mach vs Drag table for the projectile. | |
Builder & | MassGrains (double value) |
Sets the projectile mass in grains. | |
Builder & | InitialVelocityFps (uint16_t value) |
Sets the initial velocity of the projectile in feet per second. | |
Builder & | OpticHeightInches (double value) |
Sets the height of the optic above the bore in inches. | |
Builder & | TwistInchesPerTurn (double value) |
Sets the twist rate of the barrel in inches per turn. | |
Builder & | ZeroAngleMOA (double value) |
Sets the angle between the sight and launch angle used to achieve zero. | |
Builder & | ZeroDistanceYds (double value) |
Sets the zero distance in yards. | |
Builder & | ZeroImpactHeightInches (double value) |
Sets the zero impact height in inches. | |
Builder & | AltitudeOfFiringSiteFt (double value) |
Sets the altitude of the firing site in feet. | |
Builder & | AirPressureInHg (double value) |
Sets the air pressure in inches of mercury (inHg). | |
Builder & | AltitudeOfBarometerFt (double value) |
Sets the altitude of the location where air pressure was taken in feet. | |
Builder & | TemperatureDegF (double value) |
Sets the temperature in degrees Fahrenheit. | |
Builder & | AltitudeOfThermometerFt (double value) |
Sets the altitude of the location where temperature was taken in feet. | |
Builder & | RelativeHumidityPercent (double value) |
Sets the relative humidity at the firing site in percent. | |
Builder & | WindHeading (ClockAngleT value) |
Sets the wind heading using a clock angle. | |
Builder & | WindHeadingDeg (double value) |
Sets the wind heading in degrees. | |
Builder & | WindSpeedFps (double value) |
Sets the wind speed in feet per second. | |
Builder & | WindSpeedMph (double value) |
Sets the wind speed in miles per hour. | |
Builder & | AzimuthDeg (double value) |
Sets the azimuth (bearing) of the target in degrees. | |
Builder & | LatitudeDeg (double value) |
Sets the latitude of the firing location in degrees. | |
Builder & | RangeAngleDeg (double value) |
Sets the range angle (inclination) to the target in degrees. | |
Builder & | MinimumSpeed (uint16_t value) |
Sets the minimum speed threshold for the solver. | |
Builder & | MinimumEnergy (uint16_t value) |
Sets the minimum energy threshold for the solver. | |
Builder & | MaximumTime (double value) |
Sets the maximum time of flight for the solver. | |
Builder & | StepSize (uint16_t value) |
Sets the step size for the numerical solver. | |
Input | Build () |
Builds the Input object with the configured parameters. | |
lob::Builder::Builder | ( | ) |
lob::Builder::~Builder | ( | ) |
Default constructor.
lob::Builder::Builder | ( | const Builder & | other | ) |
Default destructor.
|
noexcept |
Copy constructor.
Builder & lob::Builder::AirPressureInHg | ( | double | value | ) |
Sets the air pressure in inches of mercury (inHg).
value | The air pressure in inHg. |
Builder & lob::Builder::AltitudeOfBarometerFt | ( | double | value | ) |
Sets the altitude of the location where air pressure was taken in feet.
value | The altitude in feet. |
Builder & lob::Builder::AltitudeOfFiringSiteFt | ( | double | value | ) |
Sets the altitude of the firing site in feet.
value | The altitude in feet. |
Builder & lob::Builder::AltitudeOfThermometerFt | ( | double | value | ) |
Sets the altitude of the location where temperature was taken in feet.
value | The altitude in feet. |
Builder & lob::Builder::AzimuthDeg | ( | double | value | ) |
Sets the azimuth (bearing) of the target in degrees.
value | The azimuth in degrees. |
Builder & lob::Builder::BallisticCoefficientPsi | ( | double | value | ) |
Move assignment constructor.
Sets the ballistic coefficient (Psi).
value | The ballistic coefficient value. |
Builder & lob::Builder::BaseDiameterInch | ( | double | value | ) |
Sets the projectile base diameter in inches.
value | The base diameter in inches. |
Builder & lob::Builder::BCAtmosphere | ( | AtmosphereReferenceT | type | ) |
Sets the atmosphere reference associated with ballistic coefficient.
type | The atmosphere reference type. |
Builder & lob::Builder::BCDragFunction | ( | DragFunctionT | type | ) |
Sets the drag function associated with ballistic coefficient.
type | The drag function type. |
Input lob::Builder::Build | ( | ) |
Builder & lob::Builder::DiameterInch | ( | double | value | ) |
Sets the projectile diameter (caliber) in inches.
value | The diameter in inches. |
Builder & lob::Builder::InitialVelocityFps | ( | uint16_t | value | ) |
Sets the initial velocity of the projectile in feet per second.
value | The initial velocity in fps. |
Builder & lob::Builder::LatitudeDeg | ( | double | value | ) |
Sets the latitude of the firing location in degrees.
value | The latitude in degrees. |
Builder & lob::Builder::LengthInch | ( | double | value | ) |
Sets the projectile length in inches.
value | The length in inches. |
Builder & lob::Builder::MachVsDragTable | ( | const float * | pmachs, |
const float * | pdrags, | ||
size_t | size ) |
Loads a custom Mach vs Drag table for the projectile.
N | The number of mach-drag pairs in the table. |
pmachs | Pointer to an array of mach values. |
pdrags | Pointer to an array of associated drag values. |
size | The number of mach-drag pairs in the table. |
|
inline |
Loads a custom Mach vs Drag table for the projectile.
N | The number of mach-drag pairs in the table. |
machs | Reference to an array of mach values. |
drags | Reference to an array of associated drag values. |
Builder & lob::Builder::MassGrains | ( | double | value | ) |
Sets the projectile mass in grains.
value | The mass in grains. |
Builder & lob::Builder::MaximumTime | ( | double | value | ) |
Sets the maximum time of flight for the solver.
value | The maximum time in seconds after which the solver will stop calculations. |
Builder & lob::Builder::MeplatDiameterInch | ( | double | value | ) |
Sets the projectile meplat diameter in inches.
value | The meplat in inches. |
Builder & lob::Builder::MinimumEnergy | ( | uint16_t | value | ) |
Sets the minimum energy threshold for the solver.
value | The minimum energy in foot-pounds (ft·lbf) at which the solver will stop calculations. |
Builder & lob::Builder::MinimumSpeed | ( | uint16_t | value | ) |
Sets the minimum speed threshold for the solver.
value | The minimum speed in feet per second (fps) at which the solver will stop calculations. |
Builder & lob::Builder::NoseLengthInch | ( | double | value | ) |
Sets the projectile nose length in inches.
value | The nose length in inches. |
Builder & lob::Builder::OgiveRtR | ( | double | value | ) |
Sets the Rt/R ratio of the projectile ogive.
value | The Rt/R ratio. |
Builder & lob::Builder::OpticHeightInches | ( | double | value | ) |
Sets the height of the optic above the bore in inches.
value | The optic height in inches. |
Builder & lob::Builder::RangeAngleDeg | ( | double | value | ) |
Sets the range angle (inclination) to the target in degrees.
value | The range angle in degrees. |
Builder & lob::Builder::RelativeHumidityPercent | ( | double | value | ) |
Sets the relative humidity at the firing site in percent.
value | The relative humidity in percent. |
Builder & lob::Builder::StepSize | ( | uint16_t | value | ) |
Sets the step size for the numerical solver.
value | The time step size in microseconds (µs) used by the solver. |
Builder & lob::Builder::TailLengthInch | ( | double | value | ) |
Sets the projectile tail length in inches.
value | The tail length in inches. |
Builder & lob::Builder::TemperatureDegF | ( | double | value | ) |
Sets the temperature in degrees Fahrenheit.
value | The temperature in degrees F. |
Builder & lob::Builder::TwistInchesPerTurn | ( | double | value | ) |
Sets the twist rate of the barrel in inches per turn.
value | The twist rate in inches per turn. |
Builder & lob::Builder::WindHeading | ( | ClockAngleT | value | ) |
Sets the wind heading using a clock angle.
value | The wind heading as a clock angle. |
Builder & lob::Builder::WindHeadingDeg | ( | double | value | ) |
Sets the wind heading in degrees.
value | The wind heading in degrees. |
Builder & lob::Builder::WindSpeedFps | ( | double | value | ) |
Sets the wind speed in feet per second.
value | The wind speed in fps. |
Builder & lob::Builder::WindSpeedMph | ( | double | value | ) |
Sets the wind speed in miles per hour.
value | The wind speed in mph. |
Builder & lob::Builder::ZeroAngleMOA | ( | double | value | ) |
Sets the angle between the sight and launch angle used to achieve zero.
value | The zero angle in MOA. |
Builder & lob::Builder::ZeroDistanceYds | ( | double | value | ) |
Sets the zero distance in yards.
value | The zero distance in yards. |
Builder & lob::Builder::ZeroImpactHeightInches | ( | double | value | ) |
Sets the zero impact height in inches.
value | The zero impact height in inches. |