<p>One method: If all the images are taken from the same viewpoint and at the same scale, and if you knew the scale of the image (i.e, 1 px = 10 arcseconds; you can work that out from the physical parameters of your scope and your camera), you can then put the coordinates <span class="math-container">$x$</span> and <span class="math-container">$y$</span> - in pixels - of each star image into the general equation of a circle:</p>
<p><span class="math-container">$$(x–h)^2 + (y-k)^2 = r^2$$</span></p>
<p>then, solve the resultant simultaneous equations to give you the parameters (center (h,y) and radius r) of the circle the star traces around the celestial north pole. Convert that pixel value to a angle value using the aforementioned scale (for example 1px = 10 arcseconds). Now you have the declination.</p>
<p>It might be simpler to calculate the coords in terms or alt/az, so to get az, you can use the pixel x coordinates of each star, and subtract that from the pixel x coordinate of the center of the circle you found. Then, you can do the same for the y coordinate. Scaled to an angle, the azimuth number can be used unadjusted, but remember that the center of your circle will be positioned at 0 degrees from North, but angled from the ground by (90-your latitude) degrees. You can then scale the pixel y distance from the center of the circle to get your angle, but then remember to add (90-your latitude) to get the angle relative to the ground.</p>
<p>Then, of course, for each alt/az value, you can use LST and your location to convert to a RA/Dec value if you so require.</p>
<p>I imagine this whole process wouldn't be too difficult to automate; the great thing about astronomy is that our datapoints - images of stars - are very, very easy for a computer to read. You'd just need to feed each image one by one - timestamped with LST - into a program to find the coordinates of the bright spots against the totally black background, then carry out the aforementioned process to produce an epoch-referenced RA/Dec position.</p>

CC BY-SA 4.0
2022-01-28T23:02:44.220Z
Very good. I feel the right answer comes from this path. My only question is about the general equation of a circle. It's not immediately clear to me how I can solve 3 unknowns?
amr gameel
CC BY-SA 4.0
2022-01-29T01:37:10.370Z
Great question! The key is that to solve a set of simultaneous equations, you must have an number of unique equations (i.e no multiples of one another) that is equal to the number of unknowns; x=6 only needs the one to solve, but x+y=6 requires a second equation like x+2y=10, and so on. I'll expand the equation into a better form: $x^2-2hx+h^2+y^2-2yk+k^2=r^2$. Rearrange a little more, and we get $2xh+2yk+(r^2-h^2-k^2)=x^2+y^2$. Finally, substitute $(r^2-h^2-k^2)$ with c. This forms a standard form of a 3-variable simultaneous equation: $2xh+2yk+c=(x^2+y^2)$ (cont'd)
T.S
CC BY-SA 4.0
2022-01-29T01:37:18.853Z
Let's pick 3 points as an example; (3,1), (1,2), and (2,1). This gives us 3 equations:6h+2k+c=10, 2h+4k+c=5, and 4h+2k+c=5. We can then remove one variable by subtracting one equation from another (or multiples of the equations), to give us two 2-variable equations. 2*(Equation 2) minus (Equation 3) gives the equation 6k+c=5. 3*(Equation 2) minus (Equation 1) gives the equation 10k+2c=5. Then you can of course do the same to these two new equations, eliminating one variable: the two equations reduce to give k = 5/2, and c = -10. (cont'd)
T.S
CC BY-SA 4.0
2022-01-29T01:37:45.153Z
Put that into, say, Equation 2, and you get 2h = 5, or h = 5/2. Remember that $c=(r^2-h^2-k^2)$ , so $r =\sqrt{c+h^2+k^2}$, or $\sqrt{5/2}$. So, the single circle that passes through those 3 points has a center of (2.5,2.5), and a radius of $\sqrt{5/2}$. There are a few ways to compute this; on python there's a nice library called "sympy" that has a solve function; and there are mathematical techniques like Cramer's rule, or Gaussian elimination, to do it more from scratch.
T.S
CC BY-SA 4.0
2022-01-29T08:30:22.483Z
Thanks a lot. This is really helpful.
amr gameel
CC BY-SA 4.0
2022-01-28T12:31:47.987Z
2022-01-28T12:38:40.020Z
2022-01-28T12:38:40.020Z
T.S
<p>Basically I have camera, my location, my local sidereal time. I want to point the camera in one direction and shoot a timelapse of a certain star exactly in the middle of the camera view. So I know how much this star moved and in which direction in relation to the camera over a certain amount of time.</p>
<p>Based on this information, and knowledge of the camera’s angle of view, position in relation to the horizon, and assuming the camera doesn’t suffer any kind of lens distortion, I want to calculate the precise heading of my camera, let's say in terms of altitude and azimuth. Where should I start?</p>
<p>One thing I’m thinking of is, the distance of displacement of the star over a certain period of sidereal time will correspond to the star’s declination, given that star movement follows an arc that gets smaller the more you approach one or the other celestial pole.</p>
<p>Any more ideas?</p>

CC BY-SA 4.0
2022-01-23T10:14:09.240Z
@uhoh the RA/Dec of that star would be the answer I’m looking for. I can convert between equatorial and alt/az coordinates, so an answer in either would be equally helpful.
amr gameel
CC BY-SA 4.0
2022-01-23T10:15:11.153Z
Thanks, yes I get it now.
uhoh
CC BY-SA 4.0
2022-01-28T13:12:28.113Z
You say you know the camera's "position in relation to the horizon", but want to calculate "altitude and azimuth".  Both of these phrases are the same thing.  You need to better specify what known values you have and unknowns you're looking for.
Greg Miller
CC BY-SA 4.0
2022-01-28T22:47:33.600Z
@GregMiller Position in relation to the horizon is just one degree of freedom. It is basically the roll of the camera. What I'm trying to say is that I can assume that the camera is level, and anything horizontal in the image is also horizontal with relation to earth. I still need to find out the altitude (pitch) and azimuth (yaw) of the camera.
amr gameel
<observational-astronomy><positional-astronomy>
Knowing location, LST, the amount & direction of displacement of an unknown star in a 2d image over time, can you calculate the coords of this star?
amr gameel
# Knowing location, LST, the amount & direction of displacement of an unknown star in a 2d image over time, can you calculate the coords of this star?

(Asked by: username_0 on 2022-01-22)

Basically I have camera, my location, my local sidereal time. I want to point the camera in one direction and shoot a timelapse of a certain star exactly in the middle of the camera view. So I know how much this star moved and in which direction in relation to the camera over a certain amount of time.

Based on this information, and knowledge of the camera’s angle of view, position in relation to the horizon, and assuming the camera doesn’t suffer any kind of lens distortion, I want to calculate the precise heading of my camera, let's say in terms of altitude and azimuth. Where should I start?

One thing I’m thinking of is, the distance of displacement of the star over a certain period of sidereal time will correspond to the star’s declination, given that star movement follows an arc that gets smaller the more you approach one or the other celestial pole.

Any more ideas?

**Tags:** observational-astronomy, positional-astronomy

> **Comments:**
> **username_0**: @username_1 the RA/Dec of that star would be the answer I’m looking for. I can convert between equatorial and alt/az coordinates, so an answer in either would be equally helpful.  
> **username_1**: Thanks, yes I get it now.  
> **username_2**: You say you know the camera's "position in relation to the horizon", but want to calculate "altitude and azimuth".  Both of these phrases are the same thing.  You need to better specify what known values you have and unknowns you're looking for.  
> **username_0**: @GregMiller Position in relation to the horizon is just one degree of freedom. It is basically the roll of the camera. What I'm trying to say is that I can assume that the camera is level, and anything horizontal in the image is also horizontal with relation to earth. I still need to find out the altitude (pitch) and azimuth (yaw) of the camera.  

---

## 1 answers

### Answer by username_3 on 2022-01-28. Score: 1 | Accepted answer

One method: If all the images are taken from the same viewpoint and at the same scale, and if you knew the scale of the image (i.e, 1 px = 10 arcseconds; you can work that out from the physical parameters of your scope and your camera), you can then put the coordinates $x$ and $y$ - in pixels - of each star image into the general equation of a circle:

$$(x–h)^2 + (y-k)^2 = r^2$$

then, solve the resultant simultaneous equations to give you the parameters (center (h,y) and radius r) of the circle the star traces around the celestial north pole. Convert that pixel value to a angle value using the aforementioned scale (for example 1px = 10 arcseconds). Now you have the declination.

It might be simpler to calculate the coords in terms or alt/az, so to get az, you can use the pixel x coordinates of each star, and subtract that from the pixel x coordinate of the center of the circle you found. Then, you can do the same for the y coordinate. Scaled to an angle, the azimuth number can be used unadjusted, but remember that the center of your circle will be positioned at 0 degrees from North, but angled from the ground by (90-your latitude) degrees. You can then scale the pixel y distance from the center of the circle to get your angle, but then remember to add (90-your latitude) to get the angle relative to the ground.

Then, of course, for each alt/az value, you can use LST and your location to convert to a RA/Dec value if you so require.

I imagine this whole process wouldn't be too difficult to automate; the great thing about astronomy is that our datapoints - images of stars - are very, very easy for a computer to read. You'd just need to feed each image one by one - timestamped with LST - into a program to find the coordinates of the bright spots against the totally black background, then carry out the aforementioned process to produce an epoch-referenced RA/Dec position.

> **Comments:**
> **username_0**: Very good. I feel the right answer comes from this path. My only question is about the general equation of a circle. It's not immediately clear to me how I can solve 3 unknowns?  
> **username_3**: Great question! The key is that to solve a set of simultaneous equations, you must have an number of unique equations (i.e no multiples of one another) that is equal to the number of unknowns; x=6 only needs the one to solve, but x+y=6 requires a second equation like x+2y=10, and so on. I'll expand the equation into a better form: $x^2-2hx+h^2+y^2-2yk+k^2=r^2$. Rearrange a little more, and we get $2xh+2yk+(r^2-h^2-k^2)=x^2+y^2$. Finally, substitute $(r^2-h^2-k^2)$ with c. This forms a standard form of a 3-variable simultaneous equation: $2xh+2yk+c=(x^2+y^2)$ (cont'd)  
> **username_3**: Let's pick 3 points as an example; (3,1), (1,2), and (2,1). This gives us 3 equations:6h+2k+c=10, 2h+4k+c=5, and 4h+2k+c=5. We can then remove one variable by subtracting one equation from another (or multiples of the equations), to give us two 2-variable equations. 2*(Equation 2) minus (Equation 3) gives the equation 6k+c=5. 3*(Equation 2) minus (Equation 1) gives the equation 10k+2c=5. Then you can of course do the same to these two new equations, eliminating one variable: the two equations reduce to give k = 5/2, and c = -10. (cont'd)  
> **username_3**: Put that into, say, Equation 2, and you get 2h = 5, or h = 5/2. Remember that $c=(r^2-h^2-k^2)$ , so $r =\sqrt{c+h^2+k^2}$, or $\sqrt{5/2}$. So, the single circle that passes through those 3 points has a center of (2.5,2.5), and a radius of $\sqrt{5/2}$. There are a few ways to compute this; on python there's a nice library called "sympy" that has a solve function; and there are mathematical techniques like Cramer's rule, or Gaussian elimination, to do it more from scratch.  
> **username_0**: Thanks a lot. This is really helpful.  

---

