#!/usr/bin/perl

# snr.pl
# Read STDIN and output average of each X samples to STDOUT

# Copyright 2001 John Ackermann   Version: 15 July 2001
# May be freely used provided these notices are retained, and a copy
# of any modified version that's distributed to third persons is sent
# to jra@febo.com

my @fields;
my $snr;

while ($reading=<STDIN>) {
	@fields = split(/ /,$reading);
	$snr = $fields[1] - $fields[2];
	printf "%s %3.2f\n",$fields[0],$snr;
	}
