Explorar el Código

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 hace 5 años
padre
commit
58b369b2bf
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      radangeld/main.cpp

+ 1
- 1
radangeld/main.cpp Ver fichero

@@ -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…
Cancelar
Guardar