Astronomers are using something called sidereal time. Exoplanet hunter is using sidereal time to calculate the position of stars in the sky relative to the user on earth. Earth is rotating one revolution around its axis in 24 hours and 0 minutes in that time the earth has moved approximately one degree on the path around the sun. Therefore relative to the distant stars the earth day is just 23 hours, 56 minutes and 4 seconds. As the day is shorter the time will back every day so how do we calculate sidereal time?
It could be easily done using this formula:
Where d is the days that passed since new years eve and tUTC is the local mean time. The time is using UTC that is the common time standard across the world. Sidereal time is the time displayed in the star map of the app.
In mathematics and in many applications in physics it is common to use a spherical coordinate system for 3D space instead of a Cartesian (x,y,z) system. the polar angle or the altitude is the angle between the direction where the mobile user is pointing his/her phone at the sky and the xy-plane.
The azimuth angle is the angle between the x and y-axis on the plane and r is the distance from the origin. Expressed in Cartesian coordinates:
When activating the orientation sensors in the phone (GPS sign) the parameters alt (altitude) and az (azimuth) are shown. The angles are based on the Euler angles that describe the orientation of a rigid body, with respect to a fixed coordinate system. Where the point of origin is the user holding the phone. Stars in the sky have fixed coordinates, right ascension, and declination. The point of origin for those coordinates is a point in space. Earth is orbiting the sun and the thought path for that orbit is called the ecliptic. Earth is also rotating within a thought geocentric celestial sphere. The point of origin is where the equator of that sphere is crossed by the ecliptic line. With reference to that point right ascension is the azimuth angle, it is measured within an hour circle from 0 hours to 24 hours. Declination is the polar angle with respect from the same point and, is measured in degrees -90 to 90.
To calculate right ascension and declination for a user could be tricky considering that earth's surface is curved and that Euclidean geometry cannot be applied. The variables in the equations are the user's geographical position and sidereal time. For the interested here comes the formulas. The hour angle h.
Where φ o is the latitude of the observer holding the phone. It is recommended that one is using the two-argument arctangent to compute the arctangent of the quote. Right ascension can now be calculated using the sidereal time.
And the declination can be calculated using the formula: