|
WSF
|
Enumerations | |
| enum | WeaponType { nowepn = 0 , kndsrm = 1 , kndmrm = 2 , kndlrm = 3 , kndmis = 3 , kndgun = 4 , knddew = 5 , kndwpn = 5 } |
| enum | ManeuverValueComponentType { i_voffef = 1 , i_vlospd = 2 , i_vform = 3 , i_compr = 4 , i_valdfx = 5 , i_gaval = 6 , i_vvec = 7 , i_villum = 8 , i_vmusup = 9 , i_valevd = 10 , i_vmaim = 11 , i_vdisng = 12 , i_sepval = 13 , i_vescrt = 14 , i_vsamz = 15 , i_vavbdd = 16 , i_hddval = 17 , i_terrval = 18 , i_vdew = 19 , i_vtpt = 20 } |
| enum | MissileModeState { NOTASK = 0 , INTERCEPT = 1 , AIMFIRE = 2 , ILLUMINATE = 3 } |
| enum | WeaponSeekerType { mxskr = 4 , irskr = 1 , saskr = 2 , acskr = 3 , armskr = 4 } |
| enum | InherentBiasFaultTypes { i_ovroff = 1 , i_nmusup = 2 , i_nospd = 3 } |
| enum | JobType { FLIGHT_LEAD = 1 , ELEMENT_LEAD = 2 , WINGMAN = 3 } |
| enum | MissionType { ROUTE = 1 , ESCORT = 2 , CAP = 3 } |
Functions | |
| bool | btest (const int var, const int pos) |
| Returns true if the bit at pos in var is set. | |
| bool | lbit (const int word, const int n) |
| double | dist (const UtVec3d &a, const UtVec3d &b) |
| double | energy (const UtVec3d &pos, const UtVec3d &vel) |
| double | egy (double z, double s) |
| UtFortMat3d | makecs (const UtVec3d &xVec, const UtVec3d &zVec) |
| UtFortMat3d | makcsi (const UtVec3d &xVec, const UtVec3d &zVec) |
| UtFortMat3d | makex (const UtVec3d &cxin) |
| UtFortMat3d | makeh (const UtVec3d &cxin) |
| Equiv to makex with cxin assumed zero. | |
| double | headeg (UtVec3d v) |
| double | ramp (const double xlo, const double xval, const double xhi) |
| void | vsplit (const UtVec3d &v, const UtVec3d &x, UtVec3d &vl, UtVec3d &vt) |
| double | xlimit (const double xreq, const double xmax, const double xmin) |
| UtFortMat3d | bodyax (const UtFortMat3d &rwe, double alpha) |
| UtFortMat3d | NEDToECSRotation (UtEntity &ref) |
| UtFortMat3d | mrotx (UtFortMat3d a, double chi) |
| double | AtmosphereDensityRatio (double altitude) |
| From atmos.f calculating DR. | |
| double | SpeedOfSound (double altitude) |
| From atmos.f calculating VS. | |
| double | LOSangleSigma (UtFortMat3d M, UtMatrixd R6, double R) |
| void | nabort (const std::string &str) |
| double | param1 (int i, double xx, double *aray) |
| double | tbl1 (double x, double *z, double *xval, int nxval) |
| double | tbl1b (double x, double *z, int nx, double xmin, double xmax) |
| double | tbl2 (double x, double y, double *z, double *xval, int nxval, double *yval, int nyval) |
| double | tbl2e (double x, double y, double *z, double *xval, int nxval, double *yval, int nyval) |
| void | invtb2 (double *tbl, double z, int nr, int ir, double pr, bool revdir, int nc, int &ic, double &pc) |
| void | srch (double *x, int nx, double xint, int &ilow, double &p) |
| bool | maxcnt (int &count, bool zprnt, int mcount, const std::string &subnam) |
| double | dsxdot (double xdes, double x, double xdot, double xdotmx, double tau) |
| UtVec3d | vorth (const UtVec3d &a, const UtVec3d &b) |
| UtVec3d | rotz (double phi, const UtVec3d &vin) |
| bool | AimPoint (const UtVec3d &xa, double sa, const UtVec3d &xt, const UtVec3d &vt, double st, UtVec3d &aimp) |
| void | intcpt (const UtVec3d &xa, double sa, const UtVec3d &xt, const UtVec3d &vt, double closmn, double angint, double hdes, UtVec3d &desdir, double &sdes) |
| void | intcpt_inner (const UtVec3d &x_atkr, double sa, const UtVec3d &x_tgt, const UtVec3d &vt, double closmn, double angint, double hdes, double vs, const UtVec3d &xlos, double range, UtVec3d &desdir, double &sdes) |
| bool | TryReadCommand (UtInput &aInput, std::string &aCommand) |
| bool | InputIsValid (std::istringstream &aIn) |
| void | ReadValue (UtInput &aInput, int &aValue) |
| void | ReadValue (UtInput &aInput, double &aValue) |
| double | LOSangleSigma (const UtFortMat3d &M, const UtMatrixd &R6, double R) |
| Replicates ecmsig() with mode for LOS angle sigma only. | |
Variables | |
| double const | grav = 32.17405 |
| double const | pi = 3.141592654 |
| double const | rad = pi / 180.0 |
| double const | hafpi = 1.570796327 |
| double const | twopi = 6.283185308 |
| double const | root2 = 1.414213562 |
| double const | ftnmi = 0.000164578834 |
| double const | eps = 1.e-35 |
| double const | re = 20890377.0 |
| double const | xlarge = 1.e38 |
| double const | degrees2meters = 111194.92664456 |
| double const | degrees2feet = 364812.76313 |
| double const | cFtSec2PerG = 32.1740 |
BRAWLER min/max Functions | |
Return the smallest/largest of the values passed in. | |
| double | amin1 (const double a, const double b) |
| double | amax1 (const double a, const double b) |
| double | amax1 (const double a, const double b, const double c) |
BRAWLER sign Functions | |
Return the values of a with sign of b. Equivalent to FORTRAN SIGN() | |
| int | sign (const int a, const int b) |
| double | sign (const double a, const double b) |
BRAWLER inverse trigonometric functions | |
Just renames of std acos, asin | |
| double | arccos (const double a) |
| double | arcsin (const double a) |
| double | avnorm (const UtVec3d &x) |
BRAWLER Border Functions | |||||
These are generalized shape functions used throughout brawler to provide shapes used for value functions. These functions replicate BRAWLER v7.5 border.f Border is a smooth step function transitioning at 0. The formula used for positive and negative arguments are designed to make border be continuous in first derivative at z=0. Also, border(z,z0) = 1-border(-z,z0).
| |||||
| double | border (const double z, const double z0) | ||||
| double | cauchy (const double z, const double z0) | ||||
| double | reward (const double z, const double z0) | ||||
Namespace to contain BRAWLER unique elements including: constants, enumerations, and utilty functions
| enum BRAWLER::JobType |
| enum BRAWLER::MissionType |
| enum BRAWLER::WeaponType |
| BRAWLER_EXPORT bool BRAWLER::AimPoint | ( | const UtVec3d & | xa, |
| double | sa, | ||
| const UtVec3d & | xt, | ||
| const UtVec3d & | vt, | ||
| double | st, | ||
| UtVec3d & | aimp ) |
References eps.
Referenced by BrawlerPlatform::DegreeOfThreat(), intcpt_inner(), UT_DEFINE_SCRIPT_METHOD(), BrawlerPlatform::WeaponSimTimeOfIntercept(), and BrawlerPlatform::WeaponSteeringError().
| BRAWLER_EXPORT double BRAWLER::amax1 | ( | const double | a, |
| const double | b ) |
Referenced by BrawlerMover::altlim(), BrawlerEvaluation::AngleAboveHorizon(), BrawlerMover::aproj3(), BrawlerEvaluation::CalcEvadeValue(), BrawlerEvaluation::CalcLowSpeedRecoveryValue(), BrawlerEvaluation::CalcVectoredFlightValue(), BrawlerMover::effthr(), BrawlerEvaluation::Evaluate1v1(), BrawlerMover::gldmx(), BrawlerMover::gwreq(), intcpt(), intcpt_inner(), BrawlerMover::laccel(), BrawlerEvaluation::NominalSelfEngagementMeasure(), BrawlerPlatform::ProbabilitySeen(), BrawlerEvaluation::SelfEngagementMeasure(), BrawlerMover::seteng(), BrawlerMover::spdtoa(), BrawlerMover::stept(), BrawlerMover::susgmx(), BrawlerEvaluation::WeaponAimingEnvelope(), and BrawlerEvaluation::WeaponTimeSelfEngageMeasure().
| BRAWLER_EXPORT double BRAWLER::amax1 | ( | const double | a, |
| const double | b, | ||
| const double | c ) |
| BRAWLER_EXPORT double BRAWLER::amin1 | ( | const double | a, |
| const double | b ) |
Referenced by BrawlerMover::altlim(), BrawlerMover::aoamx1(), BrawlerMover::aproj3(), BrawlerEvaluation::CalcEvadeValue(), BrawlerEvaluation::CalcRoutepointValue(), BrawlerMover::CommandSlice(), BrawlerMover::corner(), BrawlerPlatform::DefensiveMultiplier(), BrawlerPlatform::DegreeOfThreat(), BrawlerMover::effthr(), BrawlerEvaluation::Evaluate1v1(), BrawlerEvaluation::EvaluateAlternative(), BrawlerMover::gldmx(), BrawlerMover::gwreq(), BrawlerMover::laccel(), BrawlerMover::max_asubt(), BrawlerPlatform::MaxLimitedInstantaneousGLoad_g(), WsfBrawlerProcessor::MaxTacticalGLoad_g(), BrawlerMover::perfrm(), BrawlerPlatform::ProbabilitySeen(), BrawlerMover::qmax(), BrawlerMover::rates(), BrawlerMover::seteng(), BrawlerMover::stenst(), BrawlerMover::stept(), BrawlerMover::throt(), BrawlerEvaluation::WeaponAimingEnvelope(), and BrawlerPlatform::WeaponSimTimeOfIntercept().
| double BRAWLER::arccos | ( | const double | a | ) |
Referenced by BrawlerEvaluation::CalcEvadeValue(), BrawlerEvaluation::CalcMissileAimValue(), BrawlerEvaluation::CalcRoutepointValue(), BrawlerEvaluation::CalcVectoredFlightValue(), BrawlerPlatform::DegreeOfThreat(), BrawlerEvaluation::Evaluate1v1(), BrawlerEvaluation::GunTracking(), BrawlerPlatform::OffBoreSightAngle(), BrawlerMover::thstoa(), BrawlerEvaluation::WeaponAimingEnvelope(), BrawlerPlatform::WeaponSimTimeOfIntercept(), and BrawlerPlatform::WeaponSteeringError().
| double BRAWLER::arcsin | ( | const double | a | ) |
Referenced by BrawlerEvaluation::AngleAboveHorizon(), BrawlerEvaluation::CalcIlluminationValue(), BrawlerEvaluation::CalcLowSpeedRecoveryValue(), BrawlerEvaluation::CalcMissileAimValue(), BrawlerEvaluation::CalcVectoredFlightValue(), BrawlerEvaluation::Evaluate1v1(), and BrawlerPlatform::SlowFlight().
| double BRAWLER::AtmosphereDensityRatio | ( | double | altitude | ) |
From atmos.f calculating DR.
Referenced by BrawlerPlatform::NominalProjection().
| double BRAWLER::avnorm | ( | const UtVec3d & | x | ) |
| x | - 3 vector |
Referenced by BrawlerPlatform::a_lim(), and BrawlerPlatform::projw().
| UtFortMat3d BRAWLER::bodyax | ( | const UtFortMat3d & | rwe, |
| double | alpha ) |
| double BRAWLER::border | ( | const double | z, |
| const double | z0 ) |
References border().
Referenced by border(), BrawlerEvaluation::CalcEvadeValue(), BrawlerEvaluation::CalcIlluminationValue(), BrawlerEvaluation::CalcLowSpeedRecoveryValue(), BrawlerEvaluation::CalcRoutepointValue(), BrawlerEvaluation::CalcVectoredFlightValue(), BrawlerPlatform::DegreeOfThreat(), BrawlerEvaluation::Evaluate1v1(), BrawlerMover::gwreq(), BrawlerEvaluation::NominalSelfEngagementMeasure(), BrawlerEvaluation::SelfEngagementMeasure(), and BrawlerEvaluation::WeaponAimingEnvelope().
| bool BRAWLER::btest | ( | const int | var, |
| const int | pos ) |
| double BRAWLER::cauchy | ( | const double | z, |
| const double | z0 ) |
Bell-shaped curve peaking at origin.
| z | basic independent variable |
| z0 | width-defining parameter |
Referenced by BrawlerEvaluation::CalcIlluminationValue(), BrawlerEvaluation::CalcRoutepointValue(), BrawlerEvaluation::CalcVectoredFlightValue(), BrawlerEvaluation::Evaluate1v1(), BrawlerEvaluation::NominalSelfEngagementMeasure(), BrawlerPlatform::ProbabilityOfKill(), BrawlerEvaluation::SelfEngagementMeasure(), BrawlerEvaluation::WeaponAimingEnvelope(), and BrawlerEvaluation::WeaponTimeSelfEngageMeasure().
| double BRAWLER::dist | ( | const UtVec3d & | a, |
| const UtVec3d & | b ) |
Computes separation between two 3-vectors This function replicates BRAWLER v7.5 dist.f
| a | 3-vec, one of the two vectors |
| b | 3-vec, the other vector |
Referenced by BrawlerEvaluation::Evaluate1v1().
| double BRAWLER::dsxdot | ( | double | xdes, |
| double | x, | ||
| double | xdot, | ||
| double | xdotmx, | ||
| double | tau ) |
References sign().
Referenced by BrawlerEvaluation::CalcRoutepointValue().
| double BRAWLER::egy | ( | double | z, |
| double | s ) |
| double BRAWLER::energy | ( | const UtVec3d & | pos, |
| const UtVec3d & | vel ) |
Computes specific energy from vectors This function replicates BRAWLER v7.5 energy.f
| pos | position vector (feet) |
| vel | velocity vector (feet/sec) |
References grav, pos, and vel.
Referenced by BrawlerEvaluation::Evaluate1v1(), and BrawlerEvaluation::SelfEngagementMeasure().
| double BRAWLER::headeg | ( | UtVec3d | v | ) |
Referenced by BrawlerMover::CommandSlice(), headeg(), and BrawlerMover::prlevl().
| bool BRAWLER::InputIsValid | ( | std::istringstream & | aIn | ) |
Referenced by ReadValue(), and ReadValue().
| BRAWLER_EXPORT void BRAWLER::intcpt | ( | const UtVec3d & | xa, |
| double | sa, | ||
| const UtVec3d & | xt, | ||
| const UtVec3d & | vt, | ||
| double | closmn, | ||
| double | angint, | ||
| double | hdes, | ||
| UtVec3d & | desdir, | ||
| double & | sdes ) |
References amax1(), ftnmi, intcpt_inner(), nabort(), ramp(), and SpeedOfSound().
Referenced by UT_DEFINE_SCRIPT_METHOD().
| void BRAWLER::intcpt_inner | ( | const UtVec3d & | x_atkr, |
| double | sa, | ||
| const UtVec3d & | x_tgt, | ||
| const UtVec3d & | vt, | ||
| double | closmn, | ||
| double | angint, | ||
| double | hdes, | ||
| double | vs, | ||
| const UtVec3d & | xlos, | ||
| double | range, | ||
| UtVec3d & | desdir, | ||
| double & | sdes ) |
| BRAWLER_EXPORT void BRAWLER::invtb2 | ( | double * | tbl, |
| double | z, | ||
| int | nr, | ||
| int | ir, | ||
| double | pr, | ||
| bool | revdir, | ||
| int | nc, | ||
| int & | ic, | ||
| double & | pc ) |
Inverse interpolation of a 2-dim table on right index This function replicates BRAWLER v7.5 invtb2.f
| tbl | array dim(nr,nc) of (real) - target of inverse interpolation |
| z | desired value of tbl |
| nr | number of rows in tbl |
| ir | row index (see pr) |
| pr | ir and pr define row on which inverse interpolation is to be performed. that is, interpolate on "virtual" row of index ir+pr ( 0<=pr<=1 ). |
| revdir | start search from "right" hand edge of the table |
| nc | number of columns in tbl |
| ic | see pc |
| pc | output is (ic,pc) the index and interpolation constant for which the following holds: z = tlow + pc*(thigh-tlow) tlow = tbl(ir,ic ) + pr*(tbl(ir+1,ic )-tbl(ir,ic )) thigh = tbl(ir,ic+1) + pr*(tbl(ir+1,ic+1)-tbl(ir,ic+1)) |
References tbl.
Referenced by BrawlerMover::aoamx1(), BrawlerMover::faoa(), BrawlerMover::get_aoa(), WsfBrawlerProcessor::GetAlphaAtMaxCL_deg(), WsfBrawlerProcessor::GetAlphaAtMaxCL_deg(), and WsfBrawlerProcessor::GetAlphaAtMaxCL_deg().
| bool BRAWLER::lbit | ( | const int | word, |
| const int | n ) |
References btest().
| double BRAWLER::LOSangleSigma | ( | const UtFortMat3d & | M, |
| const UtMatrixd & | R6, | ||
| double | R ) |
Replicates ecmsig() with mode for LOS angle sigma only.
References tbl.
| double BRAWLER::LOSangleSigma | ( | UtFortMat3d | M, |
| UtMatrixd | R6, | ||
| double | R ) |
References nabort().
| UtFortMat3d BRAWLER::makcsi | ( | const UtVec3d & | xVec, |
| const UtVec3d & | zVec ) |
Routine to construct orientations. Used when a coordinate system must be created. x-axis constructed by unitv; y-axis direction given by crossing bzin with bxin, cros1 assures normalization; finally, z-axis is given by crossing x and y axes. A transpose operation is then performed to make required orientation. This function replicates BRAWLER v7.5 makecs.f
| xVec | 3-vec its direction defines orientation's x-axis |
| zVec | 3-vec its direction, together with xVec, defines orientation's x-z plane. Ambiguity is resolved by having dot product of z-axis with zVec negative for makcsi. makcsi is useful for constructing wind and/or body axes when zVec is a lift. |
Referenced by BrawlerPlatform::a_lim(), BrawlerMover::dirct(), BrawlerMover::manwnd(), and BrawlerPlatform::projw().
| UtFortMat3d BRAWLER::makecs | ( | const UtVec3d & | xVec, |
| const UtVec3d & | zVec ) |
Routine to construct orientations. Used when a coordinate system must be created. x-axis constructed by unitv; y-axis direction given by crossing bzin with bxin, cros1 assures normalization; finally, z-axis is given by crossing x and y axes. A transpose operation is then performed to make required orientation. This function replicates BRAWLER v7.5 makecs.f
| xVec | 3-vec its direction defines orientation's x-axis |
| zVec | 3-vec its direction, together with xVec, defines orientation's x-z plane. Ambiguity is resolved by having dot product of z-axis with zVec positive for makecs |
Referenced by BrawlerMover::adjal(), BrawlerMover::aproj3(), BrawlerEvaluation::CalcMissileAimValue(), BrawlerEvaluation::Evaluate1v1(), BrawlerMover::flact0(), BrawlerMover::laccel(), and makex().
| UtFortMat3d BRAWLER::makeh | ( | const UtVec3d & | cxin | ) |
Equiv to makex with cxin assumed zero.
Referenced by BrawlerMover::aproj3(), BrawlerMover::gwreq(), and BrawlerMover::laccel().
| UtFortMat3d BRAWLER::makex | ( | const UtVec3d & | cxin | ) |
Equivalent to makecs with bzin=(0,0,1)
References makecs().
Referenced by BrawlerPlatform::a_lim(), BrawlerPlatform::DegreeOfThreat(), BrawlerMover::dirct(), and BrawlerPlatform::projw().
| bool BRAWLER::maxcnt | ( | int & | count, |
| bool | zprnt, | ||
| int | mcount, | ||
| const std::string & | subnam ) |
Checks to see if a counter has exceeded a max counter. This is to be used to check on potential infinite loops This function replicates BRAWLER v7.5 maxcnt.f
| count | Number of times through a given loop |
| zprnt | If .true. write diagnostic prints |
| mcount | Maximum number of times through a loop allowed |
| subnam | Name of subroutine calling maxcnt |
Referenced by BrawlerMover::susgmx().
| UtFortMat3d BRAWLER::mrotx | ( | UtFortMat3d | a, |
| double | chi ) |
Referenced by BrawlerMover::dirct().
| BRAWLER_EXPORT void BRAWLER::nabort | ( | const std::string & | str | ) |
Prinat an error message and aborts simulation. This function replicates BRAWLER v7.5 nabort.f
| str | the message to display on abort |
Referenced by BrawlerPlatform::AdjustTunnelVisionMultipliers(), BrawlerMover::aoa(), BrawlerMover::aoamx1(), BrawlerMover::aproj3(), BrawlerMover::cas(), BrawlerMover::chkrng(), BrawlerMover::ckrngi(), BrawlerMover::desaxf(), BrawlerMover::deseng(), BrawlerMover::drag2(), BrawlerMover::drgad(), BrawlerMover::faoa(), BrawlerMover::flacti(), BrawlerMover::fxlift(), BrawlerMover::gldmx(), BrawlerMover::gliftm(), BrawlerMover::gwreq(), intcpt(), LOSangleSigma(), BrawlerMover::perfrm(), BrawlerPlatform::projw(), BrawlerMover::qmax(), BrawlerMover::rates(), srch(), BrawlerMover::srch2(), BrawlerMover::stept(), tbl1(), BrawlerMover::thrst3(), BrawlerPlatform::WeaponSteeringError(), and BrawlerMover::xlift().
| UtFortMat3d BRAWLER::NEDToECSRotation | ( | UtEntity & | ref | ) |
Referenced by BrawlerPlatform::GetNEDToECSRotation(), and BrawlerMover::Initialize().
| BRAWLER_EXPORT double BRAWLER::param1 | ( | int | i, |
| double | xx, | ||
| double * | aray ) |
Does a 1-dimensional interpolation This function replicates BRAWLER v7.5 param1.f
| i | index of lower bounding table entry |
| xx | interpolation weight of upper bounding entry |
| aray | array dim(int) of (double) - the table |
Referenced by BrawlerMover::aoamx1(), BrawlerMover::aproj3(), BrawlerMover::faoa(), BrawlerMover::get_aoa(), WsfBrawlerProcessor::GetAlphaAtMaxCL_deg(), WsfBrawlerProcessor::GetAlphaAtMaxCL_deg(), WsfBrawlerProcessor::GetAlphaAtMaxCL_deg(), and BrawlerMover::laccel().
| BRAWLER_EXPORT double BRAWLER::ramp | ( | const double | xlo, |
| const double | xval, | ||
| const double | xhi ) |
Linear ramp function that replicates BRAWLER ramp.f Circumvents issue of whether XLO < XHI, etc. by computing a linear fit to points RAMP(XLO)=0, RAMP(XHI)=1 and truncating range to 0 when result<0 and 1 when result>1.
| xlo | If xlo < xhi then ramp=0 for all xval <= xlo. If xlo>xhi then ramp=0 for all xval >= xlo |
| xval | Ramp function independent variable |
| xhi | If xlo < xhi then ramp=1 for all xval >= xhi. If xlo>xhi then ramp=1 for all xval <= xhi |
Referenced by BrawlerMover::aproj3(), BrawlerEvaluation::CalcLowSpeedRecoveryValue(), BrawlerMover::CommandSlice(), BrawlerEvaluation::Evaluate1v1(), BrawlerEvaluation::EvaluateAlternative(), WsfBrawlerProcessor::GetConsciousnessEventTime(), intcpt(), BrawlerEvaluation::NominalSelfEngagementMeasure(), BrawlerMover::prlevl(), BrawlerPlatform::ProbabilityOfKill(), BrawlerPlatform::ProjectedTimeDelta(), and ramp().
| BRAWLER_EXPORT void BRAWLER::ReadValue | ( | UtInput & | aInput, |
| double & | aValue ) |
References InputIsValid(), and pos.
| BRAWLER_EXPORT void BRAWLER::ReadValue | ( | UtInput & | aInput, |
| int & | aValue ) |
References InputIsValid(), and pos.
Referenced by BrawlerMover::LoadAeroConfig().
| double BRAWLER::reward | ( | const double | z, |
| const double | z0 ) |
Reward is a linear transformation of cauchy with range from -1 to 1 instead of 0 to 1.
| z | basic independent variable |
| z0 | width-defining parameter |
Referenced by BrawlerEvaluation::CalcRoutepointValue().
| UtVec3d BRAWLER::rotz | ( | double | phi, |
| const UtVec3d & | vin ) |
Referenced by intcpt_inner().
| double BRAWLER::sign | ( | const double | a, |
| const double | b ) |
| int BRAWLER::sign | ( | const int | a, |
| const int | b ) |
Referenced by BrawlerMover::aproj3(), BrawlerMover::CommandSlice(), BrawlerMover::dirct(), dsxdot(), BrawlerMover::dsxdot(), BrawlerMover::fxlift(), BrawlerMover::gwreq(), BrawlerMover::laccel(), BrawlerMover::Lift(), BrawlerMover::orient(), BrawlerMover::prlevl(), BrawlerMover::rates(), BrawlerMover::rollim(), BrawlerMover::stept(), and BrawlerMover::susgmx().
| double BRAWLER::SpeedOfSound | ( | double | altitude | ) |
| BRAWLER_EXPORT void BRAWLER::srch | ( | double * | x, |
| int | nx, | ||
| double | xint, | ||
| int & | ilow, | ||
| double & | p ) |
Binary search of a double, ascending-sorted array This function replicates BRAWLER v7.5 srch.f
| x | array dim(*) of (double) - ascending-sorted array |
| nx | size of array to search |
| xint | value to match |
| ilow | low end of active search range. If zero, xint is outside of range [x(1),x(nx)]. Otherwise, the index of the largest element of x that is less than or equal to xint. |
| p | Interpolation constant return value, that is, xint=x(ilow) + p*(x(ilow+1)-x(ilow)) |
References nabort().
Referenced by BrawlerMover::aoamcl(), BrawlerMover::aoamx1(), BrawlerMover::faoa(), WsfBrawlerProcessor::GetAlphaAtMaxCL_deg(), WsfBrawlerProcessor::GetAlphaAtMaxCL_deg(), WsfBrawlerProcessor::GetAlphaAtMaxCL_deg(), BrawlerMover::laccel(), tbl1(), tbl2(), and tbl2e().
| BRAWLER_EXPORT double BRAWLER::tbl1 | ( | double | x, |
| double * | z, | ||
| double * | xval, | ||
| int | nxval ) |
Lineraly interpolates a 1-dimensional table with variable tablesize This function replicates BRAWLER v7.5 tbl1.f
| x | real - z(x) is the desired output |
| z | array dim(*) of (real) - lookup table |
| xval | array dim(*) of (real) - defines values of x for which z is tabulated. thus, z(i) = function_z(xval(i)) xval must be monotonically increasing |
| nxval | int - number of table points |
References nabort(), and srch().
Referenced by BrawlerMover::aoamx1(), BrawlerMover::corner(), WsfBrawlerProcessor::CurrentStructuralGLimit_g(), BrawlerMover::fliftm(), BrawlerMover::fxlift(), BrawlerMover::gcdadd(), WsfBrawlerProcessor::GetMaxCL(), WsfBrawlerProcessor::GetMaxCL(), WsfBrawlerProcessor::GetMaxCL(), BrawlerMover::gldmx(), BrawlerMover::Lift(), BrawlerMover::qmax(), and WsfBrawlerProcessor::StructuralGLimitAtDesignWeight_g().
| double BRAWLER::tbl1b | ( | double | x, |
| double * | z, | ||
| int | nx, | ||
| double | xmin, | ||
| double | xmax ) |
Interpolates a one-dimensional lookup table. Used for evenly-spaced table case. Performs work that callers of param1 may need to perform in-line. This function replicates BRAWLER v7.5 tbl1b.f
| x | Real - independent variable |
| z | Array dim(nx) of real - tabulated dependent variable. The abstract result Z(X) is desired. |
| nx | int - Dimension of Z |
| xmin | Real - Z(1) corresponds to Z(XMIN) |
| xmax | Real - Z(NX) corresponds to Z(XMAX) |
Referenced by BrawlerMover::allim(), BrawlerMover::aproj3(), BrawlerMover::laccel(), and BrawlerMover::thstoa().
| BRAWLER_EXPORT double BRAWLER::tbl2 | ( | double | x, |
| double | y, | ||
| double * | z, | ||
| double * | xval, | ||
| int | nxval, | ||
| double * | yval, | ||
| int | nyval ) |
Interpolates a 2-dimensional table with variable tablesize. Uses the srch function to bracket x or y between two xval's (or yval's), and then performs a linear interpolation on z. Out of bounds x and y values are truncated. This routine can handle NXVAL or NYVAL = 1. This function replicates BRAWLER v7.5 tbl2.f
| x | real - z(x,y) is the desired output |
| y | real - z(x,y) is the desired output |
| z | array dim(nxval,nyval) of (real) - lookup table |
| xval | array dim(nxval) of (real) - defines values of x for which z is tabulated. xval must be monotonically increasing |
| nxval | int - number of table points for first z-index |
| yval | array dim(nyval) of (real) - defines values of y for which z is tabulated. yval must be monotonically increasing |
| nyval | int - number of table points for second z-index |
References srch().
Referenced by BrawlerMover::fflo(), BrawlerMover::fntthr(), BrawlerMover::fxlift(), BrawlerMover::Lift(), and BrawlerMover::Thrust().
| double BRAWLER::tbl2e | ( | double | x, |
| double | y, | ||
| double * | z, | ||
| double * | xval, | ||
| int | nxval, | ||
| double * | yval, | ||
| int | nyval ) |
Interpolates a 2-dimensional table with variable tablesize. This function replicates BRAWLER v7.5 tbl2e.f
| x | real - z(x,y) is the desired output |
| y | real - z(x,y) is the desired output |
| z | array dim(nxval,nyval) of (real) - lookup table |
| xval | array dim(nxval) of (real) - defines values of x for which z is tabulated. xval must be monotonically increasing |
| nxval | int - number of table points for first z-index |
| yval | array dim(nyval) of (real) - defines values of y for which z is tabulated. yval must be monotonically increasing |
| nyval | int - number of table points for second z-index |
References srch().
Referenced by BrawlerMover::cas(), and BrawlerMover::CoefficientOfDrag().
| BRAWLER_EXPORT bool BRAWLER::TryReadCommand | ( | UtInput & | aInput, |
| std::string & | aCommand ) |
References pos, and TryReadCommand().
Referenced by BrawlerMover::LoadAeroConfig(), and TryReadCommand().
| UtVec3d BRAWLER::vorth | ( | const UtVec3d & | a, |
| const UtVec3d & | b ) |
Referenced by BrawlerMover::aproj3(), intcpt_inner(), BrawlerMover::laccel(), BrawlerMover::spdtoa(), and BrawlerMover::thstoa().
| void BRAWLER::vsplit | ( | const UtVec3d & | v, |
| const UtVec3d & | x, | ||
| UtVec3d & | vl, | ||
| UtVec3d & | vt ) |
Splits a vector into parallel & perpendicular parts This function replicates BRAWLER v7.5 vsplit.f
| v | - vector to be split |
| x | - vector that defines "parallel" direction |
| vl | - part of "v" parallel to "x" |
| vt | - part of "v" transverse to "x" |
Referenced by BrawlerEvaluation::CalcEvadeValue().
| double BRAWLER::xlimit | ( | const double | xreq, |
| const double | xmax, | ||
| const double | xmin ) |
Forces value to lie in a specified range This function replicates BRAWLER v7.5 xlimit.f
| xreq | real - value to be limited to range |
| xmax | real - upper range limit |
| xmin | real - lower range limit |
References xlimit().
Referenced by BrawlerMover::aproj3(), BrawlerMover::CommandSlice(), BrawlerPlatform::DegreeOfThreat(), BrawlerMover::deseng(), BrawlerMover::dirct(), BrawlerMover::effthr(), BrawlerEvaluation::Evaluate1v1(), BrawlerMover::fxlift(), BrawlerMover::grthr(), intcpt_inner(), BrawlerMover::Lift(), BrawlerMover::rates(), BrawlerEvaluation::SelfEngagementMeasure(), BrawlerPlatform::WeaponSimTimeOfIntercept(), BrawlerEvaluation::WeaponTimeSelfEngageMeasure(), and xlimit().
| double const BRAWLER::cFtSec2PerG = 32.1740 |
| double const BRAWLER::degrees2feet = 364812.76313 |
| double const BRAWLER::degrees2meters = 111194.92664456 |
| double const BRAWLER::eps = 1.e-35 |
Referenced by AimPoint(), BrawlerPlatform::ConvertECStoWind(), BrawlerPlatform::ConvertWindtoECS(), BrawlerEvaluation::Evaluate1v1(), BrawlerPlatform::GetAlpha(), BrawlerMover::getdt(), BrawlerMover::grthr(), BrawlerEvaluation::GunTracking(), BrawlerPlatform::OffBoreSightAngle(), and BrawlerMover::spdtoa().
| double const BRAWLER::ftnmi = 0.000164578834 |
| double const BRAWLER::grav = 32.17405 |
Referenced by BrawlerMover::adjal(), BrawlerMover::aoamx1(), BrawlerMover::aproj3(), BrawlerMover::BrawlerMover(), BrawlerEvaluation::CalcLowSpeedRecoveryValue(), BrawlerEvaluation::CalcVectoredFlightValue(), BrawlerMover::CommandSlice(), BrawlerMover::corner(), WsfBrawlerProcessor::CurrentFuelWeight_lbs(), WsfBrawlerProcessor::CurrentWeight_lbs(), BrawlerMover::deseng(), BrawlerMover::dirct(), egy(), WsfBrawlerProcessor::EmptyWeight_lbs(), energy(), BrawlerEvaluation::Evaluate1v1(), BrawlerMover::flact1(), BrawlerMover::flyac(), BrawlerMover::gldmx(), BrawlerMover::gwreq(), WsfBrawlerMover::Initialize(), BrawlerEvaluation::InitializeRoutePointValues(), BrawlerMover::laccel(), BrawlerMover::LoadAeroConfig(), BrawlerMover::manwnd(), BrawlerMover::max_asubt(), WsfBrawlerProcessor::MaxAngularRate_rps(), BrawlerPlatform::MaximumInstantaneousLift_fps2(), BrawlerPlatform::NominalProjection(), BrawlerEvaluation::NominalSelfEngagementMeasure(), BrawlerMover::perfrm(), BrawlerPlatform::ProbabilitySeen(), BrawlerPlatform::projw(), BrawlerMover::qmax(), BrawlerMover::rates(), BrawlerMover::ratmx1(), WsfBrawlerMover::ReasonableClimbRate(), BrawlerMover::rollim(), BrawlerMover::spdtoa(), BrawlerMover::thstoa(), WsfBrawlerMover::Update(), and BrawlerEvaluation::WeaponTimeSelfEngageMeasure().
| double const BRAWLER::hafpi = 1.570796327 |
Referenced by BrawlerEvaluation::CalcEvadeValue(), BrawlerEvaluation::CalcLowSpeedRecoveryValue(), BrawlerEvaluation::Evaluate1v1(), BrawlerMover::forcev(), BrawlerEvaluation::GetBestWeapon(), BrawlerEvaluation::NominalSelfEngagementMeasure(), BrawlerPlatform::ProbabilityOfKill(), BrawlerPlatform::ProbabilitySeen(), and BrawlerPlatform::SlowFlight().
| double const BRAWLER::pi = 3.141592654 |
| double const BRAWLER::rad = pi / 180.0 |
Referenced by BrawlerMover::BrawlerMover(), BrawlerEvaluation::CalcMissileAimValue(), BrawlerEvaluation::CalcRoutepointValue(), BrawlerEvaluation::CalcVectoredFlightValue(), BrawlerMover::CommandSlice(), BrawlerPlatform::DegreeOfThreat(), BrawlerMover::dirct(), BrawlerEvaluation::Evaluate1v1(), BrawlerMover::forcev(), BrawlerMover::getdt(), BrawlerMover::gwreq(), headeg(), BrawlerEvaluation::NominalSelfEngagementMeasure(), BrawlerPlatform::ProbabilitySeen(), BrawlerMover::rollim(), BrawlerEvaluation::WeaponAimingEnvelope(), and BrawlerPlatform::WeaponSimTimeOfIntercept().
| double const BRAWLER::re = 20890377.0 |
Referenced by BrawlerEvaluation::AngleAboveHorizon().
| double const BRAWLER::root2 = 1.414213562 |
Referenced by BrawlerMover::gwreq().
| double const BRAWLER::twopi = 6.283185308 |
| double const BRAWLER::xlarge = 1.e38 |