WSF
BrawlerUtil.cpp File Reference
#include "BrawlerUtil.hpp"
#include <algorithm>
#include <bitset>
#include <cassert>
#include <math.h>
#include <sstream>
#include <stdexcept>
#include <stdio.h>
#include <vector>
#include "UtInput.hpp"
#include "UtInputBuffer.hpp"
#include "UtLog.hpp"
Include dependency graph for BrawlerUtil.cpp:

Namespaces

namespace  BRAWLER

Macros

#define tbl(r, c)

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 (UtFortMat3d M, UtMatrixd R6, double R)
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)
bool BRAWLER::InputIsValid (std::istringstream &aIn)
void BRAWLER::ReadValue (UtInput &aInput, int &aValue)
void BRAWLER::ReadValue (UtInput &aInput, double &aValue)

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)

Macro Definition Documentation

◆ tbl

Copyrights Multiple, All Rights Reserved