WSF
BrawlerUtil.hpp File Reference
#include "UtEntity.hpp"
#include "brawler_export.h"
#include "UtFortMat3.hpp"
#include "UtMatrix.hpp"
#include "UtVec3.hpp"
Include dependency graph for BrawlerUtil.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  BRAWLER

Enumerations

enum  BRAWLER::WeaponType {
  BRAWLER::nowepn = 0 , BRAWLER::kndsrm = 1 , BRAWLER::kndmrm = 2 , BRAWLER::kndlrm = 3 ,
  BRAWLER::kndmis = 3 , BRAWLER::kndgun = 4 , BRAWLER::knddew = 5 , BRAWLER::kndwpn = 5
}
enum  BRAWLER::ManeuverValueComponentType {
  BRAWLER::i_voffef = 1 , BRAWLER::i_vlospd = 2 , BRAWLER::i_vform = 3 , BRAWLER::i_compr = 4 ,
  BRAWLER::i_valdfx = 5 , BRAWLER::i_gaval = 6 , BRAWLER::i_vvec = 7 , BRAWLER::i_villum = 8 ,
  BRAWLER::i_vmusup = 9 , BRAWLER::i_valevd = 10 , BRAWLER::i_vmaim = 11 , BRAWLER::i_vdisng = 12 ,
  BRAWLER::i_sepval = 13 , BRAWLER::i_vescrt = 14 , BRAWLER::i_vsamz = 15 , BRAWLER::i_vavbdd = 16 ,
  BRAWLER::i_hddval = 17 , BRAWLER::i_terrval = 18 , BRAWLER::i_vdew = 19 , BRAWLER::i_vtpt = 20
}
enum  BRAWLER::MissileModeState { BRAWLER::NOTASK = 0 , BRAWLER::INTERCEPT = 1 , BRAWLER::AIMFIRE = 2 , BRAWLER::ILLUMINATE = 3 }
enum  BRAWLER::WeaponSeekerType {
  BRAWLER::mxskr = 4 , BRAWLER::irskr = 1 , BRAWLER::saskr = 2 , BRAWLER::acskr = 3 ,
  BRAWLER::armskr = 4
}
enum  BRAWLER::InherentBiasFaultTypes { BRAWLER::i_ovroff = 1 , BRAWLER::i_nmusup = 2 , BRAWLER::i_nospd = 3 }
enum  BRAWLER::JobType { BRAWLER::FLIGHT_LEAD = 1 , BRAWLER::ELEMENT_LEAD = 2 , BRAWLER::WINGMAN = 3 }
enum  BRAWLER::MissionType { BRAWLER::ROUTE = 1 , BRAWLER::ESCORT = 2 , BRAWLER::CAP = 3 }

Functions

bool BRAWLER::btest (const int var, const int pos)
 Returns true if the bit at pos in var is set.
bool BRAWLER::lbit (const int word, const int n)
double BRAWLER::dist (const UtVec3d &a, const UtVec3d &b)
double BRAWLER::energy (const UtVec3d &pos, const UtVec3d &vel)
double BRAWLER::egy (double z, double s)
UtFortMat3d BRAWLER::makecs (const UtVec3d &xVec, const UtVec3d &zVec)
UtFortMat3d BRAWLER::makcsi (const UtVec3d &xVec, const UtVec3d &zVec)
UtFortMat3d BRAWLER::makex (const UtVec3d &cxin)
UtFortMat3d BRAWLER::makeh (const UtVec3d &cxin)
 Equiv to makex with cxin assumed zero.
double BRAWLER::headeg (UtVec3d v)
double BRAWLER::ramp (const double xlo, const double xval, const double xhi)
void BRAWLER::vsplit (const UtVec3d &v, const UtVec3d &x, UtVec3d &vl, UtVec3d &vt)
double BRAWLER::xlimit (const double xreq, const double xmax, const double xmin)
UtFortMat3d BRAWLER::bodyax (const UtFortMat3d &rwe, double alpha)
UtFortMat3d BRAWLER::NEDToECSRotation (UtEntity &ref)
UtFortMat3d BRAWLER::mrotx (UtFortMat3d a, double chi)
double BRAWLER::AtmosphereDensityRatio (double altitude)
 From atmos.f calculating DR.
double BRAWLER::SpeedOfSound (double altitude)
 From atmos.f calculating VS.
double BRAWLER::LOSangleSigma (const UtFortMat3d &M, const UtMatrixd &R6, double R)
 Replicates ecmsig() with mode for LOS angle sigma only.
void BRAWLER::nabort (const std::string &str)
double BRAWLER::param1 (int i, double xx, double *aray)
double BRAWLER::tbl1 (double x, double *z, double *xval, int nxval)
double BRAWLER::tbl1b (double x, double *z, int nx, double xmin, double xmax)
double BRAWLER::tbl2 (double x, double y, double *z, double *xval, int nxval, double *yval, int nyval)
double BRAWLER::tbl2e (double x, double y, double *z, double *xval, int nxval, double *yval, int nyval)
void BRAWLER::invtb2 (double *tbl, double z, int nr, int ir, double pr, bool revdir, int nc, int &ic, double &pc)
void BRAWLER::srch (double *x, int nx, double xint, int &ilow, double &p)
bool BRAWLER::maxcnt (int &count, bool zprnt, int mcount, const std::string &subnam)
double BRAWLER::dsxdot (double xdes, double x, double xdot, double xdotmx, double tau)
UtVec3d BRAWLER::vorth (const UtVec3d &a, const UtVec3d &b)
UtVec3d BRAWLER::rotz (double phi, const UtVec3d &vin)
bool BRAWLER::AimPoint (const UtVec3d &xa, double sa, const UtVec3d &xt, const UtVec3d &vt, double st, UtVec3d &aimp)
void BRAWLER::intcpt (const UtVec3d &xa, double sa, const UtVec3d &xt, const UtVec3d &vt, double closmn, double angint, double hdes, UtVec3d &desdir, double &sdes)
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)
bool BRAWLER::TryReadCommand (UtInput &aInput, std::string &aCommand)
void BRAWLER::ReadValue (UtInput &aInput, int &aValue)
void BRAWLER::ReadValue (UtInput &aInput, double &aValue)

Variables

double const BRAWLER::grav = 32.17405
double const BRAWLER::pi = 3.141592654
double const BRAWLER::rad = pi / 180.0
double const BRAWLER::hafpi = 1.570796327
double const BRAWLER::twopi = 6.283185308
double const BRAWLER::root2 = 1.414213562
double const BRAWLER::ftnmi = 0.000164578834
double const BRAWLER::eps = 1.e-35
double const BRAWLER::re = 20890377.0
double const BRAWLER::xlarge = 1.e38
double const BRAWLER::degrees2meters = 111194.92664456
double const BRAWLER::degrees2feet = 364812.76313
double const BRAWLER::cFtSec2PerG = 32.1740

BRAWLER min/max Functions

Return the smallest/largest of the values passed in.

double BRAWLER::amin1 (const double a, const double b)
double BRAWLER::amax1 (const double a, const double b)
double BRAWLER::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 BRAWLER::sign (const int a, const int b)
double BRAWLER::sign (const double a, const double b)

BRAWLER inverse trigonometric functions

Just renames of std acos, asin

double BRAWLER::arccos (const double a)
double BRAWLER::arcsin (const double a)
double BRAWLER::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).

Parameters
zbasic independent variable
z0width-defining parameter
Returns
ranges from 0 for z < z0 to 1 for z > z0
double BRAWLER::border (const double z, const double z0)
double BRAWLER::cauchy (const double z, const double z0)
double BRAWLER::reward (const double z, const double z0)
Copyrights Multiple, All Rights Reserved