diff --git a/tools/csc/csc-compute-neighbor-stats b/tools/csc/csc-compute-neighbor-stats new file mode 100755 index 000000000..4ccaa1461 --- /dev/null +++ b/tools/csc/csc-compute-neighbor-stats @@ -0,0 +1,54 @@ +#!/usr/bin/perl + +$num = 0; +$override_range = $ARGV[0]; + +# Go through the .csc file; find the transmission range and all the +# nodes' x and y coordinates. +while() { + if(/\([\d.]+)\<\//) { + $range = $1; + } + + if(/\([\d.]+)\([\d.]+)\ $csc"); + +while() { + if(m-\[\d.]+\-) { + print O "$range\n"; + } elsif(m-\[\d.]+\-) { + print O "" . ($range * 2) . "\n"; + } elsif(m-\[\d.]+\-) { + print O "$success\n"; + } else { + print O; + } +}