From 47cbab691fed597e38fd305d5837dbf56a09b814 Mon Sep 17 00:00:00 2001 From: Shawn Gilroy Date: Fri, 30 Oct 2020 12:18:42 -0500 Subject: [PATCH] Normalize reli check to each computer. Associated with Issue when computers are not synced in terms of time (i.e., managed by organization). --- reliabilityscoring.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/reliabilityscoring.h b/reliabilityscoring.h index 9262dab..a1e4924 100644 --- a/reliabilityscoring.h +++ b/reliabilityscoring.h @@ -150,8 +150,6 @@ static bool PerformReliabilityCheck(QString mWorkingDirectory, QString Group, QS if (mPrimaryCheck && mReliCheck) { ReliabilityScoring::CompareObservers(mPrimary, mReli, &mMeasure); - //qDebug() << mMeasure.fTIA; - //qDebug() << mMeasure.dTIA; } ReliResults.append(mMeasure); @@ -183,8 +181,11 @@ static bool shouldRemove(KeySetEntry first, KeySetEntry second) */ static void CompareObservers(QJsonObject mPrimary, QJsonObject mSecondary, ReliabilityMeasure * mMeasure) { - QDateTime startTime = QDateTime(QDateTime::fromString(mPrimary["StartTime"].toString())); - QDateTime endTime = QDateTime(QDateTime::fromString(mPrimary["EndTime"].toString())); + QDateTime startTimeP = QDateTime(QDateTime::fromString(mPrimary["StartTime"].toString())); + QDateTime startTimeR = QDateTime(QDateTime::fromString(mSecondary["StartTime"].toString())); + + QDateTime endTimeP = QDateTime(QDateTime::fromString(mPrimary["EndTime"].toString())); + QDateTime endTimeR = QDateTime(QDateTime::fromString(mSecondary["EndTime"].toString())); int totalSecs = static_cast(mPrimary["SessionDuration"].toDouble() / 1000.0); @@ -329,11 +330,11 @@ static void CompareObservers(QJsonObject mPrimary, QJsonObject mSecondary, Relia // Keys sorted - QList> mPrimaryFrequencyBins = ReliabilityScoring::GetFrequencyBins(bins, SharedParseFrequencyKeySet, startTime, PrimaryPressedKeys); - QList> mPrimaryDurationBins = ReliabilityScoring::GetDurationBins(bins, SharedParseDurationKeySet, startTime, endTime, PrimaryPressedKeys); + QList> mPrimaryFrequencyBins = ReliabilityScoring::GetFrequencyBins(bins, SharedParseFrequencyKeySet, startTimeP, PrimaryPressedKeys); + QList> mPrimaryDurationBins = ReliabilityScoring::GetDurationBins(bins, SharedParseDurationKeySet, startTimeP, endTimeP, PrimaryPressedKeys); - QList> mSecondaryFrequencyBins = ReliabilityScoring::GetFrequencyBins(bins, SharedParseFrequencyKeySet, startTime, ReliPressedKeys); - QList> mSecondaryDurationBins = ReliabilityScoring::GetDurationBins(bins, SharedParseDurationKeySet, startTime, endTime, ReliPressedKeys); + QList> mSecondaryFrequencyBins = ReliabilityScoring::GetFrequencyBins(bins, SharedParseFrequencyKeySet, startTimeR, ReliPressedKeys); + QList> mSecondaryDurationBins = ReliabilityScoring::GetDurationBins(bins, SharedParseDurationKeySet, startTimeR, endTimeR, ReliPressedKeys); for (int i(0); i