%==================================================
% COLREGS Macros
%==================================================

% Range, Bearing Rates
\newcommand{\rng}{r^{os}_{cn}} 
\newcommand{\rngrate}{\dot{r}} 
\newcommand{\oscnbngrate}{\dot{\beta}} 
\newcommand{\cnosbngrate}{\dot{\alpha}} 

%==================================================
% Riskiest Point of approach
\newcommand{\rpa}{\frac{\rngrate(t)}{r^2(t)}} 
\newcommand{\rpaf}{\rngrate / r^2(t)} 

%==================================================
% Bearing and Relative Bearing
\newcommand{\oscnbng}{bng^{os}_{cn}}
\newcommand{\oscnrbng}{\beta}
\newcommand{\cnosbng}{bng^{cn}_{os}}
\newcommand{\cnosrbng}{\alpha}

%==================================================
% Port and Starboard Relative Positions
\newcommand{\osportofcn}{{\tt port}^{os}_{cn}} 
\newcommand{\osstarofcn}{{\tt star}^{os}_{cn}}
\newcommand{\cnportofos}{{\tt port}^{cn}_{os}}
\newcommand{\cnstarofos}{{\tt star}^{cn}_{os}}

%==================================================
% Fore and Aft Relative Positions
\newcommand{\osforeofcn}{{\tt fore}^{os}_{cn}}
\newcommand{\osaftofcn}{{\tt aft}^{os}_{cn}}
\newcommand{\cnforeofos}{{\tt fore}^{cn}_{os}}
\newcommand{\cnaftofos}{{\tt aft}^{cn}_{os}}


%==================================================
%                   PASSING
%==================================================
% Passing - Ownship Passing Contact (Booleans)

\newcommand{\ospasscnport}{{\tt pass}^{os}_{cnp}}
\newcommand{\ospasscnstar}{{\tt pass}^{os}_{cns}}
\newcommand{\ospasscn}{{\tt pass}^{os}_{cn}}

%==================================================
% Passing - Contact Passing Ownship (Booleans)
\newcommand{\cnpassosport}{{\tt pass}^{cn}_{osp}}
\newcommand{\cnpassosstar}{{\tt pass}^{cn}_{oss}}
\newcommand{\cnpassos}{{\tt pass}^{cn}_{os}}

%==================================================
% Passing Contact (Numerical distances)
\newcommand{\ospasscnportd}{{\tt r}^{os}_{pcnp}}
\newcommand{\ospasscnstard}{{\tt r}^{os}_{pcns}}

%==================================================
% Crossing Onwship (Numerical distances)
\newcommand{\cnpassosportd}{{\tt r}^{cn}_{posp}}
\newcommand{\cnpassosstard}{{\tt r}^{cn}_{poss}}


%==================================================
%                   TURNING
%==================================================
% Onwship Turns Port/Starboard
\newcommand{\turnosport}{{\tt turn}^{os}_{port}}
\newcommand{\turnosstar}{{\tt turn}^{os}_{star}}



%==================================================
%                   CROSSING
%==================================================
% Crossing Contact (Booleans)
\newcommand{\oscrosscn}{{\tt cross}^{os}_{xcn}}
\newcommand{\oscrosscnbow}{{\tt cross}^{os}_{xcnb}}
\newcommand{\oscrosscnstern}{{\tt cross}^{os}_{xcns}}

%==================================================
% Crossing Ownship (Booleans)
\newcommand{\cncrossos}{{\tt cross}^{cn}_{xos}}
\newcommand{\cncrossosbow}{{\tt cross}^{cn}_{xosb}}
\newcommand{\cncrossosstern}{{\tt cross}^{cn}_{xoss}}

%==================================================
% Crossing Contact (Numerical distances)
\newcommand{\oscrosscnbowd}{{\tt r}^{os}_{xcnb}}
\newcommand{\oscrosscnsternd}{{\tt r}^{os}_{xcnb}}

%==================================================
% Crossing Onwship (Numerical distances)
\newcommand{\cncrossosbowd}{{\tt r}^{cn}_{xosb}}
\newcommand{\cncrossossternd}{{\tt r}^{cn}_{xosb}}



%==================================================
% Behavior ranges

% The min_util_cpa_dist behavior parameter
\newcommand{\minutilcpa}{\check{r}_{cpa}}
\newcommand{\maxutilcpa}{\hat{r}_{cpa}}
\newcommand{\rminpwt}{\check{r}_{pwt}}
\newcommand{\rmaxpwt}{\hat{r}_{pwt}}





