It was the middle of March, there was a massive and potentially chaotic road rule change affecting vehicles at uncontrolled intersections turning right from terminating roads at T intersections. Concurrently, another rule change for vehicles turning left or right at T intersections from roads that do NOT terminate and also at crossroads. The changes were 2 weeks away.
My background in teaching vehicle dynamics and a bit of rallying has always provided me with more than a passing interest in road safety and I know drivers learn skills & procedures quite quickly, especially in the early stages of learning to drive but these become habitual and drivers do an amazing amount of their activity subconsciously.
I felt that having a nation learn a few lines like “top of the T goes before me” and “If you’re turning right, give way” may not be entirely sufficient. The two messages , if confused, become contradictory: “Top of the tee goes before me” applies when you are driving up a road that ends at the T, whether there is a give way sign or not, you must now give way to the car approaching from your left that will turn right down the road you are on. OK . We got it. The public already did this 99% of the time because there is usually a give way sign at the end of each terminating road.
The major rule change however was for traffic turning left or right from NON terminating roads onto the terminating road of the T. Traffic turning left can go, traffic turning right gives way to everything, so it’s just the opposite of before.
With the two messages out there, if you used the wrong slogan at the wrong time such as drivers turning left into the terminating road “would wait for the opposing car turning right if the followed “Top of the tee goes before me” since one slogan rhymed and the other one didn’t which seems to be an important trend for road safety marketing. I do wonder which one would have a greater chance of being recalled. A few months on it’s easy to see that many drivers still forget the new rule.
When I heard there wasn’t an app for the implementation of the new rules I was disappointed. The reasoning I believe was that apps cause distraction. That’s partly true; they “can” cause distraction, but they don’t have to. There are voice driven texting solutions and UIless apps. I agree there is work to be done but what a driver is distracted by is partly due to their perception of what they are doing at the time and how much concentration it deserves.
I decided that some form of dynamic reminder had to be better than nothing. I used a few wysiwyg tools like app-inventor and wave-maker to try to build some logic around the road rules and see how the various roading entities would help build a logarithm to tell users what they needed to know at various intersections. I aimed at the Android platform because of the entry level price point.
Getting the data
One of the big problems was getting data.
My initial thinking led me to believe I needed locations of Stop signs, Give way signs, roundabouts, intersections and traffic lights. I also need to know the altitude of roads that cross each other without connecting directly. One effect of the new rule change is that it bought the T intersection rules into line with each other , so the giveway sign locations were not important.
The NZTA had already provided me with some data sets for the state highways, but it was the councils that held the data on road entities outside of the state highway network.
So I just had to email the 53 councils and ask them for the data.
I contacted two councils and almost immediately it was obvious I was never going to get this data in three weeks and even if I did get it, the formats were going to be all over the place. Some councils just had the names of roads that contained a stop or give way sign. One nice lady at a smaller council said she would try to fax something to me, bless her.
Resource mapping at least in a developer friendly (coordinates) format was not as common place as I’d expected considering we are in 2012. Even if I was to pursue it under an OIA it would take weeks that I did not have.
I drove around in my car for a couple of days trying to think of logarithms and at the same time of course I would learn the new road rules.
I needed a warning that came just at the right time. How would I do that dynamically. Was it even possible ?
A quick browse of the koordinates.com website gave me access to 2 sets of GPS Road centre lines, one provided by the government, the other set provided an improved version made by volunteers at NZ open GPS maps. The same group also provided a data set on the locations of New Zealand traffic lights. I’m not a developer but I think a monkey could use the Koordinates API. If these data sets were not available there was simply no way I could have built this application.
How the app works
When you set your current location and destination into the device it requests a route from open.mapquest.com returning navigation instructions along with GPS locations of the intersections where users would turn left or right . It’s an open api using data from opengpsmaps.
Using these GPS locations and Koordinates.com API I could then tell how many roads were present at each intersection. A bit of string parsing and I could see whether each road begins or ends at the intersection. Combining traffic light data into this allowed me to give accurate instructions in addition to the MapQuest ones, when vehicles turn left from non terminating roads at a T intersection they are reminded that they do not have to give way to vehicles opposing them, turning right. Conversely vehicles turning right at non-terminating roads are reminded to give way to opposing traffic turning left. In this respect the app is a first.
Many intersections exist where opposing vehicles turning left have their own give way bay, technically separate to the intersection but a good source of confusion. Left turning bays are present at most major intersections with lights. So it reminds of the exception to the rule for left turning traffic bound by a give way bay from the left lane. There is no data set for such left turn bays so it’s, somewhat incorrectly, just bound to cross roads with traffic lights, but this is something we wish to pursue. This is a case in point for all councils to have the same base data sets. The app also reminds users to indicate and use the correct lane at roundabouts.
The screen glows red when you have to give way, green when you don’t. It also shows a satellite image of the intersection, or a Street view image, both from Google. Both are rotated to align with the compass heading.
I also made a small animation which, sadly, does not play well with different screen sizes. Users can test the new rules and view the intersection from above. The intersection can be transformed from a crossroads to a T that you can rotate to suit, you can instruct your car to turn left and right and hear the explanation of the rule with the animated diagram.
With the bulk of the app working I thought it might be nice and perhaps in the spirit of open data to do a little bit of sharing. After all, the device you have in your pocket does not just receive data. It’s duplex !
My thinking was along the lines of leaving a note on a road about the conditions ahead, something like ice, oil, a huge pothole, a slippery or deceptive corner. Everybody knows of a tricky place on the roads where people come to grief. Its stupid not to share such dangers.
Here’s 100,000 odd I plotted for the mix and mash competition last year: http://mixnmashentry.blogspot.co.nz/
While on one hand I wanted to provide a visual and easy way of collecting as much data as possible from users I realised that it was important to have a reliable voice interface, the last thing I wanted was to distract the user and take their eyes away from the road. Despite having a button and voice interface for notes, the current beta edition is not a shining example of simplicity.
The other major idea here is that the app can, although it does not do it in the beta version, (mainly because I have not advised users of the functionality) turn on the accelerometer around intersections and previous accident spots, there isn’t a single moment on a journey where a moving vehicle does not produce a force, so, it’s entirely possible with a clock, compass & accelerometer to determine if a driver is braking, accelerating or turning, and how much, how quickly those forces evolve and dissipate, the steering corrections you make in a corner, how smoothly you drive, or even if one of your shock absorbers is worn, You could potentially advise someone how to brake in the middle of an emergency, reminding them that the car has or hasn’t got ABS brakes and not to look at the object you want to avoid would be a really good start.
It can also activate when forces reach a higher than normal level. Why? Because that gives us a world first. It also allows us to see the forces created by vehicles. The type of force (Braking, acceleration, bumps, cornering forces and inevitably combinations of braking and turning. The latter being the most common reason a driver will lose control of a car. So This map of forces achieved by hundreds of different cars and trucks over time would give us an insight never seen before , a force map of the country. There is no reason it can’t be contributed to anonymously and giving something unique back to road safety & government.
Mapping and analysing these forces will expose patterns based on driving style, location, weather conditions, time, season, temperature, sun-strike, traffic density, corner design and road surface. Feeding that data back to other users dynamically could actually be invaluable.
Rally drivers have a navigator sitting next to them to tell them the basics of what they need to know about the road ahead, obviously with rallying the emphasis is on speed, but turn that idea around and you have a great way to both educate and warn motorists of road conditions and road layout whilst making them much more aware of the types of forces they are creating. It’s simple physics and NZTA would end up with a map of the forces that vehicles produce at different locations and any other measurable factors.
Imagine if you got points for driving smoothly, points that could be traded for coffee, discount petrol or parking. So you can influence how people drive, make them more aware of the forces in their car, which is something most people are not aware of, modern cars isolate drivers enormously. Most are unaware of the consequences of excessive diagonal forces such as braking and turning simultaneously. It could make drivers aware of their own mistakes (carefully) and potentially one could tailor driver education, just for you, to the road immediately in front of you.
It was disappointing to see that simple ideation did not produce a digital outcome out from the ministry or their ad agency. If a cellphone app that could run on $100.00 smart phones could give a dynamic warning just before it’s needed, isn’t that useful?
My company specialises in ideation for web and phone apps; we don’t manage or run apps. I used to think in terms of ideology that the sky was the limit for digital, of course it’s not, the real limit is the availability of data, but it’s not a one way street, we should give back and make the data stronger if we can. I’m sure anyone reading this blog understands why.