Aligning multiple Planes red axis

Hello, I have set of planes in grasshopper arranged in circular path. I want all these plane’s red axis (x axis) towards outside or away from center of circular path. As shown in the image, plane 13 has red axis towards inside space, whereas plane 14 onwards this red axis changes to outside space. I want all the plane’s red axis to point towards outward. I used flip plane from vectors and also component from pufferfish but didn’t get desired result. Please guide me how to obtain this result. Thank you.

plane flipping.gh (8.3 KB)

This would have been slightly easier if your definition included a curve.

I used an interpolated curve to compare the plane normals against tangents. If the dot product is smaller than 0, the plane needs to be flipped otherwise not all Y axis vectors point upwards.

The cross product of a the curve plane which is not planar and the local tangent is used to align the plane rotations.

plane flipping mrtn.gh (23.5 KB)