# Calculator: Parallax Triangles

Sunday, December 1, 2019 - 23:57 | Author: wabis | Topics: Geometry, Mathematics, Calculator The presented Calculator can be used to calculate distances to objects from Parallax measurements. It also can be used for triangle calculations where we only know the baseline, an opposite angle and the point where the height meets the baseline. Also provided is the derivation of the used equations.

## Calculator

Choose the correct triangle for your problem. Enter negative values for a or b if the corresponding arrow points to the left. If a or b is negative, the angle φ can geometrically not exceed a certain value. A message at Status tells you, if something is wrong with your input.

In parallax calculations the angle φ is very small. In this case we can use a simple equation to calculate an Approximation for s. The value at sapprox is calculated applying the simple approximation equation. The value s is the exact distance MC. The smaller φ the better the approximation.

## Equations for x and s

The most difficult value to calculate is the height x. The other values can be calculated straight forward using simple trigonometry.

We can calculate the height x, given a, b and φ, in 6 steps:

 (1) (2) (3)
 (4) (5)

To calculate the final result we have to distinguish some cases. Note that in some cases there is a second solution x'. The value x' of the second solution is always smaller than the main solution x. There is only a second solution if a or b are negative, in which case e > d. But if a or b is negative, there are only solutions for φ less than a certain limit, see Restrictions.

 (6) if φ > 0 and φ ≤ 90° if e > d and φ > 0 and φ ≤ 90° if φ > 90° and φ < 180°; no second solution if φ = 180°; no second solution if φ = 0°; no second solution

As we now know the height x, we can also calculate the distance s from the middle M of the baseline to the edge C with Pythagoras:

 (7)

#### Restrictions

This equations are valid even if a or b are negative (H lies outside the baseline AB). But then there are some restrictions, which are automatically satified if you make no errors:

• if a0 then b > |a|
• if b0 then a > |b|

Which means that if the point H lies outside the baseline AB, so a or b is negative, then the other line segment is longer than the line segment with the negative value, which is automatically the case if you calculate a and b correctly as described above.

If a or b are negative or zero, then the angle φ can not exceed the following limit, unless you made a measurement error:

• φ < arcsin( (a+b) / |ab| )

If any of this restrictions is not satisfied, the Calculator displays a corresponding error message.

## Equations for the other Triangle Values

After we have calculated x, we can calculate all other values of the triangle by simple trigonometry and Pythagoras:

 (8) (9) (10)
(11)
(12)
where'
 $\alpha$ ' =' 'inner angle at point A $\beta$ ' =' 'inner angle at point B

## Approximation for s

In parallax calculations we have very small angles φ. In this case the equations above simplify to:

(13)
where'
 $AB$ ' =' '(a + b) = original baseline length $\varphi$ ' =' 'parallax angle in radian, not degrees! radian = degrees · π / 180° $\alpha, \beta$ ' =' 'angles from original baseline to point C

This value sapprox is also calculated by the Calculator for comparison with the exact value of s.

If the angles α and β are not the same, we have to rotate the baseline AB around the midpoint M, so that the angles α and β of the rotated baseline A'B' are equal and the angle φ is kept the same. The rotated baseline A'B' is shorter than the original baseline by the cosine term in (13) above:

(14)
where'
 $A'B'$ ' =' 'projected baseline length $AB$ ' =' 'original baseline length $\alpha, \beta$ ' =' 'angles from original baseline to point C

In parallax measurements the angles α and β are nearly equal if H lies between A and B and C is far away, so we can simply use the unrotated baseline length, because the cosine term is practically 1. So in practice we don't even need to know the angles α and β. This reduces the equation (13) to the often published simple form of the parallax equation:

(15)
where'
 $s$ ' =' 'good approximation of the distance to the object $AB$ ' =' 'baseline length $\varphi$ ' =' 'parallax angle in radian, not degrees! radian = degrees · π / 180°

If the problem has 2 solutions, which is only the case if H lies outside AB, by using the measured angles α and β to the distant object at C you get automatically the right solution of the two possible.

## Derivation of the Equations for x

First we have to find all triangles with angle φ and baseline a+b. There are an infinite number of such triangles. The location of H gives us a second condition that has to be satisfied, which result in 0, 1 or 2 unique solutions.

All triangles that have the same baseline and angle φ lie inside a Circumscribed circle with an Inscribed Angle φ and a central angle 2φ as shown in the figure left. For the point C anywhere on the circle, the angle φ of any such triangle is the same.

To calculate the radius of this circle, we first need the line m, which is simply:

 (16)

If we look at the magenta triangle on the right we can see that m over r is the sine of φ. As we know m and φ, we can calculate the radius of the circle:

 (17)

To calculate the height x we build the magenta triangle MBZ and the cyan triangle ZCT. x depends on the sides d and e of this triangles. One solution is the sum x = e + d. But if a or b is negative, there can also be a second solution x' = ed, if e > d.

So lets calculate the magenta right angled triangle MBZ. We know 2 sides of the triangle, m and r. Using Pythagoras we can calculate the side e:

 (18)

From the graphic we can see that m is always smaller than r, so this square root gives always real values.

From the cyan triangle ZCT we know the side r and the side c is simply:

 (19)

Again using Pythagoras we can calculate the side d of this right angled triangle:

 (20)

If we look at triangles ABC where a or b is negative, we can see that c = |mb| can get bigger than r for certain angles φ, in which case the square root has a negative argument and hence no real solution. So there are only solutions for angles φ and sides a and b, where cr. Lets see for which angles this is the case.

We have to expand this inequation:

 (21)

The 2 on both sides cancel. Because φ in this cases is always less than 90° and greater than 0, the sine of φ is always positive. The condition, that for a negative a or b the other has to be greater in magnitude, we have assured that all terms of the inequation are positive. In this case we can rearrange the terms without invalidating the inequation and solve for sin(φ). And because the sine of φ < 90° is always positive, we can take the sine inverse (arcsin) on both sides:

 (22)

So for triangles ABC with a < 0 or b < 0 the angle φ cannot exceed the value calculated with (22). The Calculator checks this condition and displays the maximal value for φ accordingly.

## Validity Check

The following interactive graph confirms that the presented equations yield the correct results.