122 std::array<float, kLobCoeffsSize>
drags;
130 "Context vs LobContext size mismatch");
132 "Context vs LobContext alignment mismatch");
133static_assert(offsetof(
Context, drag_coeff) ==
135 "drag_coeff offset drift");
136static_assert(offsetof(
Context, speed_of_sound) ==
138 "speed_of_sound offset drift");
140 "mass offset drift");
141static_assert(offsetof(
Context, optic_height) ==
143 "optic_height offset drift");
145 "gravity offset drift");
147 "wind offset drift");
149 "coriolis offset drift");
150static_assert(offsetof(
Context, zero_angle) ==
152 "zero_angle offset drift");
153static_assert(offsetof(
Context, stability_factor) ==
155 "stability_factor offset drift");
156static_assert(offsetof(
Context, aerodynamic_jump) ==
158 "aerodynamic_jump offset drift");
159static_assert(offsetof(
Context, spindrift_factor) ==
161 "spindrift_factor offset drift");
163 "max_time offset drift");
165 "drags offset drift");
167 "velocity offset drift");
168static_assert(offsetof(
Context, minimum_speed) ==
170 "minimum_speed offset drift");
172 "step_size offset drift");
174 "error offset drift");
176 "ErrorT kNone value drift");
179 "ErrorT kNotFormed value drift");
405 const std::array<float, N>& drags) {
411 const std::array<float, N>& drags) =
delete;
414 const std::array<float, N>&& drags) =
delete;
417 const std::array<float, N>&& drags) =
delete;
459 const std::array<float, N>& bcvs) {
465 const std::array<float, N>& bcvs) =
delete;
468 const std::array<float, N>&& bcvs) =
delete;
471 const std::array<float, N>&& bcvs) =
delete;
784 return ::LobSolve(
reinterpret_cast<const ::
LobContext*
>(&ctx), pranges, pouts,
798inline size_t Solve(
const Context& ctx,
const std::array<uint32_t, N>& ranges,
799 std::array<Output, N>* pouts) {
801 return ::LobSolve(
reinterpret_cast<const ::
LobContext*
>(&ctx), ranges.data(),
815 return ::LobSolve(
reinterpret_cast<const ::
LobContext*
>(&ctx), &range, pout,
833 return ::LobFastInverse(
reinterpret_cast<const ::
LobContext*
>(&ctx), pouts,
850 return ::LobFastInverse(
reinterpret_cast<const ::
LobContext*
>(&ctx),
863 return ::LobFastInverse(
reinterpret_cast<const ::
LobContext*
>(&ctx), pout, 1);
882 Output* pouts,
size_t size) {
884 return ::LobSolveInverse(
reinterpret_cast<const ::
LobContext*
>(&ctx), pranges,
899 const std::array<uint32_t, N>& ranges,
900 std::array<Output, N>* pouts) {
902 return ::LobSolveInverse(
reinterpret_cast<const ::
LobContext*
>(&ctx),
903 ranges.data(), pouts->data(), N);
916 return ::LobSolveInverse(
reinterpret_cast<const ::
LobContext*
>(&ctx), &range,
924inline const char*
Version() { return ::LobVersion(); }
931inline double MoaToMil(
double value) { return ::LobMoaToMil(value); }
937inline double MoaToDeg(
double value) { return ::LobMoaToDeg(value); }
943inline double MoaToIphy(
double value) { return ::LobMoaToIphy(value); }
952 return ::LobMoaToInch(value, range_ft);
960inline double MilToMoa(
double value) { return ::LobMilToMoa(value); }
966inline double MilToDeg(
double value) { return ::LobMilToDeg(value); }
972inline double MilToIphy(
double value) { return ::LobMilToIphy(value); }
981 return ::LobMilToInch(value, range_ft);
989inline double DegToMoa(
double value) { return ::LobDegToMoa(value); }
995inline double DegToMil(
double value) { return ::LobDegToMil(value); }
1004 return ::LobInchToMoa(value, range_ft);
1013 return ::LobInchToMil(value, range_ft);
1022 return ::LobInchToDeg(value, range_ft);
1030inline double JToFtLbs(
double value) { return ::LobJToFtLbs(value); }
1036inline double FtLbsToJ(
double value) { return ::LobFtLbsToJ(value); }
1043inline double MToYd(
double value) { return ::LobMToYd(value); }
1050inline double YdToFt(
double value) { return ::LobYdToFt(value); }
1056inline double MToFt(
double value) { return ::LobMToFt(value); }
1062inline double FtToIn(
double value) { return ::LobFtToIn(value); }
1068inline double MmToIn(
double value) { return ::LobMmToIn(value); }
1074inline double CmToIn(
double value) { return ::LobCmToIn(value); }
1080inline double YdToM(
double value) { return ::LobYdToM(value); }
1086inline double FtToM(
double value) { return ::LobFtToM(value); }
1092inline double FtToYd(
double value) { return ::LobFtToYd(value); }
1098inline double InToMm(
double value) { return ::LobInToMm(value); }
1104inline double InToCm(
double value) { return ::LobInToCm(value); }
1110inline double InToFt(
double value) { return ::LobInToFt(value); }
1117inline double PaToInHg(
double value) { return ::LobPaToInHg(value); }
1123inline double MbarToInHg(
double value) { return ::LobMbarToInHg(value); }
1129inline double PsiToInHg(
double value) { return ::LobPsiToInHg(value); }
1136inline double LbsToGrain(
double value) { return ::LobLbsToGrain(value); }
1142inline double GToGrain(
double value) { return ::LobGToGrain(value); }
1148inline double KgToGrain(
double value) { return ::LobKgToGrain(value); }
1155inline double KgSqMToPmsi(
double value) { return ::LobKgSqMToPmsi(value); }
1162inline double FpsToMps(
double value) { return ::LobFpsToMps(value); }
1168inline double MpsToFps(
double value) { return ::LobMpsToFps(value); }
1174inline double KphToMph(
double value) { return ::LobKphToMph(value); }
1180inline double KnToMph(
double value) { return ::LobKnToMph(value); }
1187inline double MsToS(
double value) { return ::LobMsToS(value); }
1193inline double UsToS(
double value) { return ::LobUsToS(value); }
1199inline double SToMs(
double value) { return ::LobSToMs(value); }
1205inline double SToUs(
double value) { return ::LobSToUs(value); }
1212inline double DegCToDegF(
double value) { return ::LobDegCToDegF(value); }
Context Build()
Builds the Context object with the configured parameters.
Definition lob.hpp:759
Builder & WindHeadingDeg(double value)
Sets the wind heading in degrees.
Definition lob.hpp:645
Builder & LengthInch(double value)
Sets the projectile length in inches.
Definition lob.hpp:330
Builder & TemperatureDegF(double value)
Sets the temperature in degrees Fahrenheit.
Definition lob.hpp:588
Builder & ZeroAngleMOA(double value)
Sets the angle between the sight and launch angle used to achieve zero.
Definition lob.hpp:522
Builder & operator=(const Builder &rhs)
Copy assignment operator.
Definition lob.hpp:219
Builder & BCVelocityBands(const std::array< float, N > &&fps, const std::array< float, N > &&bcvs)=delete
Builder & BCAtmosphere(LobAtmosphereReferenceT type)
Sets the atmosphere reference associated with ballistic coefficient.
Definition lob.hpp:261
Builder & MachVsDragTable(const std::array< float, N > &&machs, const std::array< float, N > &&drags)=delete
Builder & MaximumTime(double value)
Sets the maximum time of flight for the solver.
Definition lob.hpp:730
Builder & MassGrains(double value)
Sets the projectile mass in grains.
Definition lob.hpp:478
Builder & AzimuthDeg(double value)
Sets the azimuth (bearing) of the target in degrees.
Definition lob.hpp:676
Builder & BCVelocityBands(const std::array< float, N > &&fps, const std::array< float, N > &bcvs)=delete
Builder & TailLengthInch(double value)
Sets the projectile tail length in inches.
Definition lob.hpp:350
Builder & operator=(Builder &&rhs) noexcept
Move assignment operator.
Definition lob.hpp:227
Builder & BCVelocityBands(const std::array< float, N > &fps, const std::array< float, N > &bcvs)
Loads ballistic coefficients measured at multiple velocities.
Definition lob.hpp:458
Builder & InitialVelocityFps(uint16_t value)
Sets the initial velocity of the projectile in feet per second.
Definition lob.hpp:488
Builder & AltitudeOfFiringSiteFt(double value)
Sets the altitude of the firing site in feet.
Definition lob.hpp:554
Builder & MeplatDiameterInch(double value)
Sets the projectile meplat diameter in inches.
Definition lob.hpp:310
Builder & MinimumEnergy(uint16_t value)
Sets the minimum energy threshold for the solver.
Definition lob.hpp:719
Builder & BallisticCoefficientPsi(double value)
Sets the ballistic coefficient (Psi).
Definition lob.hpp:240
Builder & AirPressureInHg(double value)
Sets the air pressure in inches of mercury (inHg).
Definition lob.hpp:564
~Builder()
Destructor.
Definition lob.hpp:207
Builder & DiameterInch(double value)
Sets the projectile diameter (caliber) in inches.
Definition lob.hpp:300
Builder & WindHeading(LobClockAngleT value)
Sets the wind heading using a clock angle.
Definition lob.hpp:634
Builder & MachVsDragTable(const std::array< float, N > &&machs, const std::array< float, N > &drags)=delete
Builder & WindHeading(ClockAngleT value)
Sets the wind heading using a clock angle.
Definition lob.hpp:623
Builder & MachVsDragTable(const std::array< float, N > &machs, const std::array< float, N > &drags)
Loads a custom Mach vs Drag table for the projectile.
Definition lob.hpp:404
Builder & LatitudeDeg(double value)
Sets the latitude of the firing location in degrees.
Definition lob.hpp:687
Builder & OpticHeightInches(double value)
Sets the height of the optic above the bore in inches.
Definition lob.hpp:498
Builder & BCAtmosphere(AtmosphereReferenceT type)
Sets the atmosphere reference associated with ballistic coefficient.
Definition lob.hpp:250
Builder & BCVelocityBands(const float *pfps, const float *pbcvs, size_t size)
Loads ballistic coefficients measured at multiple velocities.
Definition lob.hpp:435
Builder & Reset() noexcept
Resets the builder state by re-initializing.
Definition lob.hpp:750
Builder & ZeroDistanceYds(double value)
Sets the zero distance in yards.
Definition lob.hpp:532
Builder()
Default constructor.
Definition lob.hpp:204
Builder & MinimumSpeed(uint16_t value)
Sets the minimum speed threshold for the solver.
Definition lob.hpp:708
Builder & RangeAngleDeg(double value)
Sets the range angle (inclination) to the target in degrees.
Definition lob.hpp:697
Builder & MachVsDragTable(const std::array< float, N > &machs, const std::array< float, N > &&drags)=delete
Builder(const Builder &other)
Definition lob.hpp:209
Builder & WindSpeedMph(double value)
Sets the wind speed in miles per hour.
Definition lob.hpp:665
Builder & BCDragFunction(DragFunctionT type)
Sets the drag function associated with ballistic coefficient.
Definition lob.hpp:275
Builder & BCVelocityBands(const std::array< float, N > &fps, const std::array< float, N > &&bcvs)=delete
Builder & ZeroImpactHeightInches(double value)
Sets the zero impact height in inches.
Definition lob.hpp:544
Builder(Builder &&other) noexcept
Definition lob.hpp:213
Builder & NoseLengthInch(double value)
Sets the projectile nose length in inches.
Definition lob.hpp:340
Builder & AltitudeOfBarometerFt(double value)
Sets the altitude of the location where air pressure was taken in feet.
Definition lob.hpp:578
Builder & OgiveRtR(double value)
Sets the Rt/R ratio of the projectile ogive.
Definition lob.hpp:360
Builder & TwistInchesPerTurn(double value)
Sets the twist rate of the barrel in inches per turn.
Definition lob.hpp:509
Builder & WindSpeedFps(double value)
Sets the wind speed in feet per second.
Definition lob.hpp:655
Builder & StepSize(uint16_t value)
Sets the step size for the numerical solver.
Definition lob.hpp:741
Builder & MachVsDragTable(const float *pmachs, const float *pdrags, size_t size)
Loads a custom Mach vs Drag table for the projectile.
Definition lob.hpp:381
Builder & BaseDiameterInch(double value)
Sets the projectile base diameter in inches.
Definition lob.hpp:320
Builder & RelativeHumidityPercent(double value)
Sets the relative humidity at the firing site in percent.
Definition lob.hpp:612
Builder & BCDragFunction(LobDragFunctionT type)
Sets the drag function associated with ballistic coefficient.
Definition lob.hpp:290
Builder & AltitudeOfThermometerFt(double value)
Sets the altitude of the location where temperature was taken in feet.
Definition lob.hpp:602
LobBuilder * LobBuilderAzimuthDeg(LobBuilder *pbuilder, double value)
Sets the azimuth (bearing) of the target in degrees.
void LobBuilderInit(LobBuilder *pbuilder)
Initializes a builder to default state. No-op if pbuilder is null.
LobBuilder * LobBuilderWindSpeedFps(LobBuilder *pbuilder, double value)
Sets the wind speed in feet per second.
LobBuilder * LobBuilderTemperatureDegF(LobBuilder *pbuilder, double value)
Sets the temperature in degrees Fahrenheit.
LobBuilder * LobBuilderTailLengthInch(LobBuilder *pbuilder, double value)
Sets the projectile tail length in inches.
LobBuilder * LobBuilderOpticHeightInches(LobBuilder *pbuilder, double value)
Sets the height of the optic above the bore in inches.
#define LOB_BUILDER_BUFFER_SIZE
The size in bytes of the builder buffer.
Definition lob.h:21
LobBuilder * LobBuilderAirPressureInHg(LobBuilder *pbuilder, double value)
Sets the air pressure in inches of mercury (inHg).
LobBuilder * LobBuilderMinimumEnergy(LobBuilder *pbuilder, uint16_t value)
Sets the minimum energy threshold for the solver.
LobBuilder * LobBuilderRelativeHumidityPercent(LobBuilder *pbuilder, double value)
Sets the relative humidity at the firing site in percent.
uint8_t LobClockAngleT
Clock angle positions for wind direction.
Definition lob.h:43
LobBuilder * LobBuilderDiameterInch(LobBuilder *pbuilder, double value)
Sets the projectile diameter (caliber) in inches.
LobBuilder * LobBuilderBCAtmosphere(LobBuilder *pbuilder, LobAtmosphereReferenceT type)
Sets the atmosphere reference associated with ballistic coefficient.
LobBuilder * LobBuilderLengthInch(LobBuilder *pbuilder, double value)
Sets the projectile length in inches.
LobBuilder * LobBuilderTwistInchesPerTurn(LobBuilder *pbuilder, double value)
Sets the twist rate of the barrel in inches per turn.
LobBuilder * LobBuilderBCVelocityBands(LobBuilder *pbuilder, const float *pfps, const float *pbcs, size_t size)
Loads ballistic coefficients measured at multiple velocities.
uint8_t LobAtmosphereReferenceT
Atmosphere reference type.
Definition lob.h:35
LobBuilder * LobBuilderReset(LobBuilder *pbuilder)
Resets a builder state by re-initializing. No-op if pbuilder is null.
LobBuilder * LobBuilderLatitudeDeg(LobBuilder *pbuilder, double value)
Sets the latitude of the firing location in degrees.
LobBuilder * LobBuilderBCDragFunction(LobBuilder *pbuilder, LobDragFunctionT type)
Sets the drag function associated with ballistic coefficient.
LobBuilder * LobBuilderMaximumTime(LobBuilder *pbuilder, double value)
Sets the maximum time of flight for the solver.
@ kLobDragFunctionG2
G2 drag function.
Definition lob.h:27
@ kLobDragFunctionG1
G1 drag function.
Definition lob.h:26
@ kLobDragFunctionG7
G7 drag function.
Definition lob.h:30
@ kLobDragFunctionG6
G6 drag function.
Definition lob.h:29
@ kLobDragFunctionG8
G8 drag function.
Definition lob.h:31
@ kLobDragFunctionG5
G5 drag function.
Definition lob.h:28
LobBuilder * LobBuilderOgiveRtR(LobBuilder *pbuilder, double value)
Sets the Rt/R ratio of the projectile ogive.
@ kLobErrorDiameterOOR
Definition lob.h:74
@ kLobErrorNotFormed
Definition lob.h:87
@ kLobErrorMeplatDiameterOOR
Definition lob.h:85
@ kLobErrorMachDragTableNotMonotonic
Definition lob.h:81
@ kLobErrorBaseDiameterOOR
Definition lob.h:70
@ kLobErrorLatitudeOOR
Definition lob.h:78
@ kLobErrorInternalError
Definition lob.h:77
@ kLobErrorNoseLengthOOR
Definition lob.h:86
@ kLobErrorBallisticCoefficientOOR
Definition lob.h:68
@ kLobErrorZeroAngleOOR
Definition lob.h:92
@ kLobErrorLengthOOR
Definition lob.h:79
@ kLobErrorZeroUnreachable
Definition lob.h:95
@ kLobErrorOgiveRtROOR
Definition lob.h:88
@ kLobErrorMachDragTableTooShort
Definition lob.h:82
@ kLobErrorRangeAngleOOR
Definition lob.h:89
@ kLobErrorZeroDataRequired
Definition lob.h:93
@ kLobErrorMaximumTimeOOR
Definition lob.h:84
@ kLobErrorTailLengthOOR
Definition lob.h:90
@ kLobErrorBallisticCoefficientRequired
Definition lob.h:69
@ kLobErrorBcBandsInvalid
Definition lob.h:71
@ kLobErrorAirPressureOOR
Definition lob.h:63
@ kLobErrorInitialVelocityRequired
Definition lob.h:76
@ kLobErrorNone
Definition lob.h:62
@ kLobErrorHumidityOOR
Definition lob.h:75
@ kLobErrorAzimuthOOR
Definition lob.h:67
@ kLobErrorMassOOR
Definition lob.h:83
@ kLobErrorZeroDistanceOOR
Definition lob.h:94
@ kLobErrorWindHeadingOOR
Definition lob.h:91
@ kLobErrorAltitudeOfThermometerOOR
Definition lob.h:66
@ kLobErrorBcBandsTooShort
Definition lob.h:73
@ kLobErrorMachDragTableInvalid
Definition lob.h:80
@ kLobErrorBcBandsNotMonotonic
Definition lob.h:72
@ kLobErrorAltitudeOfBarometerOOR
Definition lob.h:64
@ kLobErrorAltitudeOfFiringSiteOOR
Definition lob.h:65
LobBuilder * LobBuilderZeroAngleMOA(LobBuilder *pbuilder, double value)
Sets the angle between the sight and launch angle used to achieve zero.
#define LOB_SPLINE_SEGMENTS
The number of spline pieces comprising a drag function.
Definition lob.h:19
LobBuilder * LobBuilderAltitudeOfThermometerFt(LobBuilder *pbuilder, double value)
Sets the altitude of the location where temperature was taken in feet.
@ kLobClockAngleVIII
eight o'clock
Definition lob.h:52
@ kLobClockAngleIV
four o'clock
Definition lob.h:48
@ kLobClockAngleV
five o'clock
Definition lob.h:49
@ kLobClockAngleI
one o'clock
Definition lob.h:45
@ kLobClockAngleVI
six o'clock
Definition lob.h:50
@ kLobClockAngleXI
eleven o'clock
Definition lob.h:55
@ kLobClockAngleVII
seven o'clock
Definition lob.h:51
@ kLobClockAngleII
two o'clock
Definition lob.h:46
@ kLobClockAngleIII
three o'clock
Definition lob.h:47
@ kLobClockAngleXII
twelve o'clock
Definition lob.h:56
@ kLobClockAngleX
ten o'clock
Definition lob.h:54
@ kLobClockAngleIX
nine o'clock
Definition lob.h:53
uint8_t LobDragFunctionT
Drag function type.
Definition lob.h:24
@ kLobAtmosphereReferenceArmyStandardMetro
Army Standard Metro.
Definition lob.h:37
@ kLobAtmosphereReferenceIcao
International Civil Aviation Organization (ICAO)
Definition lob.h:38
LobBuilder * LobBuilderSplineFitTable(LobBuilder *pbuilder, const float *pmachs, const float *pdrags, size_t size)
Loads a custom Mach vs Drag table for the projectile.
void LobBuilderBuild(LobBuilder *pbuilder, LobContext *presult)
Builds the LobContext object with the configured parameters.
LobBuilder * LobBuilderRangeAngleDeg(LobBuilder *pbuilder, double value)
Sets the range angle (inclination) to the target in degrees.
LobBuilder * LobBuilderStepSize(LobBuilder *pbuilder, uint16_t value)
Sets the step size for the numerical solver.
LobBuilder * LobBuilderZeroImpactHeightInches(LobBuilder *pbuilder, double value)
Sets the zero impact height in inches.
uint8_t LobErrorT
Error codes returned by the builder.
Definition lob.h:60
LobBuilder * LobBuilderBallisticCoefficientPsi(LobBuilder *pbuilder, double value)
Sets the ballistic coefficient (Psi).
LobBuilder * LobBuilderAltitudeOfFiringSiteFt(LobBuilder *pbuilder, double value)
Sets the altitude of the firing site in feet.
LobBuilder * LobBuilderMinimumSpeed(LobBuilder *pbuilder, uint16_t value)
Sets the minimum speed threshold for the solver.
LobBuilder * LobBuilderZeroDistanceYds(LobBuilder *pbuilder, double value)
Sets the zero distance in yards.
LobBuilder * LobBuilderNoseLengthInch(LobBuilder *pbuilder, double value)
Sets the projectile nose length in inches.
LobBuilder * LobBuilderInitialVelocityFps(LobBuilder *pbuilder, uint16_t value)
Sets the initial velocity of the projectile in feet per second.
LobBuilder * LobBuilderMeplatDiameterInch(LobBuilder *pbuilder, double value)
Sets the projectile meplat diameter in inches.
LobBuilder * LobBuilderWindHeadingDeg(LobBuilder *pbuilder, double value)
Sets the wind heading in degrees.
LobBuilder * LobBuilderAltitudeOfBarometerFt(LobBuilder *pbuilder, double value)
Sets the altitude of the location where air pressure was taken in feet.
LobBuilder * LobBuilderMassGrains(LobBuilder *pbuilder, double value)
Sets the projectile mass in grains.
LobBuilder * LobBuilderWindHeading(LobBuilder *pbuilder, LobClockAngleT value)
Sets the wind heading using a clock angle.
void LobBuilderCopy(LobBuilder *dst, const LobBuilder *src)
Copies builder state from src to dst. No-op if either is null.
LobBuilder * LobBuilderBaseDiameterInch(LobBuilder *pbuilder, double value)
Sets the projectile base diameter in inches.
void LobBuilderDestroy(LobBuilder *pbuilder)
Destroys a builder and releases resources. No-op if pbuilder is null.
LobBuilder * LobBuilderWindSpeedMph(LobBuilder *pbuilder, double value)
Sets the wind speed in miles per hour.
size_t FastInverse(const Context &ctx, Output *pouts, size_t size)
Converts forward-solution output to inverse-solution adjustments.
Definition lob.hpp:831
double MilToDeg(double value)
Converts milliradians (MIL) to degrees.
Definition lob.hpp:966
double InToMm(double value)
Converts inches to millimeters.
Definition lob.hpp:1098
double YdToFt(double value)
Converts yards to feet.
Definition lob.hpp:1050
double GToGrain(double value)
Converts grams to grains.
Definition lob.hpp:1142
bool operator==(::LobErrorT a, ErrorT b) noexcept
Definition lob.hpp:185
double MoaToMil(double value)
Converts minutes of angle (MOA) to milliradians (MIL).
Definition lob.hpp:931
double KgToGrain(double value)
Converts kilograms to grains.
Definition lob.hpp:1148
double KnToMph(double value)
Converts Knots to miles per hour.
Definition lob.hpp:1180
double DegCToDegF(double value)
Converts degrees celsius to degrees fahrenheit.
Definition lob.hpp:1212
double KgSqMToPmsi(double value)
Converts kilograms per square meter to pounds mass per square inch.
Definition lob.hpp:1155
double JToFtLbs(double value)
Converts joules to foot-pounds.
Definition lob.hpp:1030
AtmosphereReferenceT
Enumerates the supported atmosphere reference types.
Definition lob.hpp:31
@ kArmyStandardMetro
Army Standard Metro.
Definition lob.hpp:32
@ kIcao
International Civil Aviation Organization (ICAO)
Definition lob.hpp:35
double KphToMph(double value)
Converts kilometers per hour to miles per hour.
Definition lob.hpp:1174
double LbsToGrain(double value)
Converts pounds to grains.
Definition lob.hpp:1136
double PsiToInHg(double value)
Converts pounds per square inch (PSI) to inches of mercury.
Definition lob.hpp:1129
double PaToInHg(double value)
Converts pascals to inches of mercury.
Definition lob.hpp:1117
::LobCoriolis Coriolis
Coriolis effect parameters. See LobCoriolis for member details.
Definition lob.hpp:102
double CmToIn(double value)
Converts centimeters to inches.
Definition lob.hpp:1074
double MToYd(double value)
Converts meters to yards.
Definition lob.hpp:1043
::LobOutput Output
Structure holding output results. See LobOutput for member details.
Definition lob.hpp:183
double MmToIn(double value)
Converts millimeters to inches.
Definition lob.hpp:1068
double MbarToInHg(double value)
Converts millibars to inches of mercury.
Definition lob.hpp:1123
double MoaToDeg(double value)
Converts minutes of angle (MOA) to degrees.
Definition lob.hpp:937
::LobGravity Gravity
Gravity vector. See LobGravity for member details.
Definition lob.hpp:98
double FtToYd(double value)
Converts feet to yards.
Definition lob.hpp:1092
double MilToIphy(double value)
Converts milliradians (MIL) to inches per hundred yards (IPHY).
Definition lob.hpp:972
double MpsToFps(double value)
Converts meters per second to feet per second.
Definition lob.hpp:1168
ErrorT
Error codes returned by the builder.
Definition lob.hpp:60
@ kOgiveRtROOR
Definition lob.hpp:87
@ kBaseDiameterOOR
Definition lob.hpp:69
@ kMeplatDiameterOOR
Definition lob.hpp:84
@ kZeroDistanceOOR
Definition lob.hpp:93
@ kAzimuthOOR
Definition lob.hpp:66
@ kMachDragTableTooShort
Definition lob.hpp:81
@ kNotFormed
Definition lob.hpp:86
@ kBallisticCoefficientOOR
Definition lob.hpp:67
@ kNone
Definition lob.hpp:61
@ kTailLengthOOR
Definition lob.hpp:89
@ kMaximumTimeOOR
Definition lob.hpp:83
@ kMachDragTableNotMonotonic
Definition lob.hpp:80
@ kAltitudeOfBarometerOOR
Definition lob.hpp:63
@ kHumidityOOR
Definition lob.hpp:74
@ kBcBandsTooShort
Definition lob.hpp:72
@ kWindHeadingOOR
Definition lob.hpp:90
@ kBcBandsNotMonotonic
Definition lob.hpp:71
@ kInitialVelocityRequired
Definition lob.hpp:75
@ kDiameterOOR
Definition lob.hpp:73
@ kLengthOOR
Definition lob.hpp:78
@ kAltitudeOfThermometerOOR
Definition lob.hpp:65
@ kAltitudeOfFiringSiteOOR
Definition lob.hpp:64
@ kBallisticCoefficientRequired
Definition lob.hpp:68
@ kNoseLengthOOR
Definition lob.hpp:85
@ kMassOOR
Definition lob.hpp:82
@ kZeroUnreachable
Definition lob.hpp:94
@ kZeroDataRequired
Definition lob.hpp:92
@ kZeroAngleOOR
Definition lob.hpp:91
@ kRangeAngleOOR
Definition lob.hpp:88
@ kAirPressureOOR
Definition lob.hpp:62
@ kLatitudeOOR
Definition lob.hpp:77
@ kMachDragTableInvalid
Definition lob.hpp:79
@ kInternalError
Definition lob.hpp:76
@ kBcBandsInvalid
Definition lob.hpp:70
double InToCm(double value)
Converts inches to centimeters.
Definition lob.hpp:1104
double MoaToInch(double value, double range_ft)
Converts minutes of angle (MOA) to projected inches at a given range in feet.
Definition lob.hpp:951
double InchToMil(double value, double range_ft)
Inches of projection at a given range to milliradians (MIL).
Definition lob.hpp:1012
double FtToM(double value)
Converts feet to meters.
Definition lob.hpp:1086
ClockAngleT
Enumerates clock angle positions.
Definition lob.hpp:44
@ kX
ten o'clock
Definition lob.hpp:54
@ kI
one o'clock
Definition lob.hpp:45
@ kXI
eleven o'clock
Definition lob.hpp:55
@ kVII
seven o'clock
Definition lob.hpp:51
@ kVIII
eight o'clock
Definition lob.hpp:52
@ kV
five o'clock
Definition lob.hpp:49
@ kVI
six o'clock
Definition lob.hpp:50
@ kIV
four o'clock
Definition lob.hpp:48
@ kIII
three o'clock
Definition lob.hpp:47
@ kIX
nine o'clock
Definition lob.hpp:53
@ kXII
twelve o'clock
Definition lob.hpp:56
@ kII
two o'clock
Definition lob.hpp:46
size_t Solve(const Context &ctx, const uint32_t *pranges, Output *pouts, size_t size)
Solves the exterior ballistics problem for a given set of ranges. Results contain a forward-solution.
Definition lob.hpp:781
double DegToMil(double value)
Converts degrees to milliradians (MIL).
Definition lob.hpp:995
double MilToMoa(double value)
Converts milliradians (MIL) to minutes of angle (MOA).
Definition lob.hpp:960
DragFunctionT
Enumerates the supported drag functions.
Definition lob.hpp:21
@ kG2
G2 drag function.
Definition lob.hpp:23
@ kG5
G5 drag function.
Definition lob.hpp:24
@ kG1
G1 drag function.
Definition lob.hpp:22
@ kG8
G8 drag function.
Definition lob.hpp:27
@ kG7
G7 drag function.
Definition lob.hpp:26
@ kG6
G6 drag function.
Definition lob.hpp:25
double InToFt(double value)
Converts inches to feet.
Definition lob.hpp:1110
double FtToIn(double value)
Converts feet to inches.
Definition lob.hpp:1062
double FtLbsToJ(double value)
Converts foot-pounds to joules.
Definition lob.hpp:1036
bool operator!=(::LobErrorT a, ErrorT b) noexcept
Definition lob.hpp:188
double SToUs(double value)
Converts seconds to microseconds.
Definition lob.hpp:1205
double InchToMoa(double value, double range_ft)
Inches of projection at a given range to minutes of angle (MOA).
Definition lob.hpp:1003
double MsToS(double value)
Converts milliseconds to seconds.
Definition lob.hpp:1187
double YdToM(double value)
Converts yards to meters.
Definition lob.hpp:1080
double MilToInch(double value, double range_ft)
Converts milliradians (MIL) to projected inches at a given range in feet.
Definition lob.hpp:980
double InchToDeg(double value, double range_ft)
Inches of projection at a given range to degrees.
Definition lob.hpp:1021
constexpr size_t kLobCoeffsSize
The size of spline coeffs in Context.
Definition lob.hpp:18
const char * Version()
Gets the library version in major.minor.patch format.
Definition lob.hpp:924
constexpr size_t kLobBuilderBufferSize
The size in bytes of the builder buffer.
Definition lob.hpp:16
double SToMs(double value)
Converts seconds to milliseconds.
Definition lob.hpp:1199
size_t SolveInverse(const Context &ctx, const uint32_t *pranges, Output *pouts, size_t size)
Solves the exterior ballistics problem for a given set of ranges. Results contain an inverse-solution...
Definition lob.hpp:881
double UsToS(double value)
Converts microseconds to seconds.
Definition lob.hpp:1193
double MoaToIphy(double value)
Converts minutes of angle (MOA) to inches per hundred yards (IPHY).
Definition lob.hpp:943
::LobWind Wind
Wind vector. See LobWind for member details.
Definition lob.hpp:100
double MToFt(double value)
Converts meters to feet.
Definition lob.hpp:1056
double FpsToMps(double value)
Converts feet per second to meters per second.
Definition lob.hpp:1162
double DegToMoa(double value)
Converts degrees to minutes of angle (MOA).
Definition lob.hpp:989
Opaque builder type for constructing LobContext objects.
Definition lob.h:158
Structure of parameters consumed by the solver.
Definition lob.h:123
Coriolis effect parameters.
Definition lob.h:112
Gravity vector.
Definition lob.h:100
Structure holding the output results of a ballistic calculation.
Definition lob.h:145
Wind vector.
Definition lob.h:106
Structure of parameters consumed by the solver.
Definition lob.hpp:108
double speed_of_sound
The local speed of sound in Fps.
Definition lob.hpp:110
double stability_factor
Miller stability factor.
Definition lob.hpp:117
double mass
Mass of the projectile in pounds.
Definition lob.hpp:111
double zero_angle
Angle between sight and trajectory.
Definition lob.hpp:116
double spindrift_factor
Spin drift factor.
Definition lob.hpp:119
std::array< float, kLobCoeffsSize > drags
Drag curve coefficients.
Definition lob.hpp:122
uint16_t minimum_speed
Minimum speed for solver.
Definition lob.hpp:124
double optic_height
Height of the optic above the bore.
Definition lob.hpp:112
uint16_t velocity
Initial velocity of projectile in Fps.
Definition lob.hpp:123
Gravity gravity
Gravity vector.
Definition lob.hpp:113
double aerodynamic_jump
Aerodynamic jump effect in Moa.
Definition lob.hpp:118
uint16_t step_size
Solver step size in inches.
Definition lob.hpp:125
Wind wind
Wind vector.
Definition lob.hpp:114
double k_lapse
Projected linear density lapse coeff.
Definition lob.hpp:120
Coriolis coriolis
Coriolis effect parameters.
Definition lob.hpp:115
double max_time
Max time of flight for solver.
Definition lob.hpp:121
double drag_coeff
Drag coefficient scaling factor.
Definition lob.hpp:109
ErrorT error
Error status after build.
Definition lob.hpp:126