1. **Stating the problem:** We want to calculate the vector between two points, each given by latitude ($\phi$), longitude ($\lambda$), and altitude ($h$).
2. **Convert geodetic coordinates to Earth-Centered, Earth-Fixed (ECEF) Cartesian coordinates:**
Given the point $(\phi, \lambda, h)$, convert to ECEF $(x,y,z)$ using
$$
N = \frac{a}{\sqrt{1 - e^2 \sin^2 \phi}}
$$
where $a$ is the Earth's equatorial radius and $e$ is the Earth's eccentricity.
Then:
$$
x = (N + h) \cos \phi \cos \lambda
$$
$$
y = (N + h) \cos \phi \sin \lambda
$$
$$
z = \left( N(1 - e^2) + h \right) \sin \phi
$$
3. **Calculate the vector difference:**
If points $P_1$ and $P_2$ have coordinates $(x_1, y_1, z_1)$ and $(x_2, y_2, z_2)$ in ECEF, the vector from $P_1$ to $P_2$ is
$$
\vec{v} = (x_2 - x_1, y_2 - y_1, z_2 - z_1)
$$
4. **Explanation:**
This vector represents the straight line in 3D Cartesian space between the two real-world points, accounting for Earth’s curvature and altitude.
5. **Summary:**
- Convert $(\phi, \lambda, h)$ of both points to ECEF
- Subtract their ECEF coordinates
- The result is the vector between them in meters (or units consistent with $a$ and $h$)
This process transforms geographic coordinates into a Cartesian vector suitable for spatial calculations.
Vector Between Points
Step-by-step solutions with LaTeX - clean, fast, and student-friendly.