Add true north conversion function to IfcOpenShell geolocation util lib

This commit is contained in:
Dion Moult
2020-07-27 18:38:34 +10:00
parent e2621e0207
commit 9359c388d1
@@ -24,3 +24,7 @@ def xyz2enh(x, y, z, eastings, northings, orthogonal_height, x_axis_abscissa, x_
northings = (b * x) + (a * y) + northings
height = z + orthogonal_height
return (eastings, northings, height)
# Used for converting the X and Y vectors of the X Axis in IFC geolocation
def xy2angle(x, y):
return math.degrees(math.atan2(y, x)) - 90