129 std::array<float, kLobCoeffsSize>
drags;
130 std::array<WindNode, LOB_WIND_POINTS>
142 "Context vs LobContext size mismatch");
144 "Context vs LobContext alignment mismatch");
145static_assert(offsetof(
Context, drag_coeff) ==
147 "drag_coeff offset drift");
148static_assert(offsetof(
Context, speed_of_sound) ==
150 "speed_of_sound offset drift");
152 "mass offset drift");
153static_assert(offsetof(
Context, optic_height) ==
155 "optic_height offset drift");
157 "gravity offset drift");
159 "coriolis offset drift");
160static_assert(offsetof(
Context, zero_angle) ==
162 "zero_angle offset drift");
163static_assert(offsetof(
Context, stability_factor) ==
165 "stability_factor offset drift");
166static_assert(offsetof(
Context, aerodynamic_jump) ==
168 "aerodynamic_jump offset drift");
169static_assert(offsetof(
Context, spindrift_factor) ==
171 "spindrift_factor offset drift");
173 "max_time offset drift");
175 "drags offset drift");
176static_assert(offsetof(
Context, wind_nodes) ==
178 "wind_nodes offset drift");
179static_assert(offsetof(
Context, wind_shear_exponent) ==
181 "wind_shear_exponent offset drift");
183 "velocity offset drift");
184static_assert(offsetof(
Context, minimum_speed) ==
186 "minimum_speed offset drift");
188 "step_size offset drift");
190 "error offset drift");
191static_assert(offsetof(
Context, wind_count) ==
193 "wind_count offset drift");
195 "ErrorT kNone value drift");
198 "ErrorT kNotFormed value drift");
424 const std::array<float, N>& drags) {
430 const std::array<float, N>& drags) =
delete;
433 const std::array<float, N>&& drags) =
delete;
436 const std::array<float, N>&& drags) =
delete;
478 const std::array<float, N>& bcvs) {
484 const std::array<float, N>& bcvs) =
delete;
487 const std::array<float, N>&& bcvs) =
delete;
490 const std::array<float, N>&& bcvs) =
delete;
902 return ::LobSolve(
reinterpret_cast<const ::
LobContext*
>(&ctx), pranges, pouts,
916inline size_t Solve(
const Context& ctx,
const std::array<uint32_t, N>& ranges,
917 std::array<Output, N>* pouts) {
919 return ::LobSolve(
reinterpret_cast<const ::
LobContext*
>(&ctx), ranges.data(),
933 return ::LobSolve(
reinterpret_cast<const ::
LobContext*
>(&ctx), &range, pout,
951 return ::LobFastInverse(
reinterpret_cast<const ::
LobContext*
>(&ctx), pouts,
968 return ::LobFastInverse(
reinterpret_cast<const ::
LobContext*
>(&ctx),
981 return ::LobFastInverse(
reinterpret_cast<const ::
LobContext*
>(&ctx), pout, 1);
1000 Output* pouts,
size_t size) {
1002 return ::LobSolveInverse(
reinterpret_cast<const ::
LobContext*
>(&ctx), pranges,
1017 const std::array<uint32_t, N>& ranges,
1018 std::array<Output, N>* pouts) {
1020 return ::LobSolveInverse(
reinterpret_cast<const ::
LobContext*
>(&ctx),
1021 ranges.data(), pouts->data(), N);
1034 return ::LobSolveInverse(
reinterpret_cast<const ::
LobContext*
>(&ctx), &range,
1042inline const char*
Version() { return ::LobVersion(); }
1049inline double MoaToMil(
double value) { return ::LobMoaToMil(value); }
1055inline double MoaToDeg(
double value) { return ::LobMoaToDeg(value); }
1061inline double MoaToIphy(
double value) { return ::LobMoaToIphy(value); }
1070 return ::LobMoaToInch(value, range_ft);
1078inline double MilToMoa(
double value) { return ::LobMilToMoa(value); }
1084inline double MilToDeg(
double value) { return ::LobMilToDeg(value); }
1090inline double MilToIphy(
double value) { return ::LobMilToIphy(value); }
1099 return ::LobMilToInch(value, range_ft);
1107inline double DegToMoa(
double value) { return ::LobDegToMoa(value); }
1113inline double DegToMil(
double value) { return ::LobDegToMil(value); }
1122 return ::LobInchToMoa(value, range_ft);
1131 return ::LobInchToMil(value, range_ft);
1140 return ::LobInchToDeg(value, range_ft);
1148inline double JToFtLbs(
double value) { return ::LobJToFtLbs(value); }
1154inline double FtLbsToJ(
double value) { return ::LobFtLbsToJ(value); }
1161inline double MToYd(
double value) { return ::LobMToYd(value); }
1168inline double YdToFt(
double value) { return ::LobYdToFt(value); }
1174inline double MToFt(
double value) { return ::LobMToFt(value); }
1180inline double FtToIn(
double value) { return ::LobFtToIn(value); }
1186inline double MmToIn(
double value) { return ::LobMmToIn(value); }
1192inline double CmToIn(
double value) { return ::LobCmToIn(value); }
1198inline double YdToM(
double value) { return ::LobYdToM(value); }
1204inline double FtToM(
double value) { return ::LobFtToM(value); }
1210inline double FtToYd(
double value) { return ::LobFtToYd(value); }
1216inline double InToMm(
double value) { return ::LobInToMm(value); }
1222inline double InToCm(
double value) { return ::LobInToCm(value); }
1228inline double InToFt(
double value) { return ::LobInToFt(value); }
1235inline double PaToInHg(
double value) { return ::LobPaToInHg(value); }
1241inline double MbarToInHg(
double value) { return ::LobMbarToInHg(value); }
1247inline double PsiToInHg(
double value) { return ::LobPsiToInHg(value); }
1254inline double LbsToGrain(
double value) { return ::LobLbsToGrain(value); }
1260inline double GToGrain(
double value) { return ::LobGToGrain(value); }
1266inline double KgToGrain(
double value) { return ::LobKgToGrain(value); }
1273inline double KgSqMToPmsi(
double value) { return ::LobKgSqMToPmsi(value); }
1280inline double FpsToMps(
double value) { return ::LobFpsToMps(value); }
1286inline double MpsToFps(
double value) { return ::LobMpsToFps(value); }
1292inline double KphToMph(
double value) { return ::LobKphToMph(value); }
1298inline double KnToMph(
double value) { return ::LobKnToMph(value); }
1305inline double MsToS(
double value) { return ::LobMsToS(value); }
1311inline double UsToS(
double value) { return ::LobUsToS(value); }
1317inline double SToMs(
double value) { return ::LobSToMs(value); }
1323inline double SToUs(
double value) { return ::LobSToUs(value); }
1330inline double DegCToDegF(
double value) { return ::LobDegCToDegF(value); }
Context Build()
Builds the Context object with the configured parameters.
Definition lob.hpp:877
Builder & WindHeadingDeg(double value)
Sets the wind heading in degrees.
Definition lob.hpp:704
Builder & LengthInch(double value)
Sets the projectile length in inches.
Definition lob.hpp:349
Builder & TemperatureDegF(double value)
Sets the temperature in degrees Fahrenheit.
Definition lob.hpp:647
Builder & ZeroAngleMOA(double value)
Sets the angle between the sight and launch angle used to achieve zero.
Definition lob.hpp:581
Builder & operator=(const Builder &rhs)
Copy assignment operator.
Definition lob.hpp:238
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:280
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:848
Builder & MassGrains(double value)
Sets the projectile mass in grains.
Definition lob.hpp:537
Builder & AzimuthDeg(double value)
Sets the azimuth (bearing) of the target in degrees.
Definition lob.hpp:794
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:369
Builder & operator=(Builder &&rhs) noexcept
Move assignment operator.
Definition lob.hpp:246
Builder & BCVelocityBands(const std::array< float, N > &fps, const std::array< float, N > &bcvs)
Loads ballistic coefficients measured at multiple velocities.
Definition lob.hpp:477
Builder & SplineCoefficients(const float *pcoefs)
Loads precomputed native spline coefficients for the drag curve.
Definition lob.hpp:506
Builder & InitialVelocityFps(uint16_t value)
Sets the initial velocity of the projectile in feet per second.
Definition lob.hpp:547
Builder & WindProfile(const std::array< LobWindPoint, N > &&points)=delete
Builder & AltitudeOfFiringSiteFt(double value)
Sets the altitude of the firing site in feet.
Definition lob.hpp:613
Builder & MeplatDiameterInch(double value)
Sets the projectile meplat diameter in inches.
Definition lob.hpp:329
Builder & MinimumEnergy(uint16_t value)
Sets the minimum energy threshold for the solver.
Definition lob.hpp:837
Builder & BallisticCoefficientPsi(double value)
Sets the ballistic coefficient (Psi).
Definition lob.hpp:259
Builder & AirPressureInHg(double value)
Sets the air pressure in inches of mercury (inHg).
Definition lob.hpp:623
~Builder()
Destructor.
Definition lob.hpp:226
Builder & SplineCoefficients(const std::array< float, kLobCoeffsSize > &coefs)
Loads precomputed native spline coefficients for the drag curve.
Definition lob.hpp:525
Builder & WindProfile(const LobWindPoint *ppoints, size_t count)
Loads a downrange wind profile for the projectile.
Definition lob.hpp:745
Builder & DiameterInch(double value)
Sets the projectile diameter (caliber) in inches.
Definition lob.hpp:319
Builder & WindHeading(LobClockAngleT value)
Sets the wind heading using a clock angle.
Definition lob.hpp:693
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:682
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:423
Builder & LatitudeDeg(double value)
Sets the latitude of the firing location in degrees.
Definition lob.hpp:805
Builder & OpticHeightInches(double value)
Sets the height of the optic above the bore in inches.
Definition lob.hpp:557
Builder & BCAtmosphere(AtmosphereReferenceT type)
Sets the atmosphere reference associated with ballistic coefficient.
Definition lob.hpp:269
Builder & BCVelocityBands(const float *pfps, const float *pbcvs, size_t size)
Loads ballistic coefficients measured at multiple velocities.
Definition lob.hpp:454
Builder & Reset() noexcept
Resets the builder state by re-initializing.
Definition lob.hpp:868
Builder & ZeroDistanceYds(double value)
Sets the zero distance in yards.
Definition lob.hpp:591
Builder()
Default constructor.
Definition lob.hpp:223
Builder & MinimumSpeed(uint16_t value)
Sets the minimum speed threshold for the solver.
Definition lob.hpp:826
Builder & WindShearExponent(double value)
Sets the Hellmann shear exponent for wind profile height scaling.
Definition lob.hpp:783
Builder & RangeAngleDeg(double value)
Sets the range angle (inclination) to the target in degrees.
Definition lob.hpp:815
Builder & MachVsDragTable(const std::array< float, N > &machs, const std::array< float, N > &&drags)=delete
Builder(const Builder &other)
Definition lob.hpp:228
Builder & WindSpeedMph(double value)
Sets the wind speed in miles per hour.
Definition lob.hpp:724
Builder & BCDragFunction(DragFunctionT type)
Sets the drag function associated with ballistic coefficient.
Definition lob.hpp:294
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:603
Builder(Builder &&other) noexcept
Definition lob.hpp:232
Builder & NoseLengthInch(double value)
Sets the projectile nose length in inches.
Definition lob.hpp:359
Builder & AltitudeOfBarometerFt(double value)
Sets the altitude of the location where air pressure was taken in feet.
Definition lob.hpp:637
Builder & SplineCoefficients(const std::array< float, kLobCoeffsSize > &&coefs)=delete
Builder & OgiveRtR(double value)
Sets the Rt/R ratio of the projectile ogive.
Definition lob.hpp:379
Builder & TwistInchesPerTurn(double value)
Sets the twist rate of the barrel in inches per turn.
Definition lob.hpp:568
Builder & WindSpeedFps(double value)
Sets the wind speed in feet per second.
Definition lob.hpp:714
Builder & StepSize(uint16_t value)
Sets the step size for the numerical solver.
Definition lob.hpp:859
Builder & MachVsDragTable(const float *pmachs, const float *pdrags, size_t size)
Loads a custom Mach vs Drag table for the projectile.
Definition lob.hpp:400
Builder & BaseDiameterInch(double value)
Sets the projectile base diameter in inches.
Definition lob.hpp:339
Builder & WindProfile(const std::array< LobWindPoint, N > &points)
Loads a downrange wind profile for the projectile.
Definition lob.hpp:766
Builder & RelativeHumidityPercent(double value)
Sets the relative humidity at the firing site in percent.
Definition lob.hpp:671
Builder & BCDragFunction(LobDragFunctionT type)
Sets the drag function associated with ballistic coefficient.
Definition lob.hpp:309
Builder & AltitudeOfThermometerFt(double value)
Sets the altitude of the location where temperature was taken in feet.
Definition lob.hpp:661
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:45
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.
#define LOB_WIND_POINTS
Total wind profile points, muzzle point included.
Definition lob.h:23
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:37
LobBuilder * LobBuilderSplineCoefficients(LobBuilder *pbuilder, const float *pcoefs)
Loads precomputed native spline coefficients for the drag curve.
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:29
@ kLobDragFunctionG1
G1 drag function.
Definition lob.h:28
@ kLobDragFunctionG7
G7 drag function.
Definition lob.h:32
@ kLobDragFunctionG6
G6 drag function.
Definition lob.h:31
@ kLobDragFunctionG8
G8 drag function.
Definition lob.h:33
@ kLobDragFunctionG5
G5 drag function.
Definition lob.h:30
LobBuilder * LobBuilderOgiveRtR(LobBuilder *pbuilder, double value)
Sets the Rt/R ratio of the projectile ogive.
@ kLobErrorDiameterOOR
Definition lob.h:76
@ kLobErrorNotFormed
Definition lob.h:89
@ kLobErrorMeplatDiameterOOR
Definition lob.h:87
@ kLobErrorMachDragTableNotMonotonic
Definition lob.h:83
@ kLobErrorBaseDiameterOOR
Definition lob.h:72
@ kLobErrorLatitudeOOR
Definition lob.h:80
@ kLobErrorInternalError
Definition lob.h:79
@ kLobErrorNoseLengthOOR
Definition lob.h:88
@ kLobErrorBallisticCoefficientOOR
Definition lob.h:70
@ kLobErrorZeroAngleOOR
Definition lob.h:98
@ kLobErrorLengthOOR
Definition lob.h:81
@ kLobErrorZeroUnreachable
Definition lob.h:101
@ kLobErrorOgiveRtROOR
Definition lob.h:90
@ kLobErrorMachDragTableTooShort
Definition lob.h:84
@ kLobErrorWindProfileInvalid
Definition lob.h:95
@ kLobErrorRangeAngleOOR
Definition lob.h:91
@ kLobErrorZeroDataRequired
Definition lob.h:99
@ kLobErrorSplineCoefsInvalid
Definition lob.h:92
@ kLobErrorMaximumTimeOOR
Definition lob.h:86
@ kLobErrorTailLengthOOR
Definition lob.h:93
@ kLobErrorBallisticCoefficientRequired
Definition lob.h:71
@ kLobErrorBcBandsInvalid
Definition lob.h:73
@ kLobErrorAirPressureOOR
Definition lob.h:65
@ kLobErrorInitialVelocityRequired
Definition lob.h:78
@ kLobErrorNone
Definition lob.h:64
@ kLobErrorHumidityOOR
Definition lob.h:77
@ kLobErrorAzimuthOOR
Definition lob.h:69
@ kLobErrorMassOOR
Definition lob.h:85
@ kLobErrorZeroDistanceOOR
Definition lob.h:100
@ kLobErrorWindHeadingOOR
Definition lob.h:94
@ kLobErrorWindProfileTooLong
Definition lob.h:97
@ kLobErrorAltitudeOfThermometerOOR
Definition lob.h:68
@ kLobErrorBcBandsTooShort
Definition lob.h:75
@ kLobErrorMachDragTableInvalid
Definition lob.h:82
@ kLobErrorBcBandsNotMonotonic
Definition lob.h:74
@ kLobErrorAltitudeOfBarometerOOR
Definition lob.h:66
@ kLobErrorAltitudeOfFiringSiteOOR
Definition lob.h:67
@ kLobErrorWindProfileNotMonotonic
Definition lob.h:96
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:54
@ kLobClockAngleIV
four o'clock
Definition lob.h:50
@ kLobClockAngleV
five o'clock
Definition lob.h:51
@ kLobClockAngleI
one o'clock
Definition lob.h:47
@ kLobClockAngleVI
six o'clock
Definition lob.h:52
@ kLobClockAngleXI
eleven o'clock
Definition lob.h:57
@ kLobClockAngleVII
seven o'clock
Definition lob.h:53
@ kLobClockAngleII
two o'clock
Definition lob.h:48
@ kLobClockAngleIII
three o'clock
Definition lob.h:49
@ kLobClockAngleXII
twelve o'clock
Definition lob.h:58
@ kLobClockAngleX
ten o'clock
Definition lob.h:56
@ kLobClockAngleIX
nine o'clock
Definition lob.h:55
uint8_t LobDragFunctionT
Drag function type.
Definition lob.h:26
@ kLobAtmosphereReferenceArmyStandardMetro
Army Standard Metro.
Definition lob.h:39
@ kLobAtmosphereReferenceIcao
International Civil Aviation Organization (ICAO)
Definition lob.h:40
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:62
LobBuilder * LobBuilderBallisticCoefficientPsi(LobBuilder *pbuilder, double value)
Sets the ballistic coefficient (Psi).
LobBuilder * LobBuilderWindProfile(LobBuilder *pbuilder, const LobWindPoint *ppoints, size_t count)
Sets the downrange wind profile points.
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.
LobBuilder * LobBuilderWindShearExponent(LobBuilder *pbuilder, double value)
Sets the Hellmann shear exponent for wind profile height scaling.
size_t FastInverse(const Context &ctx, Output *pouts, size_t size)
Converts forward-solution output to inverse-solution adjustments.
Definition lob.hpp:949
double MilToDeg(double value)
Converts milliradians (MIL) to degrees.
Definition lob.hpp:1084
constexpr size_t kLobWindPoints
Total wind profile points, muzzle point included.
Definition lob.hpp:20
double InToMm(double value)
Converts inches to millimeters.
Definition lob.hpp:1216
::LobWindNode WindNode
Solver-ready wind profile node. See LobWindNode for details.
Definition lob.hpp:108
double YdToFt(double value)
Converts yards to feet.
Definition lob.hpp:1168
double GToGrain(double value)
Converts grams to grains.
Definition lob.hpp:1260
bool operator==(::LobErrorT a, ErrorT b) noexcept
Definition lob.hpp:204
double MoaToMil(double value)
Converts minutes of angle (MOA) to milliradians (MIL).
Definition lob.hpp:1049
double KgToGrain(double value)
Converts kilograms to grains.
Definition lob.hpp:1266
double KnToMph(double value)
Converts Knots to miles per hour.
Definition lob.hpp:1298
double DegCToDegF(double value)
Converts degrees celsius to degrees fahrenheit.
Definition lob.hpp:1330
double KgSqMToPmsi(double value)
Converts kilograms per square meter to pounds mass per square inch.
Definition lob.hpp:1273
double JToFtLbs(double value)
Converts joules to foot-pounds.
Definition lob.hpp:1148
AtmosphereReferenceT
Enumerates the supported atmosphere reference types.
Definition lob.hpp:33
@ kArmyStandardMetro
Army Standard Metro.
Definition lob.hpp:34
@ kIcao
International Civil Aviation Organization (ICAO)
Definition lob.hpp:37
double KphToMph(double value)
Converts kilometers per hour to miles per hour.
Definition lob.hpp:1292
double LbsToGrain(double value)
Converts pounds to grains.
Definition lob.hpp:1254
double PsiToInHg(double value)
Converts pounds per square inch (PSI) to inches of mercury.
Definition lob.hpp:1247
double PaToInHg(double value)
Converts pascals to inches of mercury.
Definition lob.hpp:1235
::LobCoriolis Coriolis
Coriolis effect parameters. See LobCoriolis for member details.
Definition lob.hpp:110
double CmToIn(double value)
Converts centimeters to inches.
Definition lob.hpp:1192
double MToYd(double value)
Converts meters to yards.
Definition lob.hpp:1161
::LobOutput Output
Structure holding output results. See LobOutput for member details.
Definition lob.hpp:202
double MmToIn(double value)
Converts millimeters to inches.
Definition lob.hpp:1186
double MbarToInHg(double value)
Converts millibars to inches of mercury.
Definition lob.hpp:1241
double MoaToDeg(double value)
Converts minutes of angle (MOA) to degrees.
Definition lob.hpp:1055
::LobGravity Gravity
Gravity vector. See LobGravity for member details.
Definition lob.hpp:104
double FtToYd(double value)
Converts feet to yards.
Definition lob.hpp:1210
double MilToIphy(double value)
Converts milliradians (MIL) to inches per hundred yards (IPHY).
Definition lob.hpp:1090
double MpsToFps(double value)
Converts meters per second to feet per second.
Definition lob.hpp:1286
ErrorT
Error codes returned by the builder.
Definition lob.hpp:62
@ kOgiveRtROOR
Definition lob.hpp:89
@ kBaseDiameterOOR
Definition lob.hpp:71
@ kMeplatDiameterOOR
Definition lob.hpp:86
@ kZeroDistanceOOR
Definition lob.hpp:99
@ kAzimuthOOR
Definition lob.hpp:68
@ kMachDragTableTooShort
Definition lob.hpp:83
@ kNotFormed
Definition lob.hpp:88
@ kBallisticCoefficientOOR
Definition lob.hpp:69
@ kNone
Definition lob.hpp:63
@ kTailLengthOOR
Definition lob.hpp:92
@ kMaximumTimeOOR
Definition lob.hpp:85
@ kMachDragTableNotMonotonic
Definition lob.hpp:82
@ kAltitudeOfBarometerOOR
Definition lob.hpp:65
@ kHumidityOOR
Definition lob.hpp:76
@ kBcBandsTooShort
Definition lob.hpp:74
@ kWindHeadingOOR
Definition lob.hpp:93
@ kBcBandsNotMonotonic
Definition lob.hpp:73
@ kInitialVelocityRequired
Definition lob.hpp:77
@ kDiameterOOR
Definition lob.hpp:75
@ kLengthOOR
Definition lob.hpp:80
@ kWindProfileNotMonotonic
Definition lob.hpp:95
@ kWindProfileTooLong
Definition lob.hpp:96
@ kAltitudeOfThermometerOOR
Definition lob.hpp:67
@ kAltitudeOfFiringSiteOOR
Definition lob.hpp:66
@ kBallisticCoefficientRequired
Definition lob.hpp:70
@ kNoseLengthOOR
Definition lob.hpp:87
@ kMassOOR
Definition lob.hpp:84
@ kZeroUnreachable
Definition lob.hpp:100
@ kZeroDataRequired
Definition lob.hpp:98
@ kZeroAngleOOR
Definition lob.hpp:97
@ kRangeAngleOOR
Definition lob.hpp:90
@ kAirPressureOOR
Definition lob.hpp:64
@ kSplineCoefsInvalid
Definition lob.hpp:91
@ kWindProfileInvalid
Definition lob.hpp:94
@ kLatitudeOOR
Definition lob.hpp:79
@ kMachDragTableInvalid
Definition lob.hpp:81
@ kInternalError
Definition lob.hpp:78
@ kBcBandsInvalid
Definition lob.hpp:72
double InToCm(double value)
Converts inches to centimeters.
Definition lob.hpp:1222
double MoaToInch(double value, double range_ft)
Converts minutes of angle (MOA) to projected inches at a given range in feet.
Definition lob.hpp:1069
double InchToMil(double value, double range_ft)
Inches of projection at a given range to milliradians (MIL).
Definition lob.hpp:1130
double FtToM(double value)
Converts feet to meters.
Definition lob.hpp:1204
ClockAngleT
Enumerates clock angle positions.
Definition lob.hpp:46
@ kX
ten o'clock
Definition lob.hpp:56
@ kI
one o'clock
Definition lob.hpp:47
@ kXI
eleven o'clock
Definition lob.hpp:57
@ kVII
seven o'clock
Definition lob.hpp:53
@ kVIII
eight o'clock
Definition lob.hpp:54
@ kV
five o'clock
Definition lob.hpp:51
@ kVI
six o'clock
Definition lob.hpp:52
@ kIV
four o'clock
Definition lob.hpp:50
@ kIII
three o'clock
Definition lob.hpp:49
@ kIX
nine o'clock
Definition lob.hpp:55
@ kXII
twelve o'clock
Definition lob.hpp:58
@ kII
two o'clock
Definition lob.hpp:48
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:899
double DegToMil(double value)
Converts degrees to milliradians (MIL).
Definition lob.hpp:1113
double MilToMoa(double value)
Converts milliradians (MIL) to minutes of angle (MOA).
Definition lob.hpp:1078
DragFunctionT
Enumerates the supported drag functions.
Definition lob.hpp:23
@ kG2
G2 drag function.
Definition lob.hpp:25
@ kG5
G5 drag function.
Definition lob.hpp:26
@ kG1
G1 drag function.
Definition lob.hpp:24
@ kG8
G8 drag function.
Definition lob.hpp:29
@ kG7
G7 drag function.
Definition lob.hpp:28
@ kG6
G6 drag function.
Definition lob.hpp:27
double InToFt(double value)
Converts inches to feet.
Definition lob.hpp:1228
double FtToIn(double value)
Converts feet to inches.
Definition lob.hpp:1180
double FtLbsToJ(double value)
Converts foot-pounds to joules.
Definition lob.hpp:1154
bool operator!=(::LobErrorT a, ErrorT b) noexcept
Definition lob.hpp:207
double SToUs(double value)
Converts seconds to microseconds.
Definition lob.hpp:1323
double InchToMoa(double value, double range_ft)
Inches of projection at a given range to minutes of angle (MOA).
Definition lob.hpp:1121
double MsToS(double value)
Converts milliseconds to seconds.
Definition lob.hpp:1305
double YdToM(double value)
Converts yards to meters.
Definition lob.hpp:1198
double MilToInch(double value, double range_ft)
Converts milliradians (MIL) to projected inches at a given range in feet.
Definition lob.hpp:1098
double InchToDeg(double value, double range_ft)
Inches of projection at a given range to degrees.
Definition lob.hpp:1139
::LobWindPoint WindPoint
Downrange wind profile point. See LobWindPoint for details.
Definition lob.hpp:106
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:1042
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:1317
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:999
double UsToS(double value)
Converts microseconds to seconds.
Definition lob.hpp:1311
double MoaToIphy(double value)
Converts minutes of angle (MOA) to inches per hundred yards (IPHY).
Definition lob.hpp:1061
double MToFt(double value)
Converts meters to feet.
Definition lob.hpp:1174
double FpsToMps(double value)
Converts feet per second to meters per second.
Definition lob.hpp:1280
double DegToMoa(double value)
Converts degrees to minutes of angle (MOA).
Definition lob.hpp:1107
Opaque builder type for constructing LobContext objects.
Definition lob.h:178
Structure of parameters consumed by the solver.
Definition lob.h:139
Coriolis effect parameters.
Definition lob.h:128
Gravity vector.
Definition lob.h:106
Structure holding the output results of a ballistic calculation.
Definition lob.h:165
Solver-ready wind profile node with frame-resolved components.
Definition lob.h:120
Downrange wind profile point (horizontal-plane wind).
Definition lob.h:112
Structure of parameters consumed by the solver.
Definition lob.hpp:116
double speed_of_sound
The local speed of sound in Fps.
Definition lob.hpp:118
double stability_factor
Miller stability factor.
Definition lob.hpp:124
double mass
Mass of the projectile in pounds.
Definition lob.hpp:119
double zero_angle
Angle between sight and trajectory.
Definition lob.hpp:123
double spindrift_factor
Spin drift factor.
Definition lob.hpp:126
std::array< float, kLobCoeffsSize > drags
Drag curve coefficients.
Definition lob.hpp:129
uint16_t minimum_speed
Minimum speed for solver.
Definition lob.hpp:135
double optic_height
Height of the optic above the bore.
Definition lob.hpp:120
uint16_t velocity
Initial velocity of projectile in Fps.
Definition lob.hpp:134
Gravity gravity
Gravity vector.
Definition lob.hpp:121
double aerodynamic_jump
Aerodynamic jump effect in Moa.
Definition lob.hpp:125
uint16_t step_size
Solver step size in inches.
Definition lob.hpp:136
double wind_shear_exponent
Hellmann exponent alpha; scaling is always active, 0 disables it exactly.
Definition lob.hpp:132
std::array< WindNode, 8 > wind_nodes
Frame-resolved nodes; [0] is muzzle.
Definition lob.hpp:131
double k_lapse
Projected linear density lapse coeff.
Definition lob.hpp:127
Coriolis coriolis
Coriolis effect parameters.
Definition lob.hpp:122
double max_time
Max time of flight for solver.
Definition lob.hpp:128
double drag_coeff
Drag coefficient scaling factor.
Definition lob.hpp:117
uint8_t wind_count
Total wind points, 1..LOB_WIND_POINTS.
Definition lob.hpp:138
ErrorT error
Error status after build.
Definition lob.hpp:137