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

\vspace{0.1in}
\noindent
A concise form of this documentation is available with \var{alogcat
  --help, -h}, and the web version of this content can be quickly
opened with \var{alogcat --web, -w}.

\vspace{0.1in}
\noindent
The \app{alogcat} tool is a utility for concatenating a given set of
alog files into a new single alog file. Recall that each alog file has
a header at the beginning of the file with meta information. This
includes the starting timestamp which allows all further timestamps to
be relative to the starting time. So to concatenate alog files, we
cannot simply just append one file onto the end another. If that were
done, there would be multiple header blocks in the file and different
blocks of data with timestamps relative to different start times.

\vspace{0.1in}
\noindent
Why would we need this tool? In certain field exercises, occasionally
an operator may decide to stop the mission (killing the MOOS
community), and restart with perhaps a slight modification in an
important parameter. In such cases, two sets of log files will be
produced, one from before the restart and one from after. The two of
them may constitute a valid mission log file, but they are now split
into two. The \app{alogcat} utility can be used for merging them
back into one.


\vspace{0.1in}
\noindent
The \app{alogcat} tool performs a proper concatenation. First, it
determines the chronological ordering of the provided alog files.  It
will use the header block and starting time of the earliest file.  For
the remaning files, (a) the relative time to the first file is
calculated, (b) the header block of the later file(s) is removed, (c)
the log entries of the later file(s) are appended to the end of the
earlier file with timestamps appropriately adjusted along the way.

\pskip
\noindent
As an example, consider two alog files created from the same mission,
\var{fil1.alog} and \var{file2.alog}. They can be joined with:

\vspace{0.1in}
\begin{consoleverb}
$ alogcatfile1.alog file2.alog --new=final.alog --verbose
Performing a pre-check on the list of alog files...
Processing file: file1.alog
Processing file: file2.alog
Created new alog file: final.alog
\end{consoleverb}

\vspace{0.1in}
\noindent
Overlapping files will produce an error and no new file will be
created.  If a second log file is created by re-starting the logger
after it has been stopped during a mission, it is possible that
initial postings will have negative time stamps. This is due to the
MOOSDB delivering the mail with the latest values. These postings may
have occurred before the logger re-started, and in fact may represent
duplicate postings found in the earlier log file. These postings are
ignore. Keep in mind that any posting in subsequent log files that
have a negative timestamp will be ignored with the files are
concatenated.

\vspace{0.1in}
\noindent
If the new file to be created already exists, no action will be taken.
This can be overridden with the \var{--force, -f} parameter.
</pre></body></html>