Browse Source

fix cpm calculation.\nNote: while calculation is correct now the wrong method is used to determine cpm. a fixed time interval should be used.

master
Matthias Janke 5 years ago
parent
commit
58b369b2bf
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      radangeld/main.cpp

+ 1
- 1
radangeld/main.cpp View File

@@ -579,7 +579,7 @@ void publish_cpm (zmqpp::context &zmqc)
579 579
 			if (validevents > 0)
580 580
 			{
581 581
 				cpm << timestamp
582
-				    << static_cast<double> (validevents / (timestamp - oldtimestamp) * 1000 * 60);
582
+				    << static_cast<double> (validevents / ((timestamp - oldtimestamp) / 1000.0 / 1000.0 ) * 60.0);
583 583
 
584 584
 				cpmsocket.send (cpm);
585 585
 

Loading…
Cancel
Save