lob 0.11.0
Exterior ballistics library — API + technical reference
Loading...
Searching...
No Matches
lob.hpp File Reference
#include <array>
#include <cstddef>
#include <cstdint>
#include "lob/lob.h"

Go to the source code of this file.

Classes

struct  lob::Context
 Structure of parameters consumed by the solver. More...
 
class  lob::Builder
 Builder class for constructing Context objects with a friendly interface. More...
 

Namespaces

namespace  lob
 

Typedefs

using lob::Gravity = ::LobGravity
 Gravity vector. See LobGravity for member details.
 
using lob::Wind = ::LobWind
 Wind vector. See LobWind for member details.
 
using lob::Coriolis = ::LobCoriolis
 Coriolis effect parameters. See LobCoriolis for member details.
 
using lob::Output = ::LobOutput
 Structure holding output results. See LobOutput for member details.
 

Enumerations

enum class  lob::DragFunctionT : LobDragFunctionT {
  lob::kG1 = ::kLobDragFunctionG1 , lob::kG2 = ::kLobDragFunctionG2 , lob::kG5 = ::kLobDragFunctionG5 , lob::kG6 = ::kLobDragFunctionG6 ,
  lob::kG7 = ::kLobDragFunctionG7 , lob::kG8 = ::kLobDragFunctionG8
}
 Enumerates the supported drag functions. More...
 
enum class  lob::AtmosphereReferenceT : LobAtmosphereReferenceT { lob::kArmyStandardMetro , lob::kIcao = ::kLobAtmosphereReferenceIcao }
 Enumerates the supported atmosphere reference types. More...
 
enum class  lob::ClockAngleT : LobClockAngleT {
  lob::kI = ::kLobClockAngleI , lob::kII = ::kLobClockAngleII , lob::kIII = ::kLobClockAngleIII , lob::kIV = ::kLobClockAngleIV ,
  lob::kV = ::kLobClockAngleV , lob::kVI = ::kLobClockAngleVI , lob::kVII = ::kLobClockAngleVII , lob::kVIII = ::kLobClockAngleVIII ,
  lob::kIX = ::kLobClockAngleIX , lob::kX = ::kLobClockAngleX , lob::kXI = ::kLobClockAngleXI , lob::kXII = ::kLobClockAngleXII
}
 Enumerates clock angle positions. More...
 
enum class  lob::ErrorT : LobErrorT {
  lob::kNone = ::kLobErrorNone , lob::kAirPressureOOR = ::kLobErrorAirPressureOOR , lob::kAltitudeOfBarometerOOR = ::kLobErrorAltitudeOfBarometerOOR , lob::kAltitudeOfFiringSiteOOR = ::kLobErrorAltitudeOfFiringSiteOOR ,
  lob::kAltitudeOfThermometerOOR = ::kLobErrorAltitudeOfThermometerOOR , lob::kAzimuthOOR = ::kLobErrorAzimuthOOR , lob::kBallisticCoefficientOOR = ::kLobErrorBallisticCoefficientOOR , lob::kBallisticCoefficientRequired = ::kLobErrorBallisticCoefficientRequired ,
  lob::kBaseDiameterOOR = ::kLobErrorBaseDiameterOOR , lob::kBcBandsInvalid = ::kLobErrorBcBandsInvalid , lob::kBcBandsNotMonotonic = ::kLobErrorBcBandsNotMonotonic , lob::kBcBandsTooShort = ::kLobErrorBcBandsTooShort ,
  lob::kDiameterOOR = ::kLobErrorDiameterOOR , lob::kHumidityOOR = ::kLobErrorHumidityOOR , lob::kInitialVelocityRequired = ::kLobErrorInitialVelocityRequired , lob::kInternalError = ::kLobErrorInternalError ,
  lob::kLatitudeOOR = ::kLobErrorLatitudeOOR , lob::kLengthOOR = ::kLobErrorLengthOOR , lob::kMachDragTableInvalid = ::kLobErrorMachDragTableInvalid , lob::kMachDragTableNotMonotonic = ::kLobErrorMachDragTableNotMonotonic ,
  lob::kMachDragTableTooShort = ::kLobErrorMachDragTableTooShort , lob::kMassOOR = ::kLobErrorMassOOR , lob::kMaximumTimeOOR = ::kLobErrorMaximumTimeOOR , lob::kMeplatDiameterOOR = ::kLobErrorMeplatDiameterOOR ,
  lob::kNoseLengthOOR = ::kLobErrorNoseLengthOOR , lob::kNotFormed = ::kLobErrorNotFormed , lob::kOgiveRtROOR = ::kLobErrorOgiveRtROOR , lob::kRangeAngleOOR = ::kLobErrorRangeAngleOOR ,
  lob::kTailLengthOOR = ::kLobErrorTailLengthOOR , lob::kWindHeadingOOR = ::kLobErrorWindHeadingOOR , lob::kZeroAngleOOR = ::kLobErrorZeroAngleOOR , lob::kZeroDataRequired = ::kLobErrorZeroDataRequired ,
  lob::kZeroDistanceOOR = ::kLobErrorZeroDistanceOOR , lob::kZeroUnreachable = ::kLobErrorZeroUnreachable
}
 Error codes returned by the builder. More...
 

Functions

bool lob::operator== (::LobErrorT a, ErrorT b) noexcept
 
bool lob::operator!= (::LobErrorT a, ErrorT b) noexcept
 
bool lob::operator== (ErrorT a, ::LobErrorT b) noexcept
 
bool lob::operator!= (ErrorT a, ::LobErrorT b) noexcept
 
size_t lob::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.
 
template<size_t N>
size_t lob::Solve (const Context &ctx, const std::array< uint32_t, N > &ranges, std::array< Output, N > *pouts)
 Solves the exterior ballistics problem for a given set of ranges. Results contain a forward-solution.
 
size_t lob::Solve (const Context &ctx, uint32_t range, Output *pout)
 Solves the exterior ballistics problem for a single range. Results contain a forward-solution.
 
size_t lob::FastInverse (const Context &ctx, Output *pouts, size_t size)
 Converts forward-solution output to inverse-solution adjustments.
 
template<size_t N>
size_t lob::FastInverse (const Context &ctx, std::array< Output, N > *pouts)
 Converts forward-solution output to inverse-solution adjustments.
 
size_t lob::FastInverse (const Context &ctx, Output *pout)
 Converts forward-solution output to inverse-solution adjustments for a single output.
 
size_t lob::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.
 
template<size_t N>
size_t lob::SolveInverse (const Context &ctx, const std::array< uint32_t, N > &ranges, std::array< Output, N > *pouts)
 Solves the exterior ballistics problem for a given set of ranges. Results contain an inverse-solution.
 
size_t lob::SolveInverse (const Context &ctx, uint32_t range, Output *pout)
 Solves the exterior ballistics problem for a single range. Results contain an inverse-solution.
 
const char * lob::Version ()
 Gets the library version in major.minor.patch format.
 
double lob::MoaToMil (double value)
 Converts minutes of angle (MOA) to milliradians (MIL).
 
double lob::MoaToDeg (double value)
 Converts minutes of angle (MOA) to degrees.
 
double lob::MoaToIphy (double value)
 Converts minutes of angle (MOA) to inches per hundred yards (IPHY).
 
double lob::MoaToInch (double value, double range_ft)
 Converts minutes of angle (MOA) to projected inches at a given range in feet.
 
double lob::MilToMoa (double value)
 Converts milliradians (MIL) to minutes of angle (MOA).
 
double lob::MilToDeg (double value)
 Converts milliradians (MIL) to degrees.
 
double lob::MilToIphy (double value)
 Converts milliradians (MIL) to inches per hundred yards (IPHY).
 
double lob::MilToInch (double value, double range_ft)
 Converts milliradians (MIL) to projected inches at a given range in feet.
 
double lob::DegToMoa (double value)
 Converts degrees to minutes of angle (MOA).
 
double lob::DegToMil (double value)
 Converts degrees to milliradians (MIL).
 
double lob::InchToMoa (double value, double range_ft)
 Inches of projection at a given range to minutes of angle (MOA).
 
double lob::InchToMil (double value, double range_ft)
 Inches of projection at a given range to milliradians (MIL).
 
double lob::InchToDeg (double value, double range_ft)
 Inches of projection at a given range to degrees.
 
double lob::JToFtLbs (double value)
 Converts joules to foot-pounds.
 
double lob::FtLbsToJ (double value)
 Converts foot-pounds to joules.
 
double lob::MToYd (double value)
 Converts meters to yards.
 
double lob::YdToFt (double value)
 Converts yards to feet.
 
double lob::MToFt (double value)
 Converts meters to feet.
 
double lob::FtToIn (double value)
 Converts feet to inches.
 
double lob::MmToIn (double value)
 Converts millimeters to inches.
 
double lob::CmToIn (double value)
 Converts centimeters to inches.
 
double lob::YdToM (double value)
 Converts yards to meters.
 
double lob::FtToM (double value)
 Converts feet to meters.
 
double lob::FtToYd (double value)
 Converts feet to yards.
 
double lob::InToMm (double value)
 Converts inches to millimeters.
 
double lob::InToCm (double value)
 Converts inches to centimeters.
 
double lob::InToFt (double value)
 Converts inches to feet.
 
double lob::PaToInHg (double value)
 Converts pascals to inches of mercury.
 
double lob::MbarToInHg (double value)
 Converts millibars to inches of mercury.
 
double lob::PsiToInHg (double value)
 Converts pounds per square inch (PSI) to inches of mercury.
 
double lob::LbsToGrain (double value)
 Converts pounds to grains.
 
double lob::GToGrain (double value)
 Converts grams to grains.
 
double lob::KgToGrain (double value)
 Converts kilograms to grains.
 
double lob::KgSqMToPmsi (double value)
 Converts kilograms per square meter to pounds mass per square inch.
 
double lob::FpsToMps (double value)
 Converts feet per second to meters per second.
 
double lob::MpsToFps (double value)
 Converts meters per second to feet per second.
 
double lob::KphToMph (double value)
 Converts kilometers per hour to miles per hour.
 
double lob::KnToMph (double value)
 Converts Knots to miles per hour.
 
double lob::MsToS (double value)
 Converts milliseconds to seconds.
 
double lob::UsToS (double value)
 Converts microseconds to seconds.
 
double lob::SToMs (double value)
 Converts seconds to milliseconds.
 
double lob::SToUs (double value)
 Converts seconds to microseconds.
 
double lob::DegCToDegF (double value)
 Converts degrees celsius to degrees fahrenheit.
 

Variables

constexpr size_t lob::kLobBuilderBufferSize = 272
 The size in bytes of the builder buffer.
 
constexpr size_t lob::kLobCoeffsSize = 15 * static_cast<size_t>(4)
 The size of spline coeffs in Context.