For the meantime it is hard coded logic,
We use these parameters
1: Harsh acceleration,
2: harsh braking,
3 harsh cornering
4. Overspeed [ you must select one specific type only so that it can be applied with the events 1 to 3 above]
So firstly, we get a penalty score by awarding respective points below to a device that reports the parameters of the event above. It sums up to a maximum of 100 %. If an asset after our processing logic has a penalty score close to 100%, we consider the driver to be poor in driving. The opposite is true .
We then get the final driver score to display by subtracting the penalty score from 100;
Hardcoded scheme
//overspeeds (penalty points )
SpeedDiffFrom_0_9 = 2,
SpeedDiffFrom_10_19 =5,
SpeedDiffFrom_20_29 = 10,
SpeedDiffFrom_30_49 = 30,
SpeedDiffFrom_50_above = 70
//harsh behavior
HarshAccel = 10,
HarshBraking = 10,
HarshCornering = 10
Actual Processing
To begin with, overspeed penalty score is calculated by finding the difference between vehicle speed and speed limit, penalty points are awarded depending on severity and the time in minutes spent over that speed limit. So, we get overspeed episodes before we do:
PenaltySpeedScore = (SpeedDiffFrom_10_19Points x speedDifference x timeInMinutes )
Actualspeedscore = 100 - PenaltySpeedScore;
After getting overspeed penalty score we go ahead to get harsh events penalty score per item.
penaltyHarshCornering = HarshCorneringPoints x harshCornerCountsPerKm);
penaltyHarshBraking = penaltyHarshBrakingPoints x harshBrakingCountsPerKm);
penaltyHarshAccel = penaltyAccelBrakingPoints x harshAccelCountsPerKm);
Then actual score
ActualCorneringScore = 100 - penaltyHarshCornering
ActualHarshBraking = 100 - penaltyHarshBraking;
ActualAccelScore = 100 – penaltyHarshBraking
Then what is displayed to the user is:
OverallScore = (Actualspeedscore + ActualAccelScore + ActualHarshBraking +ActualCorneringScore )/4