So I posted this thread over in the Bentley groups last week, but no
responses and I'll give it a shot here...
My group does a lot of mapping using Geographics, a GPS (which returns
lat and long) and a rangefinder (which returns distance and bearing and
heading). The five datums are written into a log file for each point we
want to plot on a drawing. I've been tasked with writing a program
which will read this logfile, im****t the base lat and long coordinates
into geographics, and then offset the coordinates using the distance
and bearing information from the rangefinder.
At this point, I can break the log file entrties into the individual
components (lat,long,dist,bear,inclin) and place these points in the
drawing in the following manner...
CadInputQueue.SendCommand "Place Point" CadInputQueue.SendCommand
"Gcoord point " & Longitude & "," & Latitude
I am also able to use trig and solve for the appropriate X and Y
displacment like this...
Angle = Angle * 3.14159 / 180
Xdisp = Cos(Angle) * Distance
Ydisp = Sin(Angle) * Distance
Unfortunatly, this is where I run into trouble. If I simply do it like
this...
CadInputQueue.SendCommand "Gcoord point " & Longitude + Xdisp &
"," & Latitude + Ydisp
....Geographics interprates the X and Y disp variables as degrees
instead of feet. Needless to say, this tends to skew the offset by a
few million feet instead of the hundred or so desired.
If anyone has an idea as to how I could select the actual coordinate
points of the last thing drawn or run the geographics coordinate
conversion in a way to return the coordinates in a manipulable form, or
anything that would work, please let me konw.
Thanks in advance.
-Matt


|