Function library used for projectile prediction and missile interception calculations.
More...
#include <BPFunLib_Ballistic.h>
|
| static FBallisticObject | DiscreteStep (const FBallisticObject &Ob, const float DeltaStep) |
| | Single iterative step.
|
| static FBallisticObject | AutoStep (const FBallisticObject &Ob, const float PredictTime, const float DeltaStep) |
| | Predict multiple steps in loop. Optimized for AirDrag=0, see details...
|
| static bool | Intercept_Linear (const FVector &TargetPosition, const FVector &TargetVelocity, double InterceptSpeed, FVector &HitLocation, double &HitTime) |
| | Prediction function for linear objects. Works only for objects with constant speeds, can not accelerate or be affected by air resistance.
|
| static bool | Intercept_Dynamic (const FBallisticObject &Target, const FBallisticInterceptor Interceptor, double MaxQueryTime, double StepTime, double AccurateStepTime, FVector &HitLocation, double &HitTime) |
| | Prediction function for objects with variable speed and resistance.
|
Function library used for projectile prediction and missile interception calculations.
◆ AutoStep()
Predict multiple steps in loop. Optimized for AirDrag=0, see details...
- Parameters
-
| Ob | Struct with ballistic parameters |
| PredictTime | TimeRange to predict |
| DeltaStep | Single calculation time. Keep in small range <0.01, 1> (for accuracy). Used only when calculating air drag. |
- Returns
- New Object state
- Note
- Normally function uses DiscreteStep, but switchest to fast calculation when AirDrag is 0, effectively being O(1)
-
YasiuMath::Ballistics::ProjectileDynamicState::AutoStep
◆ DiscreteStep()
Single iterative step.
- Parameters
-
| Ob | Struct with ballistic parameters |
| DeltaStep | Single calculation time. Keep in small range <0.01, 1> (for accuracy) |
- Returns
- New Object state
◆ Intercept_Dynamic()
| bool UYasiuMathFL_Ballistics::Intercept_Dynamic |
( |
const FBallisticObject & | Target, |
|
|
const FBallisticInterceptor | Interceptor, |
|
|
double | MaxQueryTime, |
|
|
double | StepTime, |
|
|
double | AccurateStepTime, |
|
|
FVector & | HitLocation, |
|
|
double & | HitTime ) |
|
static |
Prediction function for objects with variable speed and resistance.
- Parameters
-
| Target | Struct with dynamic parameters of target |
| Interceptor | Struct with dynamic parameters of interceptor |
| MaxQueryTime | Time range used to find solution. |
| StepTime | Single calculation time. Keep in small range <0.1, 1> (for accuracy, but can use higher values). |
| AccurateStepTime | Accurate step time to reduce overshoot error. 0=Ignore |
| HitLocation | Output intercept location |
| HitTime | Estimated time to hit |
- Returns
- Flag indicating if output location is valid.
◆ Intercept_Linear()
| bool UYasiuMathFL_Ballistics::Intercept_Linear |
( |
const FVector & | TargetPosition, |
|
|
const FVector & | TargetVelocity, |
|
|
double | InterceptSpeed, |
|
|
FVector & | HitLocation, |
|
|
double & | HitTime ) |
|
static |
Prediction function for linear objects. Works only for objects with constant speeds, can not accelerate or be affected by air resistance.
- Parameters
-
| TargetPosition | Target input position |
| TargetVelocity | Target input velocity |
| InterceptSpeed | Interceptor speed in any direction |
| HitLocation | Output intercept location |
| HitTime | |
- Returns
- Flag indicating if output location is valid.
The documentation for this class was generated from the following file: