<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%=================================================================
\section{The alogpare Tool}
%=================================================================
\label{sec_alogpare}
%\index{alogpare!Overview}

The \app{alogpare} tool is a utility for pruning alog files by
removing certain alog entries outside certain time windows. The time
windows are defined by a user-defined time duration around the entries
of further user-defined variables in the log file. The idea is that
some robot missions have events of interest, e.g., a near collision
event, where retaining all data just before and after the event is
critical to analyzing what may have gone wrong. Perhaps certain high
data rate log entries outside these critical event windows may be
removed without any loss in utility to the users. In some cases this
reduction in logged data may dramatically ease the acrhiving of these
log files.

\pskip

\noindent
This was a new tool in Release 17.7 but was not documented until the
following release.

%=================================================================
\subsection{Mark Variables Define Events of Interest}
%\index{alogpare!Mark Variables}

A {\em mark variable} is a MOOS variable provided to \app{alogpare} on the
command line to indicate an event of interest. From the perspective of
\app{alogpare}, the value of the mark variable does not matter. One or
variables may be provided. For example:

\vspace{0.1in}
\begin{consoleverb}
$ alogpare --markvars=ENCOUNTER,NEAR_MISS
\end{consoleverb}
\vspace{0.1in}

\noindent
The \app{alogpare} utility will make an initial pass through the alog
file and make not of each instance of a mark variable. A window of
time, given by the command line parameter \var{--pare\_window}, will
will be associated around each instance of a mark variable. If windows
overlap, that's fine.  The during of the pare window is 30 seconds by
default, even split in time before and after the mark event. This may
be adjusted on the command line.  For example:

\vspace{0.1in}
\begin{consoleverb}
$ alogpare --markvars=ENCOUNTER --pare_window=60
\end{consoleverb}
\vspace{0.1in}

The \app{alogpare} utility will make a second pass through the alog file
pruning log entries {\em outside} the pare windows, based on variables
on the pare list.

%=================================================================
\subsection{The Pare List of Variables to be Pared}

Variables on the {\em pare list} indicate which lines of an alog file
are to be removed, outside of pare windows. The pare list is defined
on the command line with:

\vspace{0.1in}
\begin{consoleverb}
$ alogpare --markvars=ENCOUNTER --pare_window=60 --parevars=BHV_IPF,BIG_ENTRY
\end{consoleverb}
\vspace{0.1in}

\noindent
Typically these variables constitute relatively large portions of an alog
file, and provide little value outside the pare windows. 

%=================================================================
\subsection{The Hit List of Variables to be Removed Completely}

The \app{alogpare} utility also provides the means for removing named
variables outright, regardless of where they occur relative to a pare
window. These variables are on the {\em hit list}. For example:

\vspace{0.1in}
\begin{consoleverb}
$ alogpare --varkvars=ENCOUNTER --parevars=BHV_IPF --hitvars=ITER_GAP
\end{consoleverb}
\vspace{0.1in}

\noindent
This functionality is also achieved with the \app{alogrm} utility, and
is provided in this tool just as a convenience.


%=================================================================
\subsection{Command Line Usage for the alogpare Tool}
%\index{alogpare!Command Line Usage}
%\index{Command Line Usage!alogpare}

\begin{consoleverb}
 $ alogpare --help or -h
\end{consoleverb}

\vspace{0.1in}
\begin{listing}{Command line usage for the \app{alogpare} tool}
\label{alogpare_usage}
\scriptsize
\begin{verbatim}
  1  $ alogpare -h
  2    
  3    Usage: 
  4    alogpare .alog [out.alog] [OPTIONS]                    
  5                                                           
  6  Synopsis:                                                
  7    Pare back the given alog file in a two-pass manner.    
  8    First pass detects events defined by given mark vars.  
  9    The second pass removes lines with vars on the pare    
 10    list if they are not within pare_window seconds of     
 11    an event line. It also removes lines with vars on the  
 13    hitlist unconditionally. Latter could also be done     
 15    with alogrm.                                           
 16    The original alog file is not altered.                 
 17                                                           
 18  Options:                                                 
 19    -h,--help         Displays this help message           
 20    -v,--version      Display current release version      
 21    --verbose         Enable verbose output                
 22    --markvars=&lt;L&gt;    Comma-separated list of mark vars    
 23    --hitvars=&lt;L&gt;     Comma-separated list of hit vars     
 24    --parevars=&lt;L&gt;    Comma-separated list of pare vars    
 25    --pare_window=&lt;N&gt; Set window to N seconds (default 30) 
 26                                                           
 27  Examples:                                                
 28    alogpare --markvars=ENCOUNTER --parevars=BHV_IPF       
 29             original.alog smaller.alog                    
 30    alogpare --markvars=ENCOUNTER                          
 31             --parevars=BHV_IPF,VIEW_*                     
 32             --hitvars=*ITER_GAP,*ITER_LEN,DB_QOS          
 33             --pare_window=10                              
 34             original.alog smaller.alog                    
 35                                                             
 36  Further Notes:                                           
 37    (1) The order of alogfile args IS significant.         
 38    (2) The order of non alogfile args is not significant. 
\end{verbatim}
\end{listing}
\normalsize

%=================================================================
\subsection{Planned additions to the alogpare Utility}
%\index{alogpare!Planned additions}

\begin{packed_itemize}

\item Soft parevars: removing perhaps every other entry outside pare window. 
Or remove success entries with identical values outside the pare window.

\item
  Separate specification for pare\_window time. Currently the window is split
  evenly around the mark event. Some user may want more control.

\item Pattern matching: Add support for specifying sets of variables with
  simple wildcard prefix or suffix, e.g., \var{NAV\_*} or \var{*\_REPORT}.

\end{packed_itemize}

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