Coordinates of the third point
Posted by: fredometro on
Jan 6th, 2004 |
Filed under: MS-Access
Quertion: Hi!
How would you calculate the coordinate of a third point I have already two points, distances and angles from these points to the third point. I want to do triangulation and I don’t know which formula to apply.
Thanks
Hi!
Try the function below:
Global Const PI = 3.14159265358979
Public Function calRayonnement(Xa, Ya, DistanceAC, AngleInDegrees, OutputsXcOrNotXcAsResult As Boolean)
' Ray calculate next point coordinates from angle & distance.
' Xa , Xb are the coordinnates for starting point
' DistanceAC : Distance to measured point
' AngleInDegrees : as named
' OutputsXcOrNotXcAsResult = True, function will return Xc otherwise Yc, the coordinates of measures point
Dim Xc, Yc, glAB, lnV, lnH, lnD
Dim AngleInGradient
AngleInGradient = AngleInDegrees / 180 * PI
Xc = Xa + DistanceAC * Sin(AngleInGradient)
Yc = Ya + DistanceAC * Cos(AngleInGradient)
Debug.Print
Debug.Print "Xc = " & Xc
Debug.Print "Yc = " & Yc
If OutputsXcOrNotXcAsResult Then calRayonnement = Xc Else calRayonnement = Yc
End Function
Output of these functions:
No related posts.

Tags:
Add A Comment
You must be logged in to post a comment.