#include <stddef.h>#include <stdint.h>#include "lob/lob_export.hpp"Go to the source code of this file.
Classes | |
| struct | LobGravity |
| Gravity vector. More... | |
| struct | LobWind |
| Wind vector. More... | |
| struct | LobCoriolis |
| Coriolis effect parameters. More... | |
| struct | LobInput |
| Structure of input parameters consumed by the solver. More... | |
| struct | LobOutput |
| Structure holding the output results of a ballistic calculation. More... | |
| struct | LobBuilder |
| Opaque builder type for constructing LobInput objects. More... | |
Macros | |
| #define | LOB_TABLE_SIZE 85 |
| The number of entries in a drag table. | |
| #define | LOB_BUILDER_BUFFER_SIZE 576 |
| The size in bytes of the builder buffer. | |
Typedefs | |
| typedef uint8_t | LobDragFunctionT |
| Drag function type. | |
| typedef uint8_t | LobAtmosphereReferenceT |
| Atmosphere reference type. | |
| typedef uint8_t | LobClockAngleT |
| Clock angle positions for wind direction. | |
| typedef uint8_t | LobErrorT |
| Error codes returned by the builder. | |
Functions | |
| LOB_EXPORT const char * | LobVersion (void) |
| Gets the library version in major.minor.patch format. | |
| LOB_EXPORT void | LobBuilderInit (LobBuilder *builder) |
| Initializes a builder to default state. | |
| LOB_EXPORT void | LobBuilderDestroy (LobBuilder *builder) |
| Destroys a builder and releases resources. | |
| LOB_EXPORT void | LobBuilderCopy (LobBuilder *dst, const LobBuilder *src) |
| Copies builder state from src to dst. | |
| LOB_EXPORT LobBuilder * | LobBuilderReset (LobBuilder *builder) |
| Resets a builder state by re-initializing. | |
| LOB_EXPORT LobBuilder * | LobBuilderBallisticCoefficientPsi (LobBuilder *builder, double value) |
| Sets the ballistic coefficient (Psi). | |
| LOB_EXPORT LobBuilder * | LobBuilderBCAtmosphere (LobBuilder *builder, LobAtmosphereReferenceT type) |
| Sets the atmosphere reference associated with ballistic coefficient. | |
| LOB_EXPORT LobBuilder * | LobBuilderBCDragFunction (LobBuilder *builder, LobDragFunctionT type) |
| Sets the drag function associated with ballistic coefficient. | |
| LOB_EXPORT LobBuilder * | LobBuilderDiameterInch (LobBuilder *builder, double value) |
| Sets the projectile diameter (caliber) in inches. | |
| LOB_EXPORT LobBuilder * | LobBuilderMeplatDiameterInch (LobBuilder *builder, double value) |
| Sets the projectile meplat diameter in inches. | |
| LOB_EXPORT LobBuilder * | LobBuilderBaseDiameterInch (LobBuilder *builder, double value) |
| Sets the projectile base diameter in inches. | |
| LOB_EXPORT LobBuilder * | LobBuilderLengthInch (LobBuilder *builder, double value) |
| Sets the projectile length in inches. | |
| LOB_EXPORT LobBuilder * | LobBuilderNoseLengthInch (LobBuilder *builder, double value) |
| Sets the projectile nose length in inches. | |
| LOB_EXPORT LobBuilder * | LobBuilderTailLengthInch (LobBuilder *builder, double value) |
| Sets the projectile tail length in inches. | |
| LOB_EXPORT LobBuilder * | LobBuilderOgiveRtR (LobBuilder *builder, double value) |
| Sets the Rt/R ratio of the projectile ogive. | |
| LOB_EXPORT LobBuilder * | LobBuilderMachVsDragTable (LobBuilder *builder, const float *pmachs, const float *pdrags, size_t size) |
| Loads a custom Mach vs Drag table for the projectile. | |
| LOB_EXPORT LobBuilder * | LobBuilderMassGrains (LobBuilder *builder, double value) |
| Sets the projectile mass in grains. | |
| LOB_EXPORT LobBuilder * | LobBuilderInitialVelocityFps (LobBuilder *builder, uint16_t value) |
| Sets the initial velocity of the projectile in feet per second. | |
| LOB_EXPORT LobBuilder * | LobBuilderOpticHeightInches (LobBuilder *builder, double value) |
| Sets the height of the optic above the bore in inches. | |
| LOB_EXPORT LobBuilder * | LobBuilderTwistInchesPerTurn (LobBuilder *builder, double value) |
| Sets the twist rate of the barrel in inches per turn. | |
| LOB_EXPORT LobBuilder * | LobBuilderZeroAngleMOA (LobBuilder *builder, double value) |
| Sets the angle between the sight and launch angle used to achieve zero. | |
| LOB_EXPORT LobBuilder * | LobBuilderZeroDistanceYds (LobBuilder *builder, double value) |
| Sets the zero distance in yards. | |
| LOB_EXPORT LobBuilder * | LobBuilderZeroImpactHeightInches (LobBuilder *builder, double value) |
| Sets the zero impact height in inches. | |
| LOB_EXPORT LobBuilder * | LobBuilderAltitudeOfFiringSiteFt (LobBuilder *builder, double value) |
| Sets the altitude of the firing site in feet. | |
| LOB_EXPORT LobBuilder * | LobBuilderAirPressureInHg (LobBuilder *builder, double value) |
| Sets the air pressure in inches of mercury (inHg). | |
| LOB_EXPORT LobBuilder * | LobBuilderAltitudeOfBarometerFt (LobBuilder *builder, double value) |
| Sets the altitude of the location where air pressure was taken in feet. | |
| LOB_EXPORT LobBuilder * | LobBuilderTemperatureDegF (LobBuilder *builder, double value) |
| Sets the temperature in degrees Fahrenheit. | |
| LOB_EXPORT LobBuilder * | LobBuilderAltitudeOfThermometerFt (LobBuilder *builder, double value) |
| Sets the altitude of the location where temperature was taken in feet. | |
| LOB_EXPORT LobBuilder * | LobBuilderRelativeHumidityPercent (LobBuilder *builder, double value) |
| Sets the relative humidity at the firing site in percent. | |
| LOB_EXPORT LobBuilder * | LobBuilderWindHeading (LobBuilder *builder, LobClockAngleT value) |
| Sets the wind heading using a clock angle. | |
| LOB_EXPORT LobBuilder * | LobBuilderWindHeadingDeg (LobBuilder *builder, double value) |
| Sets the wind heading in degrees. | |
| LOB_EXPORT LobBuilder * | LobBuilderWindSpeedFps (LobBuilder *builder, double value) |
| Sets the wind speed in feet per second. | |
| LOB_EXPORT LobBuilder * | LobBuilderWindSpeedMph (LobBuilder *builder, double value) |
| Sets the wind speed in miles per hour. | |
| LOB_EXPORT LobBuilder * | LobBuilderAzimuthDeg (LobBuilder *builder, double value) |
| Sets the azimuth (bearing) of the target in degrees. | |
| LOB_EXPORT LobBuilder * | LobBuilderLatitudeDeg (LobBuilder *builder, double value) |
| Sets the latitude of the firing location in degrees. | |
| LOB_EXPORT LobBuilder * | LobBuilderRangeAngleDeg (LobBuilder *builder, double value) |
| Sets the range angle (inclination) to the target in degrees. | |
| LOB_EXPORT LobBuilder * | LobBuilderMinimumSpeed (LobBuilder *builder, uint16_t value) |
| Sets the minimum speed threshold for the solver. | |
| LOB_EXPORT LobBuilder * | LobBuilderMinimumEnergy (LobBuilder *builder, uint16_t value) |
| Sets the minimum energy threshold for the solver. | |
| LOB_EXPORT LobBuilder * | LobBuilderMaximumTime (LobBuilder *builder, double value) |
| Sets the maximum time of flight for the solver. | |
| LOB_EXPORT LobBuilder * | LobBuilderStepSize (LobBuilder *builder, uint16_t value) |
| Sets the step size for the numerical solver. | |
| LOB_EXPORT LobInput | LobBuilderBuild (LobBuilder *builder) |
| Builds the LobInput object with the configured parameters. | |
| LOB_EXPORT size_t | LobSolve (const LobInput *in, const uint32_t *pranges, LobOutput *pouts, size_t size) |
| Solves the exterior ballistics problem for a given set of ranges. | |
| LOB_EXPORT double | LobMoaToMil (double value) |
| Converts minutes of angle (MOA) to milliradians (MIL). | |
| LOB_EXPORT double | LobMoaToDeg (double value) |
| Converts minutes of angle (MOA) to degrees. | |
| LOB_EXPORT double | LobMoaToIphy (double value) |
| Converts minutes of angle (MOA) to inches per hundred yards (IPHY). | |
| LOB_EXPORT double | LobMoaToInch (double value, double range_ft) |
| Converts minutes of angle (MOA) to projected inches at a given range in feet. | |
| LOB_EXPORT double | LobMilToMoa (double value) |
| Converts milliradians (MIL) to minutes of angle (MOA). | |
| LOB_EXPORT double | LobMilToDeg (double value) |
| Converts milliradians (MIL) to degrees. | |
| LOB_EXPORT double | LobMilToIphy (double value) |
| Converts milliradians (MIL) to inches per hundred yards (IPHY). | |
| LOB_EXPORT double | LobMilToInch (double value, double range_ft) |
| Converts milliradians (MIL) to projected inches at a given range in feet. | |
| LOB_EXPORT double | LobDegToMoa (double value) |
| Converts degrees to minutes of angle (MOA). | |
| LOB_EXPORT double | LobDegToMil (double value) |
| Converts degrees to milliradians (MIL). | |
| LOB_EXPORT double | LobInchToMoa (double value, double range_ft) |
| Inches of projection at a given range to minutes of angle (MOA). | |
| LOB_EXPORT double | LobInchToMil (double value, double range_ft) |
| Inches of projection at a given range to milliradians (MIL). | |
| LOB_EXPORT double | LobInchToDeg (double value, double range_ft) |
| Inches of projection at a given range to degrees. | |
| LOB_EXPORT double | LobJToFtLbs (double value) |
| Converts joules to foot-pounds. | |
| LOB_EXPORT double | LobFtLbsToJ (double value) |
| Converts foot-pounds to joules. | |
| LOB_EXPORT double | LobMToYd (double value) |
| Converts meters to yards. | |
| LOB_EXPORT double | LobYdToFt (double value) |
| Converts yards to feet. | |
| LOB_EXPORT double | LobMToFt (double value) |
| Converts meters to feet. | |
| LOB_EXPORT double | LobFtToIn (double value) |
| Converts feet to inches. | |
| LOB_EXPORT double | LobMmToIn (double value) |
| Converts millimeters to inches. | |
| LOB_EXPORT double | LobCmToIn (double value) |
| Converts centimeters to inches. | |
| LOB_EXPORT double | LobYdToM (double value) |
| Converts yards to meters. | |
| LOB_EXPORT double | LobFtToM (double value) |
| Converts feet to meters. | |
| LOB_EXPORT double | LobFtToYd (double value) |
| Converts feet to yards. | |
| LOB_EXPORT double | LobInToMm (double value) |
| Converts inches to millimeters. | |
| LOB_EXPORT double | LobInToCm (double value) |
| Converts inches to centimeters. | |
| LOB_EXPORT double | LobInToFt (double value) |
| Converts inches to feet. | |
| LOB_EXPORT double | LobPaToInHg (double value) |
| Converts pascals to inches of mercury. | |
| LOB_EXPORT double | LobMbarToInHg (double value) |
| Converts millibars to inches of mercury. | |
| LOB_EXPORT double | LobPsiToInHg (double value) |
| Converts pounds per square inch (PSI) to inches of mercury. | |
| LOB_EXPORT double | LobLbsToGrain (double value) |
| Converts pounds to grains. | |
| LOB_EXPORT double | LobGToGrain (double value) |
| Converts grams to grains. | |
| LOB_EXPORT double | LobKgToGrain (double value) |
| Converts kilograms to grains. | |
| LOB_EXPORT double | LobKgSqMToPmsi (double value) |
| Converts kilograms per square meter to pounds mass per square inch. | |
| LOB_EXPORT double | LobFpsToMps (double value) |
| Converts feet per second to meters per second. | |
| LOB_EXPORT double | LobMpsToFps (double value) |
| Converts meters per second to feet per second. | |
| LOB_EXPORT double | LobKphToMph (double value) |
| Converts kilometers per hour to miles per hour. | |
| LOB_EXPORT double | LobKnToMph (double value) |
| Converts Knots to miles per hour. | |
| LOB_EXPORT double | LobMsToS (double value) |
| Converts milliseconds to seconds. | |
| LOB_EXPORT double | LobUsToS (double value) |
| Converts microseconds to seconds. | |
| LOB_EXPORT double | LobSToMs (double value) |
| Converts seconds to milliseconds. | |
| LOB_EXPORT double | LobSToUs (double value) |
| Converts seconds to microseconds. | |
| LOB_EXPORT double | LobDegCToDegF (double value) |
| Converts degrees celsius to degrees fahrenheit. | |
| #define LOB_BUILDER_BUFFER_SIZE 576 |
The size in bytes of the builder buffer.
| #define LOB_TABLE_SIZE 85 |
The number of entries in a drag table.
| typedef uint8_t LobAtmosphereReferenceT |
Atmosphere reference type.
| typedef uint8_t LobClockAngleT |
Clock angle positions for wind direction.
| typedef uint8_t LobDragFunctionT |
Drag function type.
| typedef uint8_t LobErrorT |
Error codes returned by the builder.
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
|
extern |
Sets the air pressure in inches of mercury (inHg).
| builder | Pointer to the builder. |
| value | The air pressure in inHg. |
|
extern |
Sets the altitude of the location where air pressure was taken in feet.
| builder | Pointer to the builder. |
| value | The altitude in feet. |
|
extern |
Sets the altitude of the firing site in feet.
| builder | Pointer to the builder. |
| value | The altitude in feet. |
|
extern |
Sets the altitude of the location where temperature was taken in feet.
| builder | Pointer to the builder. |
| value | The altitude in feet. |
|
extern |
Sets the azimuth (bearing) of the target in degrees.
| builder | Pointer to the builder. |
| value | The azimuth in degrees. |
|
extern |
Sets the ballistic coefficient (Psi).
| builder | Pointer to the builder. |
| value | The ballistic coefficient value. |
|
extern |
Sets the projectile base diameter in inches.
| builder | Pointer to the builder. |
| value | The base diameter in inches. |
|
extern |
Sets the atmosphere reference associated with ballistic coefficient.
| builder | Pointer to the builder. |
| type | The atmosphere reference type. |
|
extern |
Sets the drag function associated with ballistic coefficient.
| builder | Pointer to the builder. |
| type | The drag function type. |
|
extern |
|
extern |
Copies builder state from src to dst.
|
extern |
Destroys a builder and releases resources.
|
extern |
Sets the projectile diameter (caliber) in inches.
| builder | Pointer to the builder. |
| value | The diameter in inches. |
|
extern |
Initializes a builder to default state.
|
extern |
Sets the initial velocity of the projectile in feet per second.
| builder | Pointer to the builder. |
| value | The initial velocity in fps. |
|
extern |
Sets the latitude of the firing location in degrees.
| builder | Pointer to the builder. |
| value | The latitude in degrees. |
|
extern |
Sets the projectile length in inches.
| builder | Pointer to the builder. |
| value | The length in inches. |
|
extern |
Loads a custom Mach vs Drag table for the projectile.
| builder | Pointer to the builder. |
| 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. |
|
extern |
Sets the projectile mass in grains.
| builder | Pointer to the builder. |
| value | The mass in grains. |
|
extern |
Sets the maximum time of flight for the solver.
| builder | Pointer to the builder. |
| value | The maximum time in seconds after which the solver will stop calculations. |
|
extern |
Sets the projectile meplat diameter in inches.
| builder | Pointer to the builder. |
| value | The meplat in inches. |
|
extern |
Sets the minimum energy threshold for the solver.
| builder | Pointer to the builder. |
| value | The minimum energy in foot-pounds (ft*lbf) at which the solver will stop calculations. |
|
extern |
Sets the minimum speed threshold for the solver.
| builder | Pointer to the builder. |
| value | The minimum speed in feet per second (fps) at which the solver will stop calculations. |
|
extern |
Sets the projectile nose length in inches.
| builder | Pointer to the builder. |
| value | The nose length in inches. |
|
extern |
Sets the Rt/R ratio of the projectile ogive.
| builder | Pointer to the builder. |
| value | The Rt/R ratio. |
|
extern |
Sets the height of the optic above the bore in inches.
| builder | Pointer to the builder. |
| value | The optic height in inches. |
|
extern |
Sets the range angle (inclination) to the target in degrees.
| builder | Pointer to the builder. |
| value | The range angle in degrees. |
|
extern |
Sets the relative humidity at the firing site in percent.
| builder | Pointer to the builder. |
| value | The relative humidity in percent. |
|
extern |
Resets a builder state by re-initializing.
|
extern |
Sets the step size for the numerical solver.
| builder | Pointer to the builder. |
| value | The time step size in microseconds used by the solver. |
|
extern |
Sets the projectile tail length in inches.
| builder | Pointer to the builder. |
| value | The tail length in inches. |
|
extern |
Sets the temperature in degrees Fahrenheit.
| builder | Pointer to the builder. |
| value | The temperature in degrees F. |
|
extern |
Sets the twist rate of the barrel in inches per turn.
| builder | Pointer to the builder. |
| value | The twist rate in inches per turn. |
|
extern |
Sets the wind heading using a clock angle.
| builder | Pointer to the builder. |
| value | The wind heading as a clock angle. |
|
extern |
Sets the wind heading in degrees.
| builder | Pointer to the builder. |
| value | The wind heading in degrees. |
|
extern |
Sets the wind speed in feet per second.
| builder | Pointer to the builder. |
| value | The wind speed in fps. |
|
extern |
Sets the wind speed in miles per hour.
| builder | Pointer to the builder. |
| value | The wind speed in mph. |
|
extern |
Sets the angle between the sight and launch angle used to achieve zero.
| builder | Pointer to the builder. |
| value | The zero angle in MOA. |
|
extern |
Sets the zero distance in yards.
| builder | Pointer to the builder. |
| value | The zero distance in yards. |
|
extern |
Sets the zero impact height in inches.
| builder | Pointer to the builder. |
| value | The zero impact height in inches. |
|
extern |
Converts centimeters to inches.
| value | Length in centimeters. |
|
extern |
Converts degrees celsius to degrees fahrenheit.
| value | Temperature in degrees celsius. |
|
extern |
Converts degrees to milliradians (MIL).
| value | Angle in degrees. |
|
extern |
Converts degrees to minutes of angle (MOA).
| value | Angle in degrees. |
|
extern |
Converts feet per second to meters per second.
| value | Speed in feet per second. |
|
extern |
Converts foot-pounds to joules.
| value | Energy in foot-pounds. |
|
extern |
Converts feet to inches.
| value | Length in feet. |
|
extern |
Converts feet to meters.
| value | Length in feet. |
|
extern |
Converts feet to yards.
| value | Length in feet. |
|
extern |
Converts grams to grains.
| value | Mass in grams. |
|
extern |
Inches of projection at a given range to degrees.
| value | Projected inches. |
| range_ft | Range in feet. |
|
extern |
Inches of projection at a given range to milliradians (MIL).
| value | Projected inches. |
| range_ft | Range in feet. |
|
extern |
Inches of projection at a given range to minutes of angle (MOA).
| value | Projected inches. |
| range_ft | Range in feet. |
|
extern |
Converts inches to centimeters.
| value | Length in inches. |
|
extern |
Converts inches to feet.
| value | Length in inches. |
|
extern |
Converts inches to millimeters.
| value | Length in inches. |
|
extern |
Converts joules to foot-pounds.
| value | Energy in joules. |
|
extern |
Converts kilograms per square meter to pounds mass per square inch.
| value | Sectional density in Kg/m^2. |
|
extern |
Converts kilograms to grains.
| value | Mass in kilograms. |
|
extern |
Converts Knots to miles per hour.
| value | Speed in Knots. |
|
extern |
Converts kilometers per hour to miles per hour.
| value | Speed in kilometers per hour. |
|
extern |
Converts pounds to grains.
| value | Mass in pounds. |
|
extern |
Converts millibars to inches of mercury.
| value | Pressure in millibars. |
|
extern |
Converts milliradians (MIL) to degrees.
| value | Angle in MIL. |
|
extern |
Converts milliradians (MIL) to projected inches at a given range in feet.
| value | Angle in MIL. |
| range_ft | Range in feet. |
|
extern |
Converts milliradians (MIL) to inches per hundred yards (IPHY).
| value | Angle in MIL. |
|
extern |
Converts milliradians (MIL) to minutes of angle (MOA).
| value | Angle in MIL. |
|
extern |
Converts millimeters to inches.
| value | Length in millimeters. |
|
extern |
Converts minutes of angle (MOA) to degrees.
| value | Angle in MOA. |
|
extern |
Converts minutes of angle (MOA) to projected inches at a given range in feet.
| value | Angle in MOA. |
| range_ft | Range in feet. |
|
extern |
Converts minutes of angle (MOA) to inches per hundred yards (IPHY).
| value | Angle in MOA. |
|
extern |
Converts minutes of angle (MOA) to milliradians (MIL).
| value | Angle in MOA. |
|
extern |
Converts meters per second to feet per second.
| value | Speed in meters per second. |
|
extern |
Converts milliseconds to seconds.
| value | Time in milliseconds. |
|
extern |
Converts meters to feet.
| value | Length in meters. |
|
extern |
Converts meters to yards.
| value | Length in meters. |
|
extern |
Converts pascals to inches of mercury.
| value | Pressure in pascals. |
|
extern |
Converts pounds per square inch (PSI) to inches of mercury.
| value | Pressure in PSI. |
|
extern |
Solves the exterior ballistics problem for a given set of ranges.
| in | Pointer to input parameters for the calculation. |
| pranges | Pointer to an array of ranges (in feet) to solve for. |
| pouts | Pointer to an array where the output results will be stored. |
| size | The number of ranges to solve for. |
|
extern |
Converts seconds to milliseconds.
| value | Time in seconds. |
|
extern |
Converts seconds to microseconds.
| value | Time in seconds. |
|
extern |
Converts microseconds to seconds.
| value | Time in microseconds. |
|
extern |
Gets the library version in major.minor.patch format.
|
extern |
Converts yards to feet.
| value | Length in yards. |
|
extern |
Converts yards to meters.
| value | Length in yards. |