COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Matlab intersection of two great circles

• Follow

```Hi all,

I have a questions about a result I got from the function "gcxgc.m".

Basically the problem occurs when one of my input coordinates is +/- 90 degrees latitude.

For example:

bTriangle =[ 90                         0;
81.0516206677674           58.282525588539;
81.0516206677674          121.717474411461];

B=[81.1026734573173           58.818442527504];

az1=azimuth(bTriangle(1,1),bTriangle(1,2),B(1),B(2));
az2=azimuth(bTriangle(2,1),bTriangle(2,2),bTriangle(3,1),bTriangle(3,2));

[interlat interlon]=
gcxgc(bTriangle(1,1),bTriangle(1,2),az1,bTriangle(2,1),bTriangle(2,2),az2);

Result:
interlon = 90                       -90
interlat = 82.3709625433727         -82.3709625433728

When I plot the points I can see that this is not correct. Since the az1 must be -180 this input does not work with gcxgc.m. I believe the proper answer would be: (81.10184556,58.8184425)

Any thoughts?

Thanks!
```
 0
Reply g21u5 (2) 6/12/2012 10:51:07 PM

0 Replies
62 Views

5/21/2013 4:59:55 AM