osm maxspeed

Hello
I’m creating a mobile app that determines if someone if a good driver. The phone sits on the dashboard and collects GPS information while the user is driving. I need to determine a way if the driver is following the speed limit, and I would like to do this via OpenStreetMap. What is the best way to get speed limits from OpenStreetMap?

Not sure of the detail of how but for a working example you could look at OSMand.

It displays the speedlimit of the road, and flashes a warning if you exceed it.

Although there is a bit more to being a good driver than adherence to a speedlimit .Insurance company’s black boxes, which young drivers often have use g-sensors to assess braking, acceleration and cornering.

And what do you do if there is no speed limit known for a given road? Depending on where you do the test you might find out that more than 80% of the roads has no speed limit at all (in OpenStreetMap I mean).
Assume default values then? Where do you get those from?