## Overview

Orbital elements
of binary components in a hierachical system can be fit
to either the visibility data directly or to the separation and position angle
data. In the first case, the orbital motion during the observations of a single
night in case of short orbital periods are handled properly. In our example,
Mizar has a 20 d orbital period, so is not very fast and we will choose the second
method.
## Initial guess

Since fitting orbital elements is a non-linear problem, it has to be solved
iteratively beginning with a good initial estimate.
Begin by changing the binary mode parameter to "1".

`
binary_model(0).mode=1
`

Then use Data|Astrometry
to read a previously prepared file ("zetuma.psn") containing
the positional data. Do this by selecting the (only) file (zetuma.psn)
displayed, and then by clicking the "OK" button.

After that, type:

`
positions.emajor=positions.emajor/30
positions.eminor=positions.eminor/30
`

It so happens that the major and minor axes of the uncertainty ellipses are
too big by a factor of 30 in the data file.

Use Plot|Astrometry
to bring up the plot widget for positional data and click
"Plot|Screen".

With Util|Ellipse
we define roughly an apparent ellipse as shown below, and then
use Fit|Astrometry|Ellipse
(after selecting all parameters for the fit) to optimize
the ellipse parameters.

Re-plot the data (make sure you select the "Ellipse"
option) and see the result.

*
Center x = 1.9497254*

Center y = 2.0485887

Semi-major axis = 8.4214471

Semi-minor axis = 4.7663976

Position angle = 101.95642

We can now use the Thiele-Innes method to estimate
the orbital elements from this apparent ellipse and the data, as implemented
with the
Util|Orbit button.
*
Orbit is PROGRADE.
Thiele-Innes estimates:*

Semi-major axis = 9.8266080

Eccentricity = 0.53497164

Inclination = 60.554283

Periastron = 104.53198

Ascending node = 105.81683

Period = 20.528109

Epoch = 10203.557

Initial chisq= 2.5939877

Final chisq= 2.3497009

Iter= 8, Alamda= 1.00, Status=0

Finally, we use
Fit|Astrometry|Orbit
to improve these initial estimates
through fitting, and the results should look like these. In order to get the
orbit plotted (plot option "Orbit"), you have to transfer the orbit parameters
to the general model parameters using the
"Set Model"
button in the Fit|Astrometry
widget, and type
`calcmodel`
to compute the model data.

*
Semi-major axis = 9.8441526*

Eccentricity = 0.53703750

Inclination = 60.629149

Periastron = 104.25061

Ascending node = 105.95661

Period = 20.538443

Epoch = 7636.0598

Alternatively, we could have used the "Fit" feature of the general model;
as it happens, both were implemented over the course of time.