Im trying to work out if the inconsistencies im noting with roundabout turn_angle’s are due to OSM, or the calculation I’m using to convert is
turnAngle=Math.toDegrees((double)rName.getInstructions().get(i).getExtraInfoJSON().get(“turn_angle”));
This works perfectly for most roundabouts, but not all.
Here’s some examples
green icon is start , red is finish
TitleBar has Raw Angle and the conversion
Country is New Zealand, drive on Left
at this roundabout
doing a 180 turn around the roundabout results in a turn_angle : 50.99, raw value 0.89
a 90 degree turn to the left at the same roundabout results in turn_angle151.83, raw value 2.65
a straight through pass has a turn angle of 227 degrees, raw value 3.96
a 90 degree turn at the same roundabout from the opposing direction results in a 330 degree angle , raw 5.77
a straight through pass from opposing direction is 229
At another roundabout just a few hundred meters away the problem does not occur
this is https://www.openstreetmap.org/#map=19/-37.77270/175.29353
the turn angles are correct, from all directions
and still correct from another direction
there are several other roundabouts that calculate incorrectly
eg https://www.openstreetmap.org/#map=19/-37.78532/175.27147
152 deg should be ~45
Any ideas why such an inconsistency should occur ?
edit=>
On some of the roundabouts I notice the turn_angle is completely missing and the clockwise value is 2, normally 1, however that’s rare and does not apply to the examples I provided.