EARTH SECTION PATHS. SOLUTION TO THE INVERSE AND DIRECT PROBLEMS, AND WAYPOINTS WITHOUT ITERATIONS

The use of central elliptical sections in the calculation of air and sea routes and normal sections in Geodesy is common. Elliptic sections do not represent the shortest path between two points, although are often used in navigation to replace the geodesic lines. All developments include some kind of iteration to solve one of the problems, direct or inverse. When using vector algebra methods and perturbed series, the problems can be solved using an equidistant circle that represents the path of the elliptical section. This is possible because the flattening of the elliptical section is less than or equal to the Earth’s flattening, which implies that the series calculated for the terrestrial ellipsoid, used in the section, always converge. Three direct methods are described in order to calculate: the distance, the azimuth, the coordinates of a point and intermediate positions of an elliptical section. Those algorithms provide solutions to the inverse and direct algorithms with a consistency of the order of truncation error of double-type numbers.

studied, illustrated in Figures 1 and 2: the normal section, the mean normal section and the central section. The normal section is determined by the plane that contains the normal line at one of the points of interest ( 1 P to 1 0 P in Figure 1), in addition to the two points on the surface ( 1 P and 2 P ). Since normal lines at two points are not coplanar, there are two normal sections: one that includes the Introduction An elliptical section is the curve that results from the intersection of a plane with the ellipsoid of revolution. For an Earth section path, that plane contains three points: two of them on the surface of the ellipsoid and the third is determined by the type of the section. Three cases are Figure 1. Schema of elliptical sections; on the left: the first (in blue) and second section (in red); on the right: the mean (in green) and central section (in black) normal line of 1 P and another that includes the normal line of 2 P , ( 2 P to 2 0 P in Figure 1) with the exception of cases where the points are on the same meridian or parallel. The mean normal section is between the previous two, the third point of the plane is located at a midpoint of the intersections of the two normal lines on the Z-axis ( 3 0 P in Figure 1). This definition is different from that given by Gilbertson(2012); later, the topic will be addressed. Finally, in the central section or great ellipse, the plane contains the center of the ellipsoid, 1 P and 2 P , being a unique case since the straight lines from the origin to the points are coplanar. In the event the points have latitudes of different signs, the central elliptical section is between the first and second normal sections.
Unlike geodesic lines, the elliptical sections are plane curves and can be easily solved. The geodesic line is the shortest path on the ellipsoid between two points. The most convenient approach for the solution of the direct and inverse problems for geodesics is given by Karney (2013). When the two points are on the equator or on a meridian, all the elliptical sections match with the path of the geodesic line; these are the only cases where there is a flat curve.
The simplicity of the geometric problem is the main advantage of solving paths that connect two points on the ellipsoid with elliptical sections instead of geodesic lines. The normal section is usually used in Geodesy because it's easier to reduce a raw EDM (Electronic Distance Measurement) distance to the normal section than to the geodesic line. These measurements must be corrected due to the vertical deflection and ellipsoidal height. The great ellipse is studied in navigation by analogy of the great circle, or orthodromic line in the terrestrial sphere; however, the path of the great ellipse differs more from the geodesic line than do normal sections, specially if the points are on the same hemisphere away from the equator.
The problem of elliptical terrestrial sections was extensively addressed both by Geodesy and Maritime Navigation. Literature reviews and different solutions to the problems can be seen in Deakin (2009), Sjöberg (2012, Gilbertson (2012) and Tseng et al. (2013), among others. In all cases, they start with the intersection of a plane with the ellipsoid; the parameters of the resulting ellipse are found and the inverse and direct problems are solved. The inverse problem is to calculate the distance and azimuth of the elliptical section, given the coordinates of the points, and the direct problem to find the coordinates of a second point, given the coordinates of the first and the distance and azimuth of the section. Iterative processes are used in both the case of the direct problem and the search for equidistant points of the section path.
All the intersections of a plane with an ellipsoid of revolution are circles or ellipses (Deakin, 2009, pp. 3-5). The flattening of the normal and central sections is equal to or less than the flattening of the ellipsoid. Therefore, it is possible to apply the same perturbed series used in the terrestrial ellipsoid. In particular, relationships between geodetic, parametric and equidistant latitudes can be obtained without resorting to the numerical resolution of integrals or iterative processes. The length of an elliptic arc is simply the product between its equidistant radius and the difference among the rectified latitudes. This technique is the one that will be used to solve the problems: first, calculate the elliptical section and rotate it into a plane coordinate system, then transform the ellipse to an equidistant circumference. Any direct or inverse problem of distance can be solved in this circumference, and then the coordinates are transformed again to the original system. The use of spherical trigonometry formulas is completely unnecessary; only algebra and plane trigonometry are necessary.
This work does not try to demonstrate that the elliptical sections can replace the geodesic line, but to obtain a "closed" solution to the elliptical sections, mainly in obtaining waypoints.The following paragraphs explain the method used and describe algorithms and formulas to solve the inverse problem, the direct problem and waypoints of the route. In addition, numerical examples are provided comparing the results obtained for the different elliptical sections.

Description of the method
In all cases, 1 λ is taken as central meridian. In the direct method and the construction of waypoints, 2 λ is corrected by adding the original value of 1 λ . In the first three subsections(1.1 to 1.3) well-known formulas are described. In subsection 1.4, Gilbertson formulas (2012) are used; from subsection 1.5, the formulas of the proposed method are developed.
This method fails when 1 P and 2 P are simultaneously on the equator; in this case, the problem is solved on a circle of radius a using 1 λ and 2 λ as coordinates, both 12 α and 2 α are equal to / 2 ±π .

Cartesian coordinates of the points
In order to find the elliptical section, we must first calculate the ECEF coordinates of three points that belong to the plane.
Two points: 1 P and 2 P , are the sites of interest on the surface of the ellipsoid, where ( ) 2 = cos cos ; = cos sin ; f is geodetic latitude, λ is geodetic longitude, e is first eccentricity of the ellipsoid and N R is the radius of curvature in the prime vertical.
The ellipsoid of revolution is determined by the semi-major axis a and the first flattening f . For example, in ellipsoid GRS80, = 6 378 137 a m and 1/ = 298.2572221008827. f The first eccentricity e is defined as , e f f − and the radius of curvature in the prime vertical is calculated as The position of the third point is determined by the intersection of the straight lines, passing through 1 P and 2 P , with the Z -axis, where 0 Z depends on the elliptical section we are considering: 1. First normal section, Gilbertson (2012) defines the construction of the mean normal section through the average of unit vectors at 1 P and 2 P , instead of considering an average position of the intersections of the normals with the Z-axis. However, it is preferable to define the elliptic sections consistently taking into account three points, one of which will always be on the axis of rotation Z. In practice, the different ways of defining the meannormal section have very small inconsistencies,as discussed below.

Plane of the elliptical section
Points 1 P , 2 P and 0 P determine two unit vectors that belong to the plane of the elliptical section, The unit vector perpendicular to the plane is calcu- The equation of the plane is determined by a point thereof and a perpendicular vector. Taking as a point belonging to plane 0 P , according to the properties of the vector scalar product, and being the coordinates of any other point belonging to the plane,

Azimuth of a point on the ellipse
At any point on the ellipsoid, T T T E = sin ,cos ,0 , N = sin cos , sin sin ,cos , U = cos cos ,cos sin ,sin , are unit vectors that point East, North and Up, respectively. To find the azimuth, we require a vector tangent to the curve of the elliptical section. The tangent vector at any point can be calculated aŝ where n is the vector perpendicular to plane, formula (7).
The function , y x . The vector tangent to the elliptical section given an

Parameters of the elliptical section
The intersection of the plane with the ellipsoid always results in an ellipse that, in turn, represents the desired path. The values of the semi-axes and the coordinates of the center of this ellipse are required. Gilbertson (2012, p. 2) proposes the following solution for the parameters of the ellipse: Given where 1 n , 2 n and 3 n are the components of vector n . The base vectors of the rotated coordinate system are as follows: With this data, the coordinates of the center of the ellipse are and the semi-axes and derived parameters from the flattening are calculated as where n  is the third flattening of the elliptical section.

Orientation of the ellipse in a plane coordinate system
ECEF coordinates are moved and rotated, so that semiaxis b matches a local y  -axis, and semi-axis a  matches an x  -axis. The rotation matrices are obtained with the parameters of the perpendicular vector to the plane in such way that it coincides with the xy   -plane.
First, the Z -axis is rotated according to the orientation of n , plus an additional / 2 π rotation so that the X -axis points towards the local "North". Being 2 sin = / Z n p ε and 1 cos = / Z n p ε , Figure 3. Elliptical section in a plane coordinate system xy   . Vertices, nodes and the parametric angles of points 1 P and 2 P are indicated by 1 V , 2 V , 1 N , 2 N and 1 β and 2 β , respectively where p is from formula (14).
Then the X -axis is rotated to null the Z coordinate. Being 3 sin = X n ε and cos = X p ε , Finally, the conversion of ECEF coordinates to a plane system containing the ellipse is: The z coordinate should always result in a null value. This system is illustrated in Figure 3; the parametric angles of the points on the ellipse, 1 β  and 2 β  , arise from the equations = cos , = sin , where −π < β ≤ π  . As an example, the projection of the first normal section, along with vertices and nodes, is illustrated in Figure 4.

Construction of the equidistant circumference
The equidistant circumference has an equidistant radius R µ  and rectified angles µ  transformed from parametric angles β  . This can be achieved by analogy to the parametric and rectified latitudes in the ellipsoid of revolution, using the same formulas.
where R µ  and coefficients j D are calculated according to Table 1, by replacing a with a  and n with n  . To differentiate this coordinate system with that of the ellipse, we rename it to , ξ η .  The points of the nodes and vertices of the section path correspond to the quadrants of the circle ( Figure 5).
Calculating the angular difference according to the relative position of the points on the circumference may require the use of conditional sentences. To avoid this and so that the difference is positive and below 2π , it is convenient to rotate the coordinate system according to the angle of the first point, applying this matrix, the following coordinate system is obtained (see Figure 6), The distance between any two points on the elliptical section is ( )

From the equidistant circumference to geodetic coordinates
The coordinate reversion depends solely on the formulas in subsections 2.5 and 2.6.
where coefficients ' j D are extracted from Table 1.  = arg , , where = , r X Y .

Algorithm of the inverse problem
For any elliptical section: 1. Calculate the ECEF coordinates of 1 P and 2 P , formulas (1), (2) and (3). 2. Calculate the ECEF coordinates of 0 P which depend on the type of elliptical section, formula (4). 3. Calculate the perpendicular vector to the plane of the elliptical section, n , through û and v , formulas (5), (6) and (7). 4. Determine the equation of the plane with normalized parameters, formulas (8) and (9). 5. Calculate the coordinates of the center of the elliptical section, 0 x and the parameters of the ellipse, a  , b  and n  , formulas (15), (16) and (17). 6. Calculate 12 α and 2 α using the ENU components of 1 P and 2 P , formulas (10), (11) and (12). 7. Change the orientation of the ECEF system to a plane coordinate system, calculate ( )

Numerical examples
The inverse algorithm is applied to the cases in the Table  2; the results are shown in Table 3 including, for comparison, the values corresponding to the geodetic line according to Karney's algorithm (2013). The numerical results presented in Table 3 are consistent in the order of millimeters with those shown in Gilbertson (2012, p. 3), although the mean normal section is defined differently; the ellipsoid used by Gilbertson (2012, p. 3) is not indicated. Depending on the desired accuracy, the distances of the sections and the geodetic line are very similar; however, the path is very different when the points are close to the antipodes. This case, taken from Karney (2013, p. 51), is illustrated in Figure 7: here, the paths between the different sections have the most notable differences.

Direct problem
Because we need to know 0 Z at the time of posing the direct problem, it is only applicable to the central section and the first normal section.

Algorithm of the direct problem
1. Calculate the ECEF coordinates of 1 P , formulas (1) and (3). 2. Calculate the ECEF coordinates of 0 P , which depend on the central elliptical section or first normal section, formula (4). 3. Calculate the ENU components of 1 P , formula (10). 4. Calculate the vector tangent to the elliptical section, t , formula (13).
5. Calculate the vector perpendicular to the plane of the elliptical section, n , through û and t , formula (5), n = u t ×  and n = n / n   .

Consistency tests with the inverse algorithm
In Table 4, the application of the inverse algorithm is contrasted with the data in Table 2. The values are in decimal degrees. The differences converted to radians are of the same order as the truncation errors of double type Table 3. Inverse algorithm applied to Table 2, a) central section, b) first section, c) second section, d) mean section, e) geodesic (Karney, 2017 numbers. Table 4 does not show the accuracy of the algorithms but the consistency of the inverse-direct operations with the original data.

Waypoints
Building waypoints is a combination of inverse and direct problems. The number of points includes the final and initial points. We drew Figures 2, 4 and 7 with the help of the following algorithm:

Algorithm to build waypoints
1. Complete steps 1 through 9 of the inverse algorithm, (section "Inverse problem" α with the ENU components of P i , formulas (10), (11) and (12). 8. Repeat steps 3 to 7 until the number of points is completed. An example is given in Table 5.

Conclusions
There are some advantages of elliptical sections with respect to geodesics: they are easily rectifiable plane curves and the path is unique when one or more full turns of the ellipsoid are made. The central section is unique for the two points and the direct and inverse problem can be solved; while, there are three types of normal sections to connect two points.The central section cannot replace the geodesic path when the points are close to the antipodes, although, proportionally the difference of the distances traveled is relatively small. Being a plane curve, the elliptical section has a solution to the inverse and direct problem, and waypoints without resorting to iterations, with the exception of the direct problem of the second and meannormal sections. The algorithms that solve this problem were described, which, unlike other approaches, make use of the equidistant circumference, reducing the length problem to the sum and difference of angles. The inverse and direct algorithms are consistent in the order of truncation error of double-type numbers.

APPENDIX
It is not possible to calculate, without iterations, the direct problem of the second and meannormal sections. This is because we need to know the value of 0 Z . An iterative algorithm to solve these problems can be the following: 1. Solve the direct problem for the central section with 1 f , 1 λ y 12 α (section "Direct problem").
2. With the obtained value of 2 ′ f , calculate the ECEF coordinates of point 0 P , which depend on the second or mean normal section, formula (4). 3. With the new value of 0 P , solve the direct problem again until obtaining, 2 f , 2 λ and 2 α . The value of 2 f will be used to recalculate 0 P formula , 2 2 = ′ f f . 4. Repeat steps 2 and 3 until 15 2 2 < 1 10 − ′ f − f × . Table 6 shows the consistency of the inverse and direct problem of the second and mean normal sections, according to the examples in Table 2.