- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]

From: Don Dietrick <dietrick_at_bbn.com>

Date: Tue, 15 Aug 2006 15:30:26 -0400

Hi Chris,

On Aug 11, 2006, at 2:31 PM, Esposito, Christopher wrote:

*>
*

*> Hello, All-
*

*> I have the coordinates of 2 points Lat1, Long1 (which represent
*

*> a sensor) and Lat2, Long2 (which represent a target. The sensor has a
*

*> field of view of 30 degrees, and we currently assume that the
*

*> target is
*

*> centered in the sensors' field. What I would like to do is
*

*> construct and
*

*> draw a triangle (an OMPoly) with the sensor location at the apex of
*

*> the
*

*> triangle and the target location at the center of the base, so that a
*

*> line from sensor to target bisects the triangle.
*

*>
*

*> 1) If this triangle was in Euclidean geometry, then the distance
*

*> between
*

*> the two points and the known angle (15 degrees) between the hypotenuse
*

*> and the bisection line from sensor to target, plus a bit of
*

*> trigonometry, would allow me to calculate the distance between the
*

*> target location at the midpoint of the base and the other 2 corners of
*

*> the triangle at either end of the base.
*

*>
*

*> 2) The spherical_distance method in the GreatCircle class seems to
*

*> me to
*

*> be the right method for calculating the distance between the two
*

*> points
*

*> on a sphere (right?). This method says it returns a float - what
*

*> units
*

*> (miles, meters, etc.) is this number in?
*

Yes, spherical_distance will give you that information. The answer

is in radians, you can convert it to the units you want using the

com.bbn.openmap.proj.Length class - i.e.,

com.bbn.openmap.proj.Length.METER.fromRadians(answer);

You can also use the com.bbn.openmap.geo.Geo class for this. The

GreatCircle class is based on a sphere, the Geo class is based on an

ellipsoid.

*>
*

*> 3) if I use the method from (1) and the distance from (2) to calculate
*

*> the distance from the target to the other 2 corners that define the
*

*> base
*

*> of the triangle, what OpenMap method call will give me the coordinates
*

*> of these points given their distance from a known point? I've looked
*

*> through a few projection-related classes, but my knowledge of
*

*> projections and spherical geometry is limited enough I'm not sure I
*

*> would recognize the answer if I saw it.
*

If you just want to draw the 'triangle', I'd follow David Ward's

suggestion of using an OMArc. Your triangle isn't really be a

triangle on a sphere, after all. The OMArc will take care of the

curved edges for you.

If you need to know the points for some other calculations, you can

use the GreatCircle.spherical_between method, which will give you the

point at a known distance and azimuth from another point. Again,

Geo.offset(distance, azimuth) will give you the answer on an ellipsoid.

Hope this helps,

Don

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Don Dietrick, dietrick_at_bbn.com

BBN Technologies, Cambridge, MA

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Date: Tue, 15 Aug 2006 15:30:26 -0400

Hi Chris,

On Aug 11, 2006, at 2:31 PM, Esposito, Christopher wrote:

Yes, spherical_distance will give you that information. The answer

is in radians, you can convert it to the units you want using the

com.bbn.openmap.proj.Length class - i.e.,

com.bbn.openmap.proj.Length.METER.fromRadians(answer);

You can also use the com.bbn.openmap.geo.Geo class for this. The

GreatCircle class is based on a sphere, the Geo class is based on an

ellipsoid.

If you just want to draw the 'triangle', I'd follow David Ward's

suggestion of using an OMArc. Your triangle isn't really be a

triangle on a sphere, after all. The OMArc will take care of the

curved edges for you.

If you need to know the points for some other calculations, you can

use the GreatCircle.spherical_between method, which will give you the

point at a known distance and azimuth from another point. Again,

Geo.offset(distance, azimuth) will give you the answer on an ellipsoid.

Hope this helps,

Don

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Don Dietrick, dietrick_at_bbn.com

BBN Technologies, Cambridge, MA

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-- [To unsubscribe to this list send an email to "majdart_at_bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Tue Aug 15 2006 - 16:29:50 EDT

*
This archive was generated by hypermail 2.3.0
: Tue Mar 28 2017 - 23:25:07 EDT
*