VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
makVrv::DtBallisticSolver Class Reference

Solves inverse ballistic problems: computes firing solutions to reach or intercept targets.

All methods are stateless; no internal state is modified between calls.

Public Member Functions

 DtBallisticSolver ()
 
virtual ~DtBallisticSolver ()
 
virtual DtBallisticSolveError solveFiringAngle (const dvec3 &firingPosition, const dvec3 &targetPosition, const DtBulletDefinition &bullet, const DtBallisticEnvironment &env, std::vector< DtFiringSolution > &solutions, const float64 minElevationAngle=-DtMath::PI/2.0, const float64 maxElevationAngle=DtMath::PI/2.0, const DtCoordinateFrame *weaponFrame=nullptr)
 
virtual DtBallisticSolveError solveInterceptTrajectory (const dvec3 &firingPosition, const dvec3 &targetPosition, const dvec3 &targetVelocity, const DtBulletDefinition &bullet, const DtBallisticEnvironment &env, DtFiringSolution &solution, const float64 minElevationAngle=-DtMath::PI/2.0, const float64 maxElevationAngle=DtMath::PI/2.0, const DtCoordinateFrame *weaponFrame=nullptr)
 
virtual DtBallisticSolveError optimalSolution (const dvec3 &firingPosition, const dvec3 &targetPosition, const DtBulletDefinition &bullet, const DtBallisticEnvironment &env, DtFiringSolution &solution, const float64 minElevationAngle=-DtMath::PI/2.0, const float64 maxElevationAngle=DtMath::PI/2.0, const DtCoordinateFrame *weaponFrame=nullptr)
 
virtual bool isTargetReachable (const dvec3 &firingPosition, const dvec3 &targetPosition, double muzzleVelocity, const DtBallisticEnvironment &env, const DtCoordinateFrame *weaponFrame=nullptr)
 

Constructor & Destructor Documentation

makVrv::DtBallisticSolver::DtBallisticSolver ( )

Default constructor.

virtual makVrv::DtBallisticSolver::~DtBallisticSolver ( )
virtual

Virtual destructor.

Member Function Documentation

virtual DtBallisticSolveError makVrv::DtBallisticSolver::solveFiringAngle ( const dvec3 &  firingPosition,
const dvec3 &  targetPosition,
const DtBulletDefinition &  bullet,
const DtBallisticEnvironment &  env,
std::vector< DtFiringSolution > &  solutions,
const float64  minElevationAngle = -DtMath::PI/2.0,
const float64  maxElevationAngle = DtMath::PI/2.0,
const DtCoordinateFrame *  weaponFrame = nullptr 
)
virtual

Computes all valid firing solutions to hit a stationary target.

May produce zero solutions if the target is out of range, or up to two solutions corresponding to low-arc and high-arc trajectories.

Parameters
firingPositionWorld-space position of the weapon.
targetPositionWorld-space position of the target.
bulletProjectile characteristics.
envEnvironmental conditions (gravity and wind).
solutionsOutput vector populated with valid firing solutions (0-2 elements).
minElevationAngleMinimum allowed elevation angle for the weapon.
maxElevationAngleMaximum allowed elevation angle for the weapon.
weaponFrameOptional coordinate frame for the weapon; nullptr uses the environment frame.
Returns
DtBallisticSolveError::Success when at least one solution is found, or a specific error code explaining why no solution could be computed.
virtual DtBallisticSolveError makVrv::DtBallisticSolver::solveInterceptTrajectory ( const dvec3 &  firingPosition,
const dvec3 &  targetPosition,
const dvec3 &  targetVelocity,
const DtBulletDefinition &  bullet,
const DtBallisticEnvironment &  env,
DtFiringSolution &  solution,
const float64  minElevationAngle = -DtMath::PI/2.0,
const float64  maxElevationAngle = DtMath::PI/2.0,
const DtCoordinateFrame *  weaponFrame = nullptr 
)
virtual

Computes a firing solution to intercept a moving target.

Accounts for target velocity to compute a lead angle.

Parameters
firingPositionWorld-space position of the weapon.
targetPositionCurrent world-space position of the target.
targetVelocityVelocity vector of the moving target.
bulletProjectile characteristics.
envEnvironmental conditions.
solutionOutput firing solution for intercepting the target.
minElevationAngleMinimum allowed elevation angle for the weapon.
maxElevationAngleMaximum allowed elevation angle for the weapon.
weaponFrameOptional coordinate frame for the weapon; nullptr uses the environment frame.
Returns
DtBallisticSolveError::Success when an intercept solution is found, or a specific error code explaining why no solution could be computed.
virtual DtBallisticSolveError makVrv::DtBallisticSolver::optimalSolution ( const dvec3 &  firingPosition,
const dvec3 &  targetPosition,
const DtBulletDefinition &  bullet,
const DtBallisticEnvironment &  env,
DtFiringSolution &  solution,
const float64  minElevationAngle = -DtMath::PI/2.0,
const float64  maxElevationAngle = DtMath::PI/2.0,
const DtCoordinateFrame *  weaponFrame = nullptr 
)
virtual

Returns the preferred firing solution for hitting a stationary target.

Selects from the available solutions returned by solveFiringAngle().

Parameters
firingPositionWorld-space position of the weapon.
targetPositionWorld-space position of the target.
bulletProjectile characteristics.
envEnvironmental conditions.
solutionOutput preferred firing solution.
minElevationAngleMinimum allowed elevation angle for the weapon.
maxElevationAngleMaximum allowed elevation angle for the weapon.
weaponFrameOptional coordinate frame for the weapon; nullptr uses the environment frame.
Returns
DtBallisticSolveError::Success when a preferred solution is found, or a specific error code explaining why no solution could be computed.
virtual bool makVrv::DtBallisticSolver::isTargetReachable ( const dvec3 &  firingPosition,
const dvec3 &  targetPosition,
double  muzzleVelocity,
const DtBallisticEnvironment &  env,
const DtCoordinateFrame *  weaponFrame = nullptr 
)
virtual

Returns true if any valid firing solution exists to reach the target.

Parameters
firingPositionWorld-space position of the weapon.
targetPositionWorld-space position of the target.
muzzleVelocityInitial projectile speed.
envEnvironmental conditions.
weaponFrameOptional coordinate frame for the weapon; nullptr uses the environment frame.
Returns
True if the target is within ballistic range.

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)