<p>First, let assume your image geometry is homogeneous, and has no peculiar distorsion in either direction.</p>

<p>Second, let assume you have the resolution of your image: the number of arcseconds / pixel.</p>

<p>Now, take one 'red-cross' star, call it A. It will be the origin of the triangle we will draw. Name your 'yellow-cross' star B. Now, take a new point, called 'C', that is at the same pixel-y coordinate of A, and the same pixel-x coordinates of B. </p>

<p>Drawing lines between A, B and C gives you a right triangle. You cannot simply apply flat geometry equations, since you are on the celestial sphere.</p>

<p>Hence, one must compute the 'Bearing' angle between A, B and C. See for instance <a href="http://www.mathsrevision.net/gcse-maths-revision/trigonometry/bearings" rel="nofollow noreferrer">here</a>: (A bearing is an angle, measured clockwise from the north direction).</p>

<p>Here is a little piece of code you should be able to read:</p>

<pre><code>double adjacent = sqrt(pow(B.x-C.x, 2) + pow(B.y-C.y, 2)); // dBC
double opposite = sqrt(pow(A.x-C.x, 2) + pow(A.y-C.y, 2)); // dAC

double theta = atan2(opposite, adjacent) * ONE_RAD_IN_DEGREES;
</code></pre>

<p><code>theta</code> is the bearing angle, here expressed in degrees, thanks to the conversion constant <code>ONE_RAD_IN_DEGREES</code>. <code>atan2</code> is the Arc-Tangent function that takes care of which quadrant you are in (it computes <code>arctangent(opposite / adjacent)</code>, correcting for the quadrant, see the <a href="http://en.wikipedia.org/wiki/Atan2" rel="nofollow noreferrer">wikipedia article</a> for instance).</p>

<p>Now, depending on whether you have East to the left or not (astro images have East to the left usually), you need to correct your angle. Again this little piece of code:</p>

<pre><code>BOOL eastLeft = &lt;true or false&gt;

if (B.x &lt; A.x &amp;&amp; B.y &gt; A.y) {
    theta = (eastLeft) ? theta : 360.0 - theta;
}
else if (B.x &lt; A.x &amp;&amp; B.y &lt; A.y) {
    theta = (eastLeft) ? 180.0 - theta : theta + 180.;
}
else if (B.x &gt; A.x &amp;&amp; B.y &lt; A.y) {
    theta = (eastLeft) ? theta + 180. : 180.0 - theta;
}
else if (B.x &gt; A.x &amp;&amp; B.y &gt; A.y) {
    theta = (eastLeft) ? 360.0 - theta : theta;
}
</code></pre>

<p>Now, we have the correct <code>theta</code> value. Now, compute the distance (below, in degrees) between A and B, and call it <code>delta</code>.</p>

<p>Assuming the R.A. and Declination of A are called <code>lambda1</code> and <code>phi1</code>, you can compute the R.A. and Declination of C, <code>lambda2</code> and <code>phi2</code>, using the formulae given in <a href="http://www.movable-type.co.uk/scripts/latlong.html" rel="nofollow noreferrer">here</a>, under the section "Destination point given distance and bearing from start point".</p>

<p>In my code:</p>

<pre><code>double phi1 = declination_A * ONE_DEG_IN_RADIANS;
double lambda1 = rightAscension_A * ONE_HOUR_IN_RADIANS;

double delta = degrees * ONE_DEG_IN_RADIANS;
double theta = bearing * ONE_DEG_IN_RADIANS;

double phi2 = asin(sin(phi1)*cos(delta) + cos(phi1)*sin(delta)*cos(theta));
double lambda2 = lambda1 + atan2(sin(theta) * sin(delta) * cos(phi1), cos(delta) - sin(phi1) * sin(phi2));
</code></pre>

<p>with the usual meaning of trigonometric functions (<code>sin</code> is sine, <code>asin</code> is arcsine, etc).</p>

CC BY-SA 3.0
2015-05-02T07:43:32.143Z
2017-01-07T17:31:13.073Z
2017-01-07T17:31:13.073Z
onekiloparsec
<p>This may seem like a cheat, but why not just look up the star in a catalogue, or using one of the several free astronomy planetarium type apps - eg Stellarium, Cartes du Ciel etc.  The star in question, nor any one is likely to find, is not unknown.</p>

CC BY-SA 3.0
2017-01-07T18:31:10.830Z
2017-01-07T18:31:10.830Z
Dr Chuck
<p>You need at least two images from same objects in diferent angle or position for generate a depth to calculate position, or same image position in diferent dates and a possible object aditional in image , in other way , any calculatiion is wrong</p>

CC BY-SA 3.0
2015-05-29T19:09:00.267Z
2015-05-29T19:09:00.267Z
Adrian R
<p><img src="https://i.sstatic.net/kSVt6.png" alt="messier 44"></p>

<p>Suppose I know the coordinates (right ascension and declination) of the stars marked with red. How should I calculate the coordinates of an unknown star, marked with yellow?</p>

<p>Searching over the web, I found a technique called <em>least squares plate constants</em>. I guess <em>plate constants</em> dates back before CCD cameras. Unfortunately there was only little explanation. However, if I understood the matter correctly, I should assume the stars are on a surface of a sphere imaged to a plane? Please help :)</p>

<p>Also, how should I calculate the distances between the stars?</p>

<p>The original image is from Wikipedia.</p>

CC BY-SA 3.0
2015-04-19T14:43:55.330Z
From what I understand, you are asking about the mathematical way of solving this. In any case, I'd just like to mention the astrometry.net service, this is what your sample image returns: http://nova.astrometry.net/user_images/645418#annotated
Gabriel
<star><distances><fundamental-astronomy><coordinate>
How to calculate position of an unknown star knowing positions of some other stars from an image?
user7092
# How to calculate position of an unknown star knowing positions of some other stars from an image?

(Asked by: username_0 on 2015-04-18)

![messier 44](https://i.sstatic.net/kSVt6.png)

Suppose I know the coordinates (right ascension and declination) of the stars marked with red. How should I calculate the coordinates of an unknown star, marked with yellow?

Searching over the web, I found a technique called *least squares plate constants*. I guess *plate constants* dates back before CCD cameras. Unfortunately there was only little explanation. However, if I understood the matter correctly, I should assume the stars are on a surface of a sphere imaged to a plane? Please help :)

Also, how should I calculate the distances between the stars?

The original image is from Wikipedia.

**Tags:** star, distances, fundamental-astronomy, coordinate

> **Comments:**
> **username_1**: From what I understand, you are asking about the mathematical way of solving this. In any case, I'd just like to mention the astrometry.net service, this is what your sample image returns: http://nova.astrometry.net/user_images/645418#annotated  

---

## 3 answers

### Answer by username_2 on 2015-05-02. Score: 3

First, let assume your image geometry is homogeneous, and has no peculiar distorsion in either direction.
Second, let assume you have the resolution of your image: the number of arcseconds / pixel.
Now, take one 'red-cross' star, call it A. It will be the origin of the triangle we will draw. Name your 'yellow-cross' star B. Now, take a new point, called 'C', that is at the same pixel-y coordinate of A, and the same pixel-x coordinates of B. 
Drawing lines between A, B and C gives you a right triangle. You cannot simply apply flat geometry equations, since you are on the celestial sphere.
Hence, one must compute the 'Bearing' angle between A, B and C. See for instance here: (A bearing is an angle, measured clockwise from the north direction).
Here is a little piece of code you should be able to read:
double adjacent = sqrt(pow(B.x-C.x, 2) + pow(B.y-C.y, 2)); // dBC
double opposite = sqrt(pow(A.x-C.x, 2) + pow(A.y-C.y, 2)); // dAC

double theta = atan2(opposite, adjacent) * ONE_RAD_IN_DEGREES;

theta is the bearing angle, here expressed in degrees, thanks to the conversion constant ONE_RAD_IN_DEGREES. atan2 is the Arc-Tangent function that takes care of which quadrant you are in (it computes arctangent(opposite / adjacent), correcting for the quadrant, see the wikipedia article for instance).
Now, depending on whether you have East to the left or not (astro images have East to the left usually), you need to correct your angle. Again this little piece of code:
BOOL eastLeft = 

if (B.x < A.x && B.y > A.y) {
    theta = (eastLeft) ? theta : 360.0 - theta;
}
else if (B.x < A.x && B.y < A.y) {
    theta = (eastLeft) ? 180.0 - theta : theta + 180.;
}
else if (B.x > A.x && B.y < A.y) {
    theta = (eastLeft) ? theta + 180. : 180.0 - theta;
}
else if (B.x > A.x && B.y > A.y) {
    theta = (eastLeft) ? 360.0 - theta : theta;
}

Now, we have the correct theta value. Now, compute the distance (below, in degrees) between A and B, and call it delta.
Assuming the R.A. and Declination of A are called lambda1 and phi1, you can compute the R.A. and Declination of C, lambda2 and phi2, using the formulae given in here, under the section "Destination point given distance and bearing from start point".
In my code:
double phi1 = declination_A * ONE_DEG_IN_RADIANS;
double lambda1 = rightAscension_A * ONE_HOUR_IN_RADIANS;

double delta = degrees * ONE_DEG_IN_RADIANS;
double theta = bearing * ONE_DEG_IN_RADIANS;

double phi2 = asin(sin(phi1)*cos(delta) + cos(phi1)*sin(delta)*cos(theta));
double lambda2 = lambda1 + atan2(sin(theta) * sin(delta) * cos(phi1), cos(delta) - sin(phi1) * sin(phi2));

with the usual meaning of trigonometric functions (sin is sine, asin is arcsine, etc).


---

### Answer by username_3 on 2017-01-07. Score: 0

This may seem like a cheat, but why not just look up the star in a catalogue, or using one of the several free astronomy planetarium type apps - eg Stellarium, Cartes du Ciel etc. The star in question, nor any one is likely to find, is not unknown.


---

### Answer by username_4 on 2015-05-29. Score: 0

You need at least two images from same objects in diferent angle or position for generate a depth to calculate position, or same image position in diferent dates and a possible object aditional in image , in other way , any calculatiion is wrong


---

