[scripts] AggSetCoord: document batch processing

Add an example of shell script to set different coordinates at multiple
line ranges in a single aggregation file.
This commit is contained in:
Matteo Cypriani 2013-07-31 13:34:57 -04:00
parent e56a718b22
commit 3bc4c3bb8d
1 changed files with 22 additions and 0 deletions

View File

@ -98,6 +98,28 @@ Work only on positioning requests transmitted by MAC address I<mac>.
=back
=head1 BATCH PROCESSING
If you have a bunch of different coordinates to put in the same aggregation file
(named F<input.agg> in the following example), you can prepare a file that
contains, on each line, a line range and the set of coordinates to apply at this
line range, separating the two fields by a space. You can then use a little
shell script such as the following to read your input file (named
F<batchfile.txt> here) and call AggSetCoord for each line:
FILE=input.agg
BATCHFILE=batchfile.txt
i=0
while read LINES COORD ; do
i=$(expr $i + 1)
echo "Setting coordinates ($COORD) at line(s) $LINES"
owlps-aggsetcoord -I .step$i -l "$LINES" -c "$COORD" "$FILE"
done <"$BATCHFILE"
You can also include the MAC address in the input file and call AggSetCoord with
the B<-m> option.
=head1 COPYING
This script and its documentation are part of the Owl Positioning System (OwlPS)