Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: [V8i VBA] Calculate bearing angle from North to a projected point perpendicular on a target element

$
0
0

[quote user="Jon Summers"]

What you're calculating is the angle between one implicit vector (North) and another vector that you construct from your two coordinates.  The North vector is, of course, constant...

1
2
DimNorth AsPoint3d
North = Point3dFromXY (0.0, 1.0)

Compute your vector from the coordinates and then use Matrix3dFromRotationBetweenVectors to find the angle (in Radians) between them.

[/quote]

Hi Jon, I hadn't considered them as vectors but you are correct.

I've been almost successful using the suggested method but I seem to be fighting against MicroStation's method of calculating angles. The values I calculate appear to be calculated CCW from North whereas I need them CW from north. As per the image in the first post, the angle I get for the top green line is 169.82839333113.

I found a formula which does guarantee the correct angle but wanted to check if there is something I can do to get the same values using Matrix3dFromRotationBetweenVectors.


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>