From 29ae0aee57b71053f000f8b8cbc0386a6b1a1e4a Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Sat, 14 Jul 2018 14:26:29 -0700 Subject: gpsprof: add mean SNR to polar plots. --- gpsprof | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'gpsprof') diff --git a/gpsprof b/gpsprof index a97df99e..46bfd2d2 100755 --- a/gpsprof +++ b/gpsprof @@ -744,14 +744,13 @@ class polarplot(plotter): return res def plot(self): - ss_min = 99 # min satellite signal strength - ss_max = 0 # max satellite signal strength + ss = [] for fix in self.fixes: - # collect min and max - if ss_max < fix[1]: - ss_max = fix[1] - if 0 < fix[1] and ss_min > fix[1]: - ss_min = fix[1] + ss.append(fix[1]) + + # calc sats used data: mean, min, max, sigma + stat_ss = stats() + stat_ss.min_max_mean(ss, 0) fmt = '''\ unset border @@ -815,8 +814,8 @@ set palette defined (100 "blue", 200 "green", 300 "red") count = len(self.fixes) fmt += '''\ set label 11 at screen 0.01, screen 0.15 "%s\\nmin SS = %d\\nmax SS = %d\\n\ -Samples %d" -''' % (self.name, ss_min, ss_max, count) +mean SS = %d\\nSamples %d" +''' % (self.name, stat_ss.min, stat_ss.max, stat_ss.mean, count) fmt += '''\ # and finally the plot -- cgit v1.2.1