<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%===================================================================
\subsection{Preliminaries: Swim Files}
\label{sec_get_code}

Swim files are used for seeding the rescue mission with a number of swimmers
and their locations. 

\vspace{0.1in}
\begin{fileverb}
// gen_swimmers --pav60 --swimmers=5
// Lowest dist between swimmers: 11.40
poly = pts={60,10:-30.3602,-32.8374:-4.6578,-87.0535:85.7024,-44.2161}
swimmer = name=p01, x=57, y=-1
swimmer = name=p02, x=54, y=-12
swimmer = name=p03, x=-12, y=-33
swimmer = name=p04, x=-9, y=-66
swimmer = name=p05, x=-11, y=-49
\end{fileverb}
\vspace{0.1in}


\vspace{0.1in}
\begin{fileverb}
// gen_swimmers --pav60 --swimmers=5 --unreg=4
// Lowest dist between swimmers: 15.00
poly = pts={60,10:-30.3602,-32.8374:-4.6578,-87.0535:85.7024,-44.2161}
swimmer = type=reg, name=p01, x=66, y=-12
swimmer = type=reg, name=p02, x=53, y=-49
swimmer = type=reg, name=p03, x=12, y=-37
swimmer = type=reg, name=p04, x=35, y=-22
swimmer = type=reg, name=p05, x=59, y=-26
swimmer = type=unreg, name=x01, x=30, y=-53
swimmer = type=unreg, name=x02, x=2, y=-82
swimmer = type=unreg, name=x03, x=44, y=-37
swimmer = type=unreg, name=x04, x=69, y=-42
\end{fileverb}
\vspace{0.1in}

%-----------------------------------
\subsubsection*{Generating a Swim File}

\noindent
Swim files are created using the \app{gen\_swimmers} command-line utility.
This utility generates output to the command-line. A swim file can be
created by re-directing the output to a file. For example:

\vspace{0.1in}
\begin{consoleverb}
$ gen_swimmers --pav60 --swimmers=15 --unreg=5 --buf=10 &gt; swim_file.txt
\end{consoleverb}
\vspace{0.1in}

\noindent
Of course the result is just a text file and can simply be edited. But
the command-line utility ensures (a) all swimmer locations are within
the given polygon rescue region, and (b) the minimum distance between
swimmers is respected if it is specified.

\vspace{0.1in}
\noindent
The \app{gen\_swimmers} utility is in \var{moos-ivp-2680} tree.

%-----------------------------------
\subsubsection*{Viewing a Swim File}

The \app{swimview} command-line utility enables a user to visually
preview the swim file with a visual background of the rescue region
polylgon.  When a mission is launched, the user also can see the
ground truth location of all swimmers, courtesy of \app{uFldRescueMgr}
and \app{pMarineViewer}. But the command-line utility does not require
the launching of a mission and also allows the user to quickly flip through
multiple swim files. Launching from the command-line:

\vspace{0.1in}
\begin{consoleverb}
$ swimview swim_file1.txt swim_file2.txt swim_file3.txt
\end{consoleverb}
\vspace{0.1in}

\vspace{0.1in}
\noindent
The \app{swimview} utility is in \var{moos-ivp-2680} tree.


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