소스 검색

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 년 전
부모
커밋
58b369b2bf
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      radangeld/main.cpp

+ 1
- 1
radangeld/main.cpp 파일 보기

@@ -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…
취소
저장