<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[onecolumn,letterpaper,11pt]{article}

%=================================================================
\input{common_latex/common_latex_packages}
\input{common_latex/common_latex_definitions}
\input{common_latex/common_latex_help_format}
%=================================================================

\begin{document}

\begin{labcover}
\labtitle{uFldPathCheck: Monitoring Vehicle Path Properties}
\vspace{0.1in}
\labdate{June 2018}
\vspace{0.1in}
\labauth{Michael Benjamin, mikerb@mit.edu}
\labauth{Department of Mechanical Engineering}
\labauth{MIT, Cambridge MA 02139}
\labtoc{small}
\end{labcover}

\wikidoc{file=IvPTools.UFldPathCheck}
\wikidoc{bugz=uFldPathCheck}
\wikidoc{auth=mikerb@mit.edu}

%=================================================================
\section{Overview}
%=================================================================
\label{sec_ufld_pathcheck}
\index{uFldPathCheck}

The \app{uFldPathCheck} application is a tool for summarizing a few
properties in a field of vehicles remotely deployed. The primary focus
is on summarizing the speed and distance travelled for each
vehicle. Rather than relying on the vehicles themselves to calculate
and report this information, the \app{uFldPathCheck} tool determines
this information independently based on node reports from the
vehicles.  The assumption is that \app{uFldPathCheck} is running on a
topside or shoreside computer, and receiving information about
deployed vehicles primarily through node reports.  The typical layout
is shown in Figure \ref{fig_upc_topology}


\vspace{0.1in}
\begin{figure}[H]
  \centering 
  \includegraphics[width=0.78\textwidth]{figures/upc_topology.png}
  \caption{{\bf Typical uFldPathCheck Topology:} A shoreside or
    topside community is receiving information from several deployed
    vehicles, in the form of node reports. The node reports contain
    time-stamped updated vehicle positions, from which the speed and
    distance measurements are derived and posted to the shoreside
    MOOSDB.}
\label{fig_upc_topology}
\end{figure}
\vspace{0.1in}

In short, \app{uFldPathCheck} subscribes for incoming node reports for
any number of vehicles, and keeps a running history of positions for
each vehicle. It uses this recent-history to post (a) the current
speed noted per vehicle and (b) the distance travelled per
vehicle. These two reports are posted in the \mvar{UPC\_SPEED\_REPORT}
and \mvar{UPC\_ODOMETRY\_REPORT} variables to the MOOSDB. The odemetry
report includes a total distance travelled, and a "trip-ometer"
distance travelled since the last trip reset. The trip-ometer may be
reset for a vehicle {\em alpha} when mail is received of the form
\msvar{UPC\_TRIP\_RESET=alpha}. Examples of the posted output form are
given below in Section \ref{sec_upc_pubs}.


%=================================================================
\section{Overview of the uFldPathCheck Interface and Configuration Options}
%=================================================================

The \app{uFldPathCheck} application may be configured with a
configuration block within a \var{.moos} file.  Its interface is
defined by its publications and subscriptions for MOOS variables
consumed and generated by other MOOS applications. An overview of the
set of configuration options and interface is provided in this
section.

%=================================================================
\subsection{Configuration Parameters of uFldPathCheck}
\index{uFldPathCheck!Configuration Parameters}
\index{Configuration Parameters!uFldPathCheck}

The following parameters are defined for \app{uFldPathCheck}. 

\vspace{0.15in}
\begin{listing}{Configuration parameters for \app{uFldPathCheck}}
\label{lst_upc_params}
\renewcommand{\arraystretch}{1.1}
\begin{longtable}{rp{0.78\textwidth}} 

    \pvar{history}: &amp; Length of queue used for calculating present speed.
    The default is 10.

\end{longtable}
\end{listing}

%=================================================================
\section{Publications and Subscriptions for uFldPathCheck}
%=================================================================
\index{uFldPathCheck!Publications and Subscriptions}
\index{Publications and Subscriptions!uFldPathCheck}
\label{sec_upc_interface}

The interface for \app{uFldPathCheck}, in terms of publications and
subscriptions, is described below. This same information may also be
obtained from the terminal with:

\begin{consoleverb}
 $ uFldPathCheck --interface or -i
\end{consoleverb}

%=================================================================
\subsection{Variables Published by uFldPathCheck}
\label{sec_upc_pubs}

The primary output of \app{uFldPathCheck} to the MOOSDB are the speed
and odometry reports. 

\begin{packed_itemize}[2]
\item \mvar{APPCAST}: Contains an appcast report identical to the
  terminal output. Appcasts are posted only after an appcast request
  is received from an appcast viewing utility. 
\item \mvar{UPC\_ODOMETRY\_REPORT}: The current odometry information
  for a given vehicle.
\item \mvar{UPC\_SPEED\_REPORT}:  The current speed for a given
  vehicle. 
\end{packed_itemize}

\noindent
An example of the odemetry report:

\mvar{UPC\_ODOMETRY\_REPORT} 
\msvar{ = "vname=alpha,total\_dist=4205.4,trip\_dist=1105.2"}

\vspace{0.1in}
\noindent
An example of the odemetry report:

\mvar{UPC\_SPEED\_REPORT} \msvar{ = "vname=alpha,avg\_speed=2.21"}

%=================================================================
\subsection{Variables Subscribed for by uFldPathCheck}
\label{sec_upc_subs}

The \app{uFldPathCheck} application subscribes to the following MOOS
variables:

\begin{packed_itemize}[2]
\item \mvar{APPCAST\_REQ}: A request to generate and post a new
  apppcast report, with reporting criteria, and expiration.

\item \mvar{NODE\_REPORT}: A node report for a given vehicle from
  \app{pNodeReporter}.

\item \mvar{NODE\_REPORT\_LOCAL}: A node report for a given vehicle
  from \app{pNodeReporter}.

\item \mvar{UPC\_TRIP\_RESET}: The name of a vehicle to have its trip
  odemeter reset.
\end{packed_itemize}

%=================================================================
\subsection{An Example MOOS Configuration Block}

An example MOOS configuration block can be obtained by entering the
following from the command-line: 

\begin{consoleverb}
 $ uFldPathCheck --example or -e
\end{consoleverb}

\vspace{0.25in}
\begin{listing}{Example configuration for \app{uFldPathCheck}}
\label{lst_upc_econfig}
\footnotesize
\begin{verbatim}
  1  =============================================================== 
  2  uFldPathCheck Example MOOS Configuration                      
  3  =============================================================== 
  4                                                                  
  5  ProcessConfig = uFldPathCheck
  6  {                                                               
  7    AppTick   = 4                                                 
  8    CommsTick = 4                                                 
  9                                                                  
 10    history   = 10  (Default)
 11  }                                                               
\end{verbatim}
\end{listing}
\normalsize
 
%=================================================================
\section{Usage Scenarios the uFldPathCheck Utility}
%=================================================================
\label{sec_upc_usage}

The motivation for this tool is to have a module running on the
shoreside capable of being used in a competition scenario. Especially
in a simulated competition, there may be a need to limit the upper
speed of a participating vehicle to ensure a level playing field
between competitors. Since the vehicle simulators may be running on
separate machines with particpants merely reporting node reports,
there is no way to directly control the upper speed of the
vehicles. By {\em monitoring} the upper speed, this leaves open the
option of either (a) disqualifying a vehicle caught moving too fast,
or (b) imposing a penalty on a speeding vehicle. The penalty chosen is
outside the scope of this module but may include reducing the number
of points awarded for certain accomlishments, adding more noise to
simulated sensors, and so on. Since this usage scenario implies a
"non-compliant" vehicle, we don't want to base the monitored speed on
a value reported by the vehicle. Instead we calculate the speed based
on successive time-stamped node reports with positions.

\pskip

Likewise, the odometry information calculated and posted is also
intended for use in a competition context. Conceivably, part of a
competition may require a vehicle to periodically "re-fuel" after
travelling a certain distance. By having the odemetry information
calculated independently on the shoreside, constraints on total
distance, or fuel calculations may be generated to impose on vehicle
competitions. The \app{uFldPathCheck} application accepts the
\var{UPC\_ODOMETRY\_RESET=VNAME} posting to reset the trip-ometer for
a given vehicle, presumably after a re-fueling event is noted. The
odometry information may also be used directly in competitions where
minimizing the total path length is the primary objective.

\end{document}


%UPC_ODEMETRY
%UPC_SPEED
%UPC_FUEL

%UNITS
%   0.02 unit/meter at 0.2m/sect
%   0.04 unit/meter at 0.4m/sect
%   0.06 unit/meter at 0.6m/sect




</pre></body></html>