[Proj] Re: Locate a point from distance and backwards azimuth?

strebe strebe at aol.com
Mon Oct 20 16:59:34 PDT 2008


Mikæl:

The usual spherical formulæ for computing a point at a known distance and azimuth are:

φ₂ = arcsin (sin φ₁ cos c + cos φ₁ sin c cos Az)
λ₂ = λ₁ + atan2 [sin c sin Az, (cos φ₁ cos c - sin φ₁ sin c cos Az)]

where the start point is subscripted with 1, the end point is subscripted with 2, and the arc distance is c. We know φ₂, λ₂, Az, and c. Therefore these reduce to

(1) n₄ = n₁ sin φ₁ + n₂ cos φ₁
(2) λ₂ = λ₁ + atan2 [n₃, (n₁ cos φ₁ - n₂ sin φ₁)]

where we have made substitutions for symbolic clarity:

n₁ = cos c
n₂ = sin c cos Az
n₃ = sin c sin Az
n₄ = sin φ₂

Since equation 1 has only φ₁ unknown, we solve with trigonometric and algebraic manipulations:

tan φ₁ = A / B

with φ₁ resolvable using the usual atan2 function in order to preserve quadrants. Here

    n₄ - n₂ B
A = _________
        n₁

    n₂ n₄ ± √(n₂² n₁² + n₁⁴ - n₁² n₄²)
B = ----------------------------------
                n₁² + n₂²


yielding two solutions, depending on the sign chosen for the radical in B. Both are valid solutions.

Thus armed with φ₁, we can easily compute λ₁ as

λ₁ = λ₂ - atan2 [n₃, (n₁ cos φ₁ - n₂ sin φ₁)]

The ellipsoidal case is much harder. Your iterative process will work, of course, though it will be terribly inefficient and likely comes with problematic regions. In principle it seems like the problem you are trying to solve is intermediate between the forward and the inverse problems. The reason it is not as simple as the forward problem is that, in the forward case, you know both the starting point and the azimuth. This wholly characterizes which geodesic you are dealing with, since a geodesic is completely characterized by its constant and any point along it:

      cos φ sin Az
K = ________________
    √(1 - e² sin² φ)

In your case, you cannot compute the geodesic's constant because you don't know both the latitude and azimuth from any known point; instead you know the azimuth from an unknown point. On the other hand, you already know the distance, the calculation of which is what makes the inverse problem so difficult.

Warning: Do NOT use Pearson's analysis of geodesics (Frederick Pearson II 1984: "Map Projection Methods", pp. 81–82, and 1990: "Map Projections: Theory and Applications", pp. 80–81). He makes an error early on in the derivation, making the final, easily computed integral nothing but a fiction. Sadly, Donald Fenna has repeated this error in his 2007 volume, "A Compendium of Map Projections, with Derivations", pp. 394–395. 

Regards,
-- daan Strebe


On Oct 20, 2008, at 12:36:56 AM, "Mikael Rittri" <Mikael.Rittri at carmenta.com> wrote:
From:   "Mikael Rittri" <Mikael.Rittri at carmenta.com>
Subject:    [Proj] Locate a point from distance and backwards azimuth?
Date:   October 20, 2008 12:36:56 AM PDT
To: proj at lists.maptools.org
Hello,
Here is a variation of the first/principal/forward geodetic problem:

Known: 
Position of point C.
Distance from point C to an unknown point A. 
Azimuth, at A, of the great-circle arc between A and C. 
Where is A? 

Note the difference from the first/principal/forward problem: 
the azimuth is known at the unknown point A, instead of at the 
known point C. 

I am not really sure when this is useful, but I have been asked 
about it twice by different people, so I feel I ought to solve it 
some day. 

Does this problem has a name, and are there detailed published solutions
anywhere? 

Actually, I should say that I am not completely lost: 
For ellipsoid accuracy, I would use Vincenty's formulas for the 
forward problem starting from C, and then use some numerical root-finding 
algorithm to find the azimuth at C that gives the desired azimuth at A. 
For spherical accuracy, one can add the north pole as a third point B, 
and then ABC is a spherical triangle where two sides (a and b) and one 
angle (A) is known. For this case, textbooks usually suggest that one uses 
the spherical law of sines to find sin(B) (where B is the difference in 
longitude between point A and point C), and then one of Napier's analogies to 
find the angle C and the side c. The most detailed formulas that I have found
are at http://encarta.msn.com/encyclopedia_761572350_2/Trigonometry.html#s7 , 
but the formula font makes it impossible to distinguish the upper case C 
from the lower case c. I think it must be a lower case c in the 2nd formula
and a an upper case C in the 3rd formula, though. I also think there is a 
typo in the 3rd formula: (a+b) and (a-b) should both be multiplied by 1/2, 
before the sine is taken.

But I am not quite sure about the fine details. If I know sin(B), 
I still don't known whether the angle B is acute or obtuse, or if both 
are possible solutions. I think that if the distance between A and C is 
larger than the distance from C to the nearest pole, there would be either 
two solutions or none. (Well, of course, if C is the north pole and the 
azimuth at A should be zero, there would be infinitely many solutions.)

So, if anyone recognizes this problem, I'd be grateful for any advice 
or literature references. 

Best regards,

--
Mikael Rittri
Carmenta AB
Box 11354
SE-404 28 Göteborg
Visitors: Sankt Eriksgatan 5
SWEDEN
Tel: +46-31-775 57 37
Mob: +46-703-60 34 07 
mikael.rittri at carmenta.com
www.carmenta.com

_______________________________________________
Proj mailing list
Proj at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20081020/956612ff/attachment.html>


More information about the Proj mailing list