I am trying to find out wether my implementation has faults and/or if there is a better method.
The problem:
Given two points (Lat/Long) defined over the WGS84 ellipsoid, find the point lying on the great circle that connect them and has a given Longitude
My approach:
- Convert the two points to ECEF coordinates
- Derive the orientation of the plane where the gret circle lies (cross product of the two ECEF vectors)
- Derive the orientation of the meridian plane containing the point we are looking for (we now the longitude and is perpendicular to the equator, so we only need sin/cos of the longitude)
- Derive the ECEF vector of the sought point (is the intersection of the two planes, we need only the cross procuct of the two plane orientations)
- Find the latitude of the point (is the arcsin of the third vector component, when normalized)
My doubts:
When converting to ECEF I was using the fact that the local earth radius is not constant, and thus I was computing it to correctly weight the three components. When I tried to plot my computed points vs the great circle on online maps (googlemaps, skyvector) they seemed a little bit off and I solved the discrepancy by removing the weighting (i.e., ECEF on a perfect sphere). Who is right?
Is there a better way? (that maybe avoids mapping to ECEF?)
Aucun commentaire:
Enregistrer un commentaire