From 3bc4c3bb8d202c5143591508a2a74f2fd1436b5f Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Wed, 31 Jul 2013 13:34:57 -0400 Subject: [PATCH] [scripts] AggSetCoord: document batch processing Add an example of shell script to set different coordinates at multiple line ranges in a single aggregation file. --- scripts/owlps-aggsetcoord.pl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/scripts/owlps-aggsetcoord.pl b/scripts/owlps-aggsetcoord.pl index 4c5fdcd..1ec68d1 100755 --- a/scripts/owlps-aggsetcoord.pl +++ b/scripts/owlps-aggsetcoord.pl @@ -98,6 +98,28 @@ Work only on positioning requests transmitted by MAC address I. =back +=head1 BATCH PROCESSING + +If you have a bunch of different coordinates to put in the same aggregation file +(named F 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 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)