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 (float 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 (float value) |
Sets the projectile diameter (caliber) in inches. | |
Builder & | MeplatDiameterInch (float value) |
Sets the projectile meplat diameter in inches. | |
Builder & | BaseDiameterInch (float value) |
Sets the projectile base diameter in inches. | |
Builder & | LengthInch (float value) |
Sets the projectile length in inches. | |
Builder & | NoseLengthInch (float value) |
Sets the projectile nose length in inches. | |
Builder & | TailLengthInch (float value) |
Sets the projectile tail length in inches. | |
Builder & | OgiveRtR (float 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 (float 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 (float value) |
Sets the height of the optic above the bore in inches. | |
Builder & | TwistInchesPerTurn (float value) |
Sets the twist rate of the barrel in inches per turn. | |
Builder & | ZeroAngleMOA (float value) |
Sets the angle between the sight and launch angle used to achieve zero. | |
Builder & | ZeroDistanceYds (float value) |
Sets the zero distance in yards. | |
Builder & | ZeroImpactHeightInches (float value) |
Sets the zero impact height in inches. | |
Builder & | AltitudeOfFiringSiteFt (float value) |
Sets the altitude of the firing site in feet. | |
Builder & | AirPressureInHg (float value) |
Sets the air pressure in inches of mercury (inHg). | |
Builder & | AltitudeOfBarometerFt (float value) |
Sets the altitude of the location where air pressure was taken in feet. | |
Builder & | TemperatureDegF (float value) |
Sets the temperature in degrees Fahrenheit. | |
Builder & | AltitudeOfThermometerFt (float value) |
Sets the altitude of the location where temperature was taken in feet. | |
Builder & | RelativeHumidityPercent (float 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 (float value) |
Sets the wind heading in degrees. | |
Builder & | WindSpeedFps (float value) |
Sets the wind speed in feet per second. | |
Builder & | WindSpeedMph (float value) |
Sets the wind speed in miles per hour. | |
Builder & | AzimuthDeg (float value) |
Sets the azimuth (bearing) of the target in degrees. | |
Builder & | LatitudeDeg (float value) |
Sets the latitude of the firing location in degrees. | |
Builder & | RangeAngleDeg (float value) |
Sets the range angle (inclination) to the target in degrees. | |
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 | ( | float | value | ) |
Sets the air pressure in inches of mercury (inHg).
value | The air pressure in inHg. |
Builder & lob::Builder::AltitudeOfBarometerFt | ( | float | value | ) |
Sets the altitude of the location where air pressure was taken in feet.
value | The altitude in feet. |
Builder & lob::Builder::AltitudeOfFiringSiteFt | ( | float | value | ) |
Sets the altitude of the firing site in feet.
value | The altitude in feet. |
Builder & lob::Builder::AltitudeOfThermometerFt | ( | float | value | ) |
Sets the altitude of the location where temperature was taken in feet.
value | The altitude in feet. |
Builder & lob::Builder::AzimuthDeg | ( | float | value | ) |
Sets the azimuth (bearing) of the target in degrees.
value | The azimuth in degrees. |
Builder & lob::Builder::BallisticCoefficientPsi | ( | float | value | ) |
Move assignment constructor.
Sets the ballistic coefficient (Psi).
value | The ballistic coefficient value. |
Builder & lob::Builder::BaseDiameterInch | ( | float | 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 | ( | float | 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 | ( | float | value | ) |
Sets the latitude of the firing location in degrees.
value | The latitude in degrees. |
Builder & lob::Builder::LengthInch | ( | float | 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 | ( | float | value | ) |
Sets the projectile mass in grains.
value | The mass in grains. |
Builder & lob::Builder::MeplatDiameterInch | ( | float | value | ) |
Sets the projectile meplat diameter in inches.
value | The meplat in inches. |
Builder & lob::Builder::NoseLengthInch | ( | float | value | ) |
Sets the projectile nose length in inches.
value | The nose length in inches. |
Builder & lob::Builder::OgiveRtR | ( | float | value | ) |
Sets the Rt/R ratio of the projectile ogive.
value | The Rt/R ratio. |
Builder & lob::Builder::OpticHeightInches | ( | float | value | ) |
Sets the height of the optic above the bore in inches.
value | The optic height in inches. |
Builder & lob::Builder::RangeAngleDeg | ( | float | value | ) |
Sets the range angle (inclination) to the target in degrees.
value | The range angle in degrees. |
Builder & lob::Builder::RelativeHumidityPercent | ( | float | value | ) |
Sets the relative humidity at the firing site in percent.
value | The relative humidity in percent. |
Builder & lob::Builder::TailLengthInch | ( | float | value | ) |
Sets the projectile tail length in inches.
value | The tail length in inches. |
Builder & lob::Builder::TemperatureDegF | ( | float | value | ) |
Sets the temperature in degrees Fahrenheit.
value | The temperature in degrees F. |
Builder & lob::Builder::TwistInchesPerTurn | ( | float | 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 | ( | float | value | ) |
Sets the wind heading in degrees.
value | The wind heading in degrees. |
Builder & lob::Builder::WindSpeedFps | ( | float | value | ) |
Sets the wind speed in feet per second.
value | The wind speed in fps. |
Builder & lob::Builder::WindSpeedMph | ( | float | value | ) |
Sets the wind speed in miles per hour.
value | The wind speed in mph. |
Builder & lob::Builder::ZeroAngleMOA | ( | float | value | ) |
Sets the angle between the sight and launch angle used to achieve zero.
value | The zero angle in MOA. |
Builder & lob::Builder::ZeroDistanceYds | ( | float | value | ) |
Sets the zero distance in yards.
value | The zero distance in yards. |
Builder & lob::Builder::ZeroImpactHeightInches | ( | float | value | ) |
Sets the zero impact height in inches.
value | The zero impact height in inches. |