I have a math challenge that I cannot figure for couple of days. Any help is more than welcomed.

A driver is driving the car and our device records the speed + the g force.

Having this information we translate into 3 categories for each time slot: "safe", "moderate" and "aggressive".

Then for the whole road we have 3 percentages:

- driving safe percentage 0 -> 1

- driving moderate percentage 0-> 1

- driving aggressive percentage 0 -> 1

Having all these percentages we would like to compute a score for the whole drive between 1 and 10

Aggressive driving should get more close to 10, safe should get more close to 1.

Many thanks,

Radu