<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%========================================================================
\section{Hazard File Format}
\label{sec_hazard_format}
%========================================================================

A {\em hazard file} is a simple text file that:

\begin{packed_itemize}[2]
\item describes a hazard field, typically with one object per line,
\item is read by \app{uFldHazardSensor} to determine the simulated laydown,
\item is read by \app{uFldHazardMetric} to have a ground truth to grade against,
\item may be generated with the \app{gen\_hazards} command line tool.
\end{packed_itemize}

\noindent
A typical hazard file is shown below. The first line is a comment indicating the 
command line invocation responsible for generating this particular file, using
the \app{gen\_hazards} utility described separately.

\vspace{0.12in}
\begin{fileverb}
 // gen_hazards --polygon=-100,0:-100,-300:300,-300:300,0 --objects=5,hazard --objects=8,benign
 hazard = x=-151,y=-217.3,label=01,type=hazard
 hazard = x=263.2,y=-8.5,label=02,type=hazard
 hazard = x=48.5,y=-195.7,label=03,type=hazard
 hazard = x=165.9,y=-116.4,label=04,type=hazard
 hazard = x=101.3,y=-159.3,label=05,type=hazard
 hazard = x=257.6,y=-131.3,label=06,type=hazard
 hazard = x=217.3,y=-16.7,label=07,type=hazard
 hazard = x=-14.2,y=-293.60001,label=08,type=hazard
 hazard = x=260.2,y=-66.2,label=09,type=hazard
 hazard = x=-65.8,y=-125.2,label=10,type=hazard
 hazard = x=171.9,y=-253.7,label=11,type=benign
 hazard = x=-150.3,y=-117.5,label=12,type=benign
 hazard = x=-59.8,y=-294.1,label=13,type=benign
 hazard = x=98.2,y=-127.7,label=14,type=benign
 hazard = x=-178.8,y=-234,label=15,type=benign
 hazard = x=24,y=-61,label=16,type=benign
 hazard = x=250.3,y=-214.6,label=17,type=benign
 hazard = x=97.7,y=-245.5,label=18,type=benign
\end{fileverb}
\vspace{0.12in}

\noindent
The \app{gen\_hazards} utility will ensure that each hazard has a
unique label.  The \app{uFldHazardSensor} will complain if there are
duplicate labels. The hazard file may also be further edited to change
rendering hints for the default shape, color or size of the object.
These hints are used, for example, by \app{uFldHazardSensor} to
generate \mvar{VIEW\_MARKER} postings consumable by
\app{pMarineViewer}.

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