1 INTRODUCTION

The history of the geometric method for determining the preliminary orbit from angular observations began in the 19th century [1]. In 1847, Cauchy proposed to determine the preliminary orbit through five points of intersection of five straight lines by a plane passing through the center of the Sun [2]. Since a conic section can be defined by these five points, the position of the plane of the orbit should be found such that the focus of the conic coincides with the Sun. There are no known earlier references to the geometric method, although they may have appeared after the works of Newton. In the early 20th century, Harzer addressed the problem, but he never obtained an acceptable solution [3]. According to Vil’ev, the problem was still waiting for researchers as of 1917 [4]. The modern history of the method should be retraced from 1982, when work [5] by Kuryshev and Perov was published, in which a system of equations was constructed and an iterative process for its solution was proposed. The author applied this method to determine the preliminary orbits of comets and asteroids [1]. The purpose of this work is to construct an effective algorithm for the numerical solution of the system of equations with finding all possible orbits. As an example, we consider the determination of the orbit of the interstellar comet 2I/Borisov.

2 CONSTRUCTION OF A SYSTEM OF EQUATIONS

Let us denote by ri (i = 1, 2, …, 5) the radius-vectors of the desired orbit at the corresponding times. The equations for heliocentric radius-vectors will then be as follows:

$${{{\mathbf{r}}}_{i}} = {{{\mathbf{e}}}_{i}}{{\rho }_{i}} - {{{\mathbf{R}}}_{i}},$$
(1)

where ei (i = 1, 2, …, 5) are unit vectors of the observed direction to the object, and Ri (i = 1, 2, …, 5) are vectors of the Sun’s position relative to the topocenter. In order to construct equations describing the desired orbit, let us refer to the formula for determining the orbit parameter by three radius-vectors [6]. If the three position vectors of the object are known, then we can express orbit parameter p through them [7]. By selecting the triples of vectors (r1, r2, r3), (r2, r3, r4), and (r3, r4, r5), we obtain three expressions for p:

$${{p}_{{123}}} = \frac{{ \pm {{r}_{1}}\left| {{{{\mathbf{r}}}_{2}} \times {{{\mathbf{r}}}_{3}}} \right| \mp {{r}_{2}}\left| {{{{\mathbf{r}}}_{1}} \times {{{\mathbf{r}}}_{3}}} \right| \pm {{r}_{3}}\left| {{{{\mathbf{r}}}_{1}} \times {{{\mathbf{r}}}_{2}}} \right|}}{{ \pm \left| {{{{\mathbf{r}}}_{2}} \times {{{\mathbf{r}}}_{3}}} \right| \mp \left| {{{{\mathbf{r}}}_{1}} \times {{{\mathbf{r}}}_{3}}} \right| \pm \left| {{{{\mathbf{r}}}_{1}} \times {{{\mathbf{r}}}_{2}}} \right|}} \geqslant 0,$$
$${{p}_{{234}}} = \frac{{ \pm {{r}_{2}}\left| {{{{\mathbf{r}}}_{3}} \times {{{\mathbf{r}}}_{4}}} \right| \mp {{r}_{3}}\left| {{{{\mathbf{r}}}_{2}} \times {{{\mathbf{r}}}_{4}}} \right| \pm {{r}_{4}}\left| {{{{\mathbf{r}}}_{2}} \times {{{\mathbf{r}}}_{3}}} \right|}}{{ \pm \left| {{{{\mathbf{r}}}_{3}} \times {{{\mathbf{r}}}_{4}}} \right| \mp \left| {{{{\mathbf{r}}}_{2}} \times {{{\mathbf{r}}}_{4}}} \right| \pm \left| {{{{\mathbf{r}}}_{2}} \times {{{\mathbf{r}}}_{3}}} \right|}} \geqslant 0,$$
(2)
$${{p}_{{345}}} = \frac{{ \pm {{r}_{3}}\left| {{{{\mathbf{r}}}_{4}} \times {{{\mathbf{r}}}_{5}}} \right| \mp {{r}_{4}}\left| {{{{\mathbf{r}}}_{3}} \times {{{\mathbf{r}}}_{5}}} \right| \pm {{r}_{5}}\left| {{{{\mathbf{r}}}_{3}} \times {{{\mathbf{r}}}_{4}}} \right|}}{{ \pm \left| {{{{\mathbf{r}}}_{4}} \times {{{\mathbf{r}}}_{5}}} \right| \mp - \left| {{{{\mathbf{r}}}_{3}} \times {{{\mathbf{r}}}_{5}}} \right| \pm \left| {{{{\mathbf{r}}}_{3}} \times {{{\mathbf{r}}}_{4}}} \right|}} \geqslant 0,$$

where ri = |ri| (i = 1, 2, …, 5), the upper and lower signs \( \mp \) and ± in (2) correspond to the positive and negative signs of the sine of the angle between the vectors in the subsequent vector product. As can be easily seen, for Eqs. (2), the numerator and denominator cannot have different signs. If we equate the first and second Eqs. (2), i.e., p123 = p234, and then the second and third, p234 = p345, we obtain two equations of orbit determination in the noncoplanar case. Therefore, the problem is reduced to solving a system of two algebraic equations with respect to five unknowns ρi (i = 1, 2, …, 5). However, the topocentric distances are related by three conditions from the mixed products of vectors (1). This makes it possible to express the other three through two of them and obtain an algebraic system with respect to two variables, e.g., ρ1 and ρ5:

$$\begin{gathered} {{f}_{1}} = ( \pm {{r}_{1}}\left| {{{{\mathbf{r}}}_{2}} \times {{{\mathbf{r}}}_{3}}} \right| \mp {{r}_{2}}\left| {{{{\mathbf{r}}}_{1}} \times {{{\mathbf{r}}}_{3}}} \right| \pm {{r}_{3}}\left| {{{{\mathbf{r}}}_{1}} \times {{{\mathbf{r}}}_{2}}} \right|){\text{ }}( \pm \left| {{{{\mathbf{r}}}_{3}} \times {{{\mathbf{r}}}_{4}}} \right| \mp \left| {{{{\mathbf{r}}}_{2}} \times {{{\mathbf{r}}}_{4}}} \right| \pm \left| {{{{\mathbf{r}}}_{2}} \times {{{\mathbf{r}}}_{3}}} \right|) \\ -\;( \pm {{r}_{2}}\left| {{{{\mathbf{r}}}_{3}} \times {{{\mathbf{r}}}_{4}}} \right| \mp {{r}_{3}}\left| {{{{\mathbf{r}}}_{2}} \times {{{\mathbf{r}}}_{4}}} \right| \pm {{r}_{4}}\left| {{{{\mathbf{r}}}_{2}} \times {{{\mathbf{r}}}_{3}}} \right|)( \pm \left| {{{{\mathbf{r}}}_{2}} \times {{{\mathbf{r}}}_{3}}} \right| \mp \left| {{{{\mathbf{r}}}_{1}} \times {{{\mathbf{r}}}_{3}}} \right| \pm \left| {{{{\mathbf{r}}}_{1}} \times {{{\mathbf{r}}}_{2}}} \right|) = 0, \\ {{f}_{2}} = ( \pm {{r}_{2}}\left| {{{{\mathbf{r}}}_{3}} \times {{{\mathbf{r}}}_{4}}} \right| \mp {{r}_{3}}\left| {{{{\mathbf{r}}}_{2}} \times {{{\mathbf{r}}}_{4}}} \right| \pm {{r}_{4}}\left| {{{{\mathbf{r}}}_{2}} \times {{{\mathbf{r}}}_{3}}} \right|){\text{ }}( \pm \left| {{{{\mathbf{r}}}_{4}} \times {{{\mathbf{r}}}_{5}}} \right| \mp \left| {{{{\mathbf{r}}}_{3}} \times {{{\mathbf{r}}}_{5}}} \right| \pm \left| {{{{\mathbf{r}}}_{3}} \times {{{\mathbf{r}}}_{4}}} \right|) \\ - \;( \pm {{r}_{3}}\left| {{{{\mathbf{r}}}_{4}} \times {{{\mathbf{r}}}_{5}}} \right| \mp {{r}_{4}}\left| {{{{\mathbf{r}}}_{3}} \times {{{\mathbf{r}}}_{5}}} \right| \pm {{r}_{5}}\left| {{{{\mathbf{r}}}_{3}} \times {{{\mathbf{r}}}_{4}}} \right|){\text{ }}( \pm \left| {{{{\mathbf{r}}}_{3}} \times {{{\mathbf{r}}}_{4}}} \right| \mp \left| {{{{\mathbf{r}}}_{2}} \times {{{\mathbf{r}}}_{4}}} \right| \pm \left| {{{{\mathbf{r}}}_{2}} \times {{{\mathbf{r}}}_{3}}} \right|) = 0. \\ \end{gathered} $$
(3)

In this case, in view of the nonlinearity of system (3), several solutions are likely to appear. System (3) is not the only one possible for the geometric method [1], but it is one of the simplest from the point of view of derivation of equations.

Equations (3) satisfy both elliptic and hyperbolic motion. In this case, different combinations of upper and lower signs for seven angles between vectors correspond to 64 sets of equations for the ellipse and 32 for the hyperbola. A detailed description of the combinations of angles for triplets of vectors was presented in [6]. Moreover, the specified 64 sets of equations for elliptic motion include all cases with angles differing by values that are multiple of 2π from the specified ones. Therefore, to find a solution on an arc with any number of revolutions around the attractive center, it is sufficient to consider 64 systems of equations (3).

3 TRANSITION TO NEW VARIABLES

Topocentric distances can only take positive values. Accordingly, the region of the desired solutions is an open quadrant, which should be restricted to maximum values. To do this, it was proposed in [6] to switch to normalized dimensionless variables. Consider unit vector N = (Nx, Ny, Nz), which is the vector of the normal to the plane of the desired orbit. For convenience of relating N with the orbital elements, let us select an ecliptic coordinate system. Let us express ρi (i = 1, 2, …, 5) through N. If Eqs. (1) are scalarly multiplied by N, we obtain expressions for ρi [8]:

$${{\rho }_{i}} = \frac{{{\mathbf{N}}{{{\mathbf{R}}}_{i}}}}{{{\mathbf{N}}{{{\mathbf{e}}}_{i}}}}.$$
(4)

The singularity condition of N can be defined as follows:

$$N_{x}^{2} + N_{y}^{2} + N_{z}^{2} = 1.$$
(5)

We can now substitute (4) into all equations for noncoplanar orbits. We obtain (3) with constraint (5) and dimensionless unknowns Nx, Ny, and Nz. The solution domain is bounded by the surface of a unit sphere. Intersection points f1 and f2 are possible directions of N. Since curves (3) are symmetric with respect to the ecliptic plane, one can select one of the hemispheres with prograde or retrograde orbital motion. Condition (5) can then be written as

$$N_{z}^{2} = \sqrt {1 - N_{x}^{2} - N_{y}^{2}} $$
(6)

and the solution domain of the unit sphere can be mapped onto the unit region of the ecliptic circle. Therefore, we are back to the 2D case with unknowns Nx and Ny. An additional advantage of the new variables is that they are not directly related to specific observations and their number, and this simplifies the work on creating the target function. Regions with negative topocentric distances and orbital parameter p should be excluded from the unit circle. Introducing such constraints makes it possible to narrow the search for a solution from the entire unit circle to its individual regions.

We reduced the problem to finding a solution in the unit circle. However, the circle is not very convenient for partitioning and dense coverage by simple geometric shapes, such as triangles. For triangulation, a square that describes the given circle, i.e., with a unit half-side, is more suitable. The mapping of a circle of unit radius to the corresponding square is carried out by the following formulas [9]:

$${{N}_{x}} = {{N}_{{xs}}}\sqrt {1 - 0.5N_{{ys}}^{2}} ,\quad {{N}_{y}} = {{N}_{{ys}}}\sqrt {1 - 0.5N_{{xs}}^{2}} ,$$
(7)

where Nxs and Nys are the coordinates corresponding to the square. Hereinafter, index s indicates these coordinates everywhere.

4 ORDER OF OBJECT POSITIONS IN THE ORBIT

In geometric solutions, the order of the points of intersection of lines of sight (observations) with the orbit is usually not taken into account. Hence, there can be solutions for which the order of orbit points does not correspond to the chronological one. To control them on orbital arcs Δθ51 < 2π for calculations with 16 significant figures, the following conditions can be used:

$$0.999999 \leqslant \left| {\frac{{\Delta {{\theta }_{{51}}}}}{{\Delta {{\theta }_{{21}}} + \Delta {{\theta }_{{32}}} + \Delta {{\theta }_{{43}}} + \Delta {{\theta }_{{54}}}}}} \right| \leqslant 1.000001,$$
(8)

where Δθij are the values of the angles between ri and rj and a relative error of 10–7 is not exceeded in the chronological order of the points and is knowingly exceeded if it is violated. The latter condition implies not using very close observations corresponding to similarly small arcs.

5 SINGULAR POINTS IN THE SEARCH DOMAIN

On the resulting square, there exist singular points in which all ρi from (4) become indeterminate. Depending on whether the numerator or denominator turns to zero, the value of the corresponding topocentric distance can become either infinitesimal or infinitely large. In addition, the positivity of the distances requires the same sign for the numerator and denominator. The ten equations derived from the numerators and denominators of (4) define a grid of ten curves the pairwise intersection of which defines the boundaries of the domains where the desired solution can be found. Knowing the coordinates of the intersection points of the curves determined by the numerators and denominators of (4) makes it possible to determine the smallest scale of triangulation. The equations in “square” coordinates will be as follows (i, j = 1, 2, …, 5):

$$\begin{gathered} {{X}_{i}}{{N}_{{xs}}}\sqrt {1 - 0.5N_{{ys}}^{2}} + {{Y}_{i}}{{N}_{{ys}}}\sqrt {1 - 0.5N_{{xs}}^{2}} + {{Z}_{i}}{{N}_{{ys}}}\sqrt {1 - N_{{xs}}^{2} - N_{{ys}}^{2} + N_{{xs}}^{2}N_{{ys}}^{2}} = 0, \\ {{e}_{{jx}}}{{N}_{{xs}}}\sqrt {1 - 0.5N_{{ys}}^{2}} + {{e}_{{jy}}}{{N}_{{ys}}}\sqrt {1 - 0.5N_{{xs}}^{2}} + {{e}_{{jz}}}{{N}_{{ys}}}\sqrt {1 - N_{{xs}}^{2} - N_{{ys}}^{2} + N_{{xs}}^{2}N_{{ys}}^{2}} = 0, \\ \end{gathered} $$
(9)

where Ri = (Xi, Yi, Zi) are the ecliptic vectors of the Sun’s position relative to the topocenter and ej = (ejx, ejy, ejz) are the unit ecliptic vectors of the observed direction to the object.

System (9) is nonlinear, and, in order to find its roots, it is convenient to apply the method of continuation of the solution by the parameter with the best parametrization [10]. The problem can be reduced to a system of three ordinary differential equations (i, j = 1, 2, …, 5):

$$\frac{{d{{N}_{{xs}}}}}{{d\mu }} = {{({{{\mathbf{R}}}_{i}} \times {{{\mathbf{e}}}_{j}})}_{x}}\sqrt {1 - 0.5N_{{xs}}^{2}} + \frac{{0.5{{{({{{\mathbf{R}}}_{i}} \times {{{\mathbf{e}}}_{j}})}}_{y}}{{N}_{{xs}}}{{N}_{{ys}}}}}{{\sqrt {1 - 0.5N_{{ys}}^{2}} }},$$
$$\frac{{d{{N}_{{ys}}}}}{{d\mu }} = {{({{{\mathbf{R}}}_{i}} \times {{{\mathbf{e}}}_{j}})}_{y}}\sqrt {1 - 0.5N_{{ys}}^{2}} + \frac{{0.5{{{({{{\mathbf{R}}}_{i}} \times {{{\mathbf{e}}}_{j}})}}_{x}}{{N}_{{xs}}}{{N}_{{ys}}}}}{{\sqrt {1 - 0.5N_{{xs}}^{2}} }},$$
(10)
$$\frac{{d\nu }}{{d\mu }} = \frac{{(1 - 0.5(N_{{xs}}^{2} + N_{{ys}}^{2}))[({{{\mathbf{R}}}_{i}} \times {{{\mathbf{e}}}_{j}}){\mathbf{N}}]}}{{\sqrt {(1 - 0.5N_{{xs}}^{2})(1 - 0.5N_{{ys}}^{2})(N_{{xs}}^{2} - 1)(N_{{ys}}^{2} - 1)} }},$$

where the third equation in square brackets represents the mixed product of vectors in the ecliptic coordinate system, while the lower indices of the vector product denote the corresponding components in the first two equations. We should integrate system (10) in the direction of increase of parameter μ until ν = 0 is reached. The solution of system (10) gives us 25 points the minimum and maximum coordinates of which will make it possible to constrain our square to a rectangular region with the finest structure of the solution domain and the densest possible arrangement of the solutions of system (3).

6 TRIANGULATION OF THE SOLUTION SEARCH DOMAIN

It is proposed to search for solutions of system (3) in the form of a minimum of the target function

$${{f}_{{{\text{goal}}}}}({\mathbf{N}}) = f_{1}^{2}({\mathbf{N}}) + f_{2}^{2}({\mathbf{N}}).$$
(11)

Moreover, the search is based on the use of triangulation, i.e., the partitioning of the domain of possible solutions into nonintersecting triangles [11]. These triangles are needed as an initial approximation for variable simplexes, by means of moving the triangles of which the minimum of the target function is searched using the Nelder–Mead method [12, 13].

The whole maximum possible solution domain is a square with a unit half-side. As a basic triangulation, we divide this square into 1024 small squares, each with a side length of 0.0625. We then divide these “small squares” into four equal triangles with a common vertex in the center. With these isosceles triangles with a base length of 0.0625, we fill the entire region for which at least one of the triangle vertices satisfies the positivity condition of five equations (4). The exception is the “region of singular points” (described in the previous section). It increases in all directions until it coincides with the boundaries of the nearest “small square” and takes the form of a rectangle with a side length that is a multiple of 0.0625. Next, we divide this region into squares with a side length of 0.03125. We then divide the obtained “small squares” into triangles with a common vertex in the center. For these, we also check that, for at least one vertex, all ρi > 0 (i = 1, 2, …, 5) and (if necessary) condition (8).

Therefore, we fill the entire domain of possible solutions with triangles of two kinds. They are ordered in sequence, as they are filled line by line from the lower left corner of the “large square” to the upper right corner. The “large triangles” are followed in sequence by “small triangles” according to the same rule.

7 DETERMINING TRIANGLE RANKS

From the perspective of searching for solutions, the resulting set of several hundred triangles can be divided into several classes. Samotokhin and Khutorovskii [11] introduced the notion of the rank of a triangle. The authors proposed a linear interpolation of a possible solution by the values of functions f1 and f2 at the vertices of the triangle. Let us denote them as f1〈i and f2〈i (i = 1, 2, 3). Then the coordinates of the linear interpolation point (Nxs〈0〉), Nys〈0〉) can be expressed as follows:

$$\begin{gathered} {{N}_{{xs\left\langle 0 \right\rangle }}} = {{N}_{{xs\left\langle 1 \right\rangle }}} + \xi ({{N}_{{xs\left\langle 2 \right\rangle }}} - {{N}_{{xs\left\langle 1 \right\rangle }}}) + \zeta ({{N}_{{xs\left\langle 3 \right\rangle }}} - {{N}_{{xs\left\langle 1 \right\rangle }}}), \\ {{N}_{{ys\left\langle 0 \right\rangle }}} = {{N}_{{ys\left\langle 1 \right\rangle }}} + \xi ({{N}_{{ys\left\langle 2 \right\rangle }}} - {{N}_{{ys\left\langle 1 \right\rangle }}}) + \zeta ({{N}_{{ys\left\langle 3 \right\rangle }}} - {{N}_{{ys\left\langle 1 \right\rangle }}}), \\ \end{gathered} $$
(12)

where (Nxsi), Nysi) (i = 1, 2, 3) are the coordinates of the corresponding vertices,

$$\begin{gathered} \xi = \frac{{{{f}_{{2\left\langle 1 \right\rangle }}}{{f}_{{1\left\langle 3 \right\rangle }}} - {{f}_{{1\left\langle 1 \right\rangle }}}{{f}_{{2\left\langle 3 \right\rangle }}}}}{{{{f}_{{1\left\langle 2 \right\rangle }}}{{f}_{{2\left\langle 3 \right\rangle }}} - {{f}_{{1\left\langle 1 \right\rangle }}}{{f}_{{2\left\langle 3 \right\rangle }}} - {{f}_{{1\left\langle 2 \right\rangle }}}{{f}_{{2\left\langle 1 \right\rangle }}} - {{f}_{{1\left\langle 3 \right\rangle }}}{{f}_{{2\left\langle 2 \right\rangle }}} + {{f}_{{1\left\langle 3 \right\rangle }}}{{f}_{{2\left\langle 1 \right\rangle }}} + {{f}_{{1\left\langle 1 \right\rangle }}}{{f}_{{2\left\langle 2 \right\rangle }}}}}, \\ \zeta = \frac{{{{f}_{{1\left\langle 1 \right\rangle }}}{{f}_{{2\left\langle 2 \right\rangle }}} - {{f}_{{2\left\langle 1 \right\rangle }}}{{f}_{{1\left\langle 2 \right\rangle }}}}}{{{{f}_{{1\left\langle 2 \right\rangle }}}{{f}_{{2\left\langle 3 \right\rangle }}} - {{f}_{{1\left\langle 1 \right\rangle }}}{{f}_{{2\left\langle 3 \right\rangle }}} - {{f}_{{1\left\langle 2 \right\rangle }}}{{f}_{{2\left\langle 1 \right\rangle }}} - {{f}_{{1\left\langle 3 \right\rangle }}}{{f}_{{2\left\langle 2 \right\rangle }}} + {{f}_{{1\left\langle 3 \right\rangle }}}{{f}_{{2\left\langle 1 \right\rangle }}} + {{f}_{{1\left\langle 1 \right\rangle }}}{{f}_{{2\left\langle 2 \right\rangle }}}}}. \\ \end{gathered} $$
(13)

The point (Nxs〈0〉, Nys〈0〉) will be inside the triangle if the following conditions are satisfied:

$$\xi > 0,\quad \zeta > 0,\quad \xi + \zeta < 1.$$
(14)

This interpolation is a generalization of the method of chords for solving a nonlinear equation with one variable. However, it should be noted that such a linearization does not guarantee the existence of a real solution inside the triangle if (14) is satisfied. Here, conditions (3) correspond to two straight lines, the zero lines intersecting at (Nxs〈0〉), Nys〈0〉).

Let us describe the possible ranks of the triangles: 0, none of the zero-level lines intersect any side of the triangle (the values of f1 and f2 for all vertices have the same sign); 1, only one of the zero-level lines intersects the sides of the triangle (the values of either f1 or f2 have different signs for different vertices); 2, both zero-level lines intersect the sides of the triangle, but the point (Nxs〈0〉), Nys〈0〉) is outside the triangle (values of f1 and f2 have different signs for different vertices, but condition (14) is not met); 3, the point (Nxs〈0〉, Nys〈0〉) lies inside the triangle, but one of its sides does not intersect any of the zero-level lines (conditions (14) hold, but the sums of the signs of the products of f1 and f2 for the vertices of each side are nowhere zero); and 4, the point (Nxs〈0〉, Nys〈0〉) lies inside the triangle and all its three sides intersect the zero-level lines (conditions (14) are satisfied and there are sides for which the sums of signs of the products of  f1 and f2 for their vertices are zero).

Such a ranking is convenient to reduce the amount of computation. If there are triangles with ranks 4 and 3, the search for a solution should begin with them. Then, if there is no result or to check its completeness, it is necessary to proceed to triangles with rank 2. Usually, this is sufficient to find all admissible solutions. Triangles with rank 1 should be used only if there are no solutions, in order to be absolutely sure of it.

8 THE NELDER–MEAD METHOD

After the triangles are ranked, we can proceed to the search for solutions. The Nelder–Mead method [12] is well suited for this purpose. This iterative method belongs to the gradient-free method; i.e., it does not use derivatives. It only evaluates the values of the target function in the vertices of the deformed triangle at each iteration. A description of the algorithm and the source code in the Fortran language were presented in [14, 15].

The isosceles triangle from Section 6 is considered as a zero approximation. After evaluating the target function in all vertices of the simplex, we find point 〈1〉 with maximum fgoal(N1〉) and point 〈3〉 with minimum fgoal(N3〉). We then construct the “center of gravity,” point 〈0〉, by the two remaining vertices 〈2〉 and 〈3〉:

$${{{\mathbf{N}}}_{{\left\langle 0 \right\rangle }}} = \frac{1}{2}({{{\mathbf{N}}}_{{\left\langle 2 \right\rangle }}} + {{{\mathbf{N}}}_{{\left\langle 3 \right\rangle }}}).$$
(15)

The search for a new vertex occurs along the line 〈1〉–〈0〉. First, the “reflection” operation is performed: we find the reflection of point 〈1〉 with respect to point 〈0〉:

$${{{\mathbf{N}}}_{{\left\langle 4 \right\rangle }}} = {{{\mathbf{N}}}_{{\left\langle 0 \right\rangle }}} + \alpha ({{{\mathbf{N}}}_{{\left\langle 0 \right\rangle }}} - {{{\mathbf{N}}}_{{\left\langle 1 \right\rangle }}}),$$
(16)

where α > 0 is the reflection coefficient.

If f(N〈4〉) ≤ f(N〈3〉), the vector N〈4〉N〈0〉 is extended according to the following relation:

$${{{\mathbf{N}}}_{{\left\langle 5 \right\rangle }}} = {{{\mathbf{N}}}_{{\left\langle 0 \right\rangle }}} + \gamma ({{{\mathbf{N}}}_{{\left\langle 4 \right\rangle }}} - {{{\mathbf{N}}}_{{\left\langle 0 \right\rangle }}}),$$
(17)

where γ > 1 is the extension coefficient. If  f(N〈5〉) <  f(N〈3〉), then N〈1〉 is replaced by N〈5〉; otherwise, N〈1〉 is replaced by N〈4〉. Then, we start the next iteration with the “reflection” operation.

If f(N〈4〉) > f(Ni) for all i ≠ 1, then the vector N〈1〉N〈0〉 is extended according to the following ratio:

$${{{\mathbf{N}}}_{{\left\langle 6 \right\rangle }}} = {{{\mathbf{N}}}_{{\left\langle 0 \right\rangle }}} + \beta ({{{\mathbf{N}}}_{{\left\langle 1 \right\rangle }}} - {{{\mathbf{N}}}_{{\left\langle 0 \right\rangle }}}),$$
(18)

where 0 < β < 1 is the compression ratio. We replace N〈1〉 with N〈6〉; then, we start the next iteration with the “reflection” operation.

If  f(N〈4〉) > f(Ni), then, for i = 1, 2, vectors NiN〈3〉 are reduced by a factor of 2 according to the following formula:

$${{{\mathbf{N}}}_{{\left\langle i \right\rangle }}} = {{{\mathbf{N}}}_{{\left\langle 3 \right\rangle }}} + 0.5({{{\mathbf{N}}}_{{\left\langle i \right\rangle }}} - {{{\mathbf{N}}}_{{\left\langle 3 \right\rangle }}}),\quad i = 1,2.$$
(19)

Then we start the next iteration with the “reflection” operation. The criterion for ending the iteration process is to check the condition

$$\sqrt {\frac{1}{3}\sum\limits_{i = 1}^3 {{{{[f({{{\mathbf{N}}}_{{\left\langle i \right\rangle }}}) - f({{{\mathbf{N}}}_{{\left\langle 0 \right\rangle }}})]}}^{2}}} } \leqslant \epsilon ,$$
(20)

where \(\epsilon \) is an arbitrary small number.

9 FINDING SOLUTIONS AND REPRESENTING OBSERVATIONS

As described in Section 6, the solutions are sought by all triangles with ranks 4 and 3, if there are any, and with rank 2, if necessary. The resulting solutions should be pairwise compared and multiples should be discarded. The multiplicity condition will be the distance between points smaller than a given small number. We then convert squared coordinates N to coordinates on circle (7), and we move from ecliptic coordinates to equatorial coordinates: Neqv = {\(N_{x}^{{{\text{eqv}}}}\), \(N_{y}^{{{\text{eqv}}}}\), \(N_{z}^{{{\text{eqv}}}}\)}. By substituting Neqv into (4), we obtain values of five topocentric distances ρi (i = 1, 2, …, 5). After substituting them into (1), we determine the heliocentric position vectors for the five times. From the vectors for the first and fifth observations, we can calculate the orbits for all the found solutions. The representation by the orbits of the central observations (the second, third, and fourth) will allow us to select the desired solution in the best possible way (O–C values).

10 EXAMPLE

As a numerical example, let us consider determining the orbit of the comet 2I/Borisov on a short arc (only the upper signs are taken in Eqs. (3)). This comet was discovered on August 30, 2019, by Gennadii Borisov at the MARGO Crimean observatory (in the town of Nauchny). This is the first interstellar comet moving along a hyperbolic trajectory with eccentricity e = 3.36 (see [16] and Table 1).

Table 1. Observations of the comet 2I/Borisov (Minor Planet Center)

The plots of Eqs. (3) in “square” coordinates are created on the Nxs and Nys axes in Figs. 1 and 2. The regions with negative topocentric distances and orbit parameter p are colored in gray; where condition (8) is not satisfied, correspondingly, the regions of possible solutions are colored in white.

Fig. 1.
figure 1

Graphs of Eqs. (3). General view.

Fig. 2.
figure 2

Neighborhoods of intersection points of curves (9).

In Fig. 1, we can see a trapezoidal area of white on the right and a triangular area on the left formed by the intersection of curves (9) and conditions (8). In Fig. 2, two more smaller triangular areas can be seen in the center. The points of contact of these areas correspond to the simultaneous equality of the numerator and denominator (4) to zero. Equations (4) are not defined at these points; consequently, system (8) is not defined either. However, in their close neighborhoods, functions f1 and f2 are close to each other. Next, we find the coordinates of intersection points (9) from the solution of system (10). All 25 points are located in the rectangle [–0.293, 0.221] × [–0.894, 0.757]. Let us expand its boundaries to multiples of 0.0625: [–0.313, 0.250] × [–0.906, 0.781], and we obtain a rectangle with a side ratio of 9 : 28. It is convenient to divide it into 18 × 56 “small” squares and 4032 “small” triangles. The fraction of “large” squares will be 772, and the fraction of triangles will be 3088. After checking whether domains of possible solutions are covered, 1302 triangles will remain: 1081 “large” and 221 “small” triangles.

The triangles’ ranking yields 5 triangles of rank 4, 6 triangles of rank 3, 37 triangles of rank 2, 258 triangles of rank 1, and 996 triangles of rank 0. The search for minima of target function (11) was performed by the Nelder–Mead method with the following given parameters: α = 1, β = 0.5, γ = 2, and \(\epsilon \) = 10–16. Five triangles of rank 4 yielded three solutions. Six triangles of rank 3 gave five solutions. Of the 37 triangles of rank 2, solutions were found for 31. Obviously, the number of real solutions is less than 39, and it is necessary to discard all duplicates and leave only the one in each case, with the smallest value of the target function. The value of 10–3 was taken as the minimum distance between different solutions. After checking it, eight sets of solutions were obtained. The target function takes the minimum values in the solutions presented in Table 2.

Table 2. Solutions for the comet 2I/Borisov

After proceeding to ecliptic coordinates on circle (7) and from them to equatorial coordinates, the values of topocentric distances were obtained from (4). The first solution contained a negative value of topocentric distance ρ1, and the fifth and seventh solutions had negative values of orbital parameter p and were, therefore, immediately discarded. For the remaining five solutions, the orbital elements are presented in Table 3 and the orbital elements of the comet 2I/Borisov for the epoch 2020 05 31.0 obtained taking into account all perturbations on the MPC website [16] are given as a reference.

Table 3. Elements of solutions of the orbits of the comet 2I/Borisov
Table 4. Representation of the observations of the comet 2I/Borisov by orbit 4

The extreme observations at times t1 and t5 accurately represent all orbits. However, only the fourth solution represents well the mean observations at times t2, t3, and t4; therefore, other solutions can be discarded.