Friday 24 February 2017

Week 4


Summary of week 4 process: 

This week the code finally started to take shape. However, due to overloading the uBlox GPS module with a 5V supply we managed to break it. Therefore, we had to use a new GPS module, this time we checked the data sheet and attached it to the 3.3V Arduino UNO pin and modified the code accordingly. Figures 1 and 2 show the old GPS new GPS modules we have been using.

Figure 1: The broken GPS 


Figure 2: The new GPS
With the new GPS module working as expected and the implementation of the code running behind schedule, yet smoothly we assured Team B that we would be ready to test within the week. Figure 3 shows the pin allocations for the Arduino UNO, connected to the bracket and GPS module .


Figure 3: The overall set up. 

Below is the modified code for the new GPS module.



Figure 4 :New GPS code


                                 



Notes and plan for week 5: 

  • Combine both Team A and Team B's halves of the project. 
  • Test the circuit outside 


Friday 17 February 2017

Week 3


This is the third lab week for the year 2 project and our progress is quite slow. This week we were mainly focused on the calculations. All members of the group where trying to understand the complex algorithms that needed to be implemented into the code which was easier said than done, as it seemed each equation led to another unknown!

 A complete calculation was finally achieved by Dominyka! Her entire working is shown below. This demonstrates how complex the algorithm is as all of this working merely shows the position at one specific time on a certain date. 


Calculating the position of the Moon for 05/03/2017 at 11:32. (first quarter) [1]

1)      Conversion of time and date to Julian days

Julian day = 864000s
Julian year = 365.25d
Julian century = 36525d

JD=365.25*year’+30.6001*(month’+1)-15+1720996.5+day+(hour+minute/60+second/3600)/24
If month<=2, then month’=month+1, year’=year-1,
if month>2, then month’=month, year’=year.
Number of Julien centuries: T=(JD-JD0)/36525

JD0 is the Julian day for 01/01/2000 at 12:00UT
JD0=365.25*1999+30.6001*14-15+1720996.5+1+12/24=2451546.151
JD is the Julian day for 05/03/2017 at 11:32UT
JD=365.25*2017+30.60001*4-15+1720996.5+5+(11+32/60)/24=2457818.631
T=6272.479596/36525=0.171731132

2)      Astronomical algorithms
·         Ecliptic latitude B and longitude L of the Moon [2]
B=-5.171º
L=75.062º

·         Convert B and L to right ascension RA and declination delta
eps=23+26/60+21.448/3600-(46.8150*T+0.00059*T2-0.001813*T3)/3600
X=cosB*cosL
Y=cos(eps)*cosB*sinL-sin(eps)*sinB
Z=sin(eps)*cosB*sinL+cos(eps)*sinB
R=
delta=180/π*arctg(Z/R)                                                                //π=180º
RA=180/π*arctg(sinL*cos(eps)-(tgB*sin(eps))/cosL)

eps=23+26/60+21.448/3600-(46.8150*0.171731132+0.1717311322*0.00059-0.001813*0.1717311323)/3600=23.43705789º≈23.437º
X=cos(-5.171º)*cos(75.062º)=0.2567
Y=cos(23.437º)*cos(-5.171º)*sin(75.062º)-sin(23.437º)*sin(-5.171º)=0.9187
Z=sin(23.437º)*cos(-5.171º)*sin(75.062º)-sin(23.437º)*sin(-5.171º)=0.3
R=0.953926
delta=1*arctg(0.3/0.953926)=17.4578º
RA=arctg(sin(75.062º)*cos(23.437º)-
(tg(-5.171º)*sin(23.437º))/cos(75.062º))=45.73877694º≈45.74º


·         Sidereal time at Greenwich [3]
theta0=280.46061837+360.98564736629*(JD-JD0)
Local time: theta=theta0+longitude(E+,W-)
Hour angle: tau=theta-RA

theta0=280.46061837+360.98564736629*6272.479596=2264555.568
2264555.568/360=6290.432134
6290.432134-6290=0.4321338119
theta0=0.4321338119*360=155.5681723º
theta=155.5681723º-2.963827º=152.6043453º
tau=152.6043453º-45.74º=406.8643453º
  
3)      Final results
·         Convert tau and delta to horizon coordinates h(altitude) and az(azimuth) of the observer (53.406773º, -2.965723º)
sinh=sin(beta)*sin(delta)+cos(beta)*cos(delta)*cos(tau) //beta-latitude
tg(az)=-sin(tau)/(cos(beta)*tg(delta)-sin(beta)*cos(tau))

h=sin-1(sin(53.406773º)*sin(17.4578º)+
cos(53.406773º)*cos(17.4578º)*cos(106.8643453º))=4.353º
az=arctg(-sin(106.8643453º)/(cos(53.406773º)*tg(17.4578º)-sin(53.406773º)*cos(106.8643453º)))=66.285º

·         Compute the parallax in altitude
horParal=r/a (rad)                                    //r-radius of the Earth(6378km)
                                                                  //a-distance to the Moon(384400km)
Converting to degrees: horParal=horParal*57.2957795
altParal=sin-1(cosh*sin(horParal))
Apparent altitude: H=h-altParal

horParal=0.0165921rad=0.9506568201º
altParal= sin-1(cos(4.353º)*sin(0.9506568201º))=0.9479142571º
H=4.353º-0.9479142571º=3.41º


Notes for week 4:
  •  Finish implementing the code and begin testing. 
  • Design the poster and discuss what should be included. 



[3] - http://www2.arnes.si/~gljsentvid10/sidereal.htm

Friday 10 February 2017

Week 2


Week 2 process :


We worked as a team to share useful resources we had found detailing the problem and presented individual findings to each other. Some of the processes during this week:

  • Detailed research of the moon position calculation revealed how many variables must be calculated to gain position. With 18 variables in total, the understanding and calculation of each took longer than expected and would not be completed by the deadline of second week lab session.  
  • Started work through the entire calculation.
  •  Write a problem specification for the Arduino code, detailing the factors that needed to be considered and the sub problems they present, so the problem could be more easily explained on bench inspection day.
  • Began implementation of calculation in code. 

Teamwork 


Problems have arisen with calculation:
  •  Couldn't find the way to calculate ecliptic latitude (B) and longitude (L) of the Moon. The current solution to that problem is to take the data from the internet [1]. 
  • Had troubles computing sidereal time at Greenwich

Supervisor Meeting:

We discussed the difficulty of the calculation with Dr. Marsland and explained that, this was why we were yet to show any finished project deliverable's. 

Notes and plans for week 3: 


  • Try to finish the whole Calculation. 
  • Research GPS and how it will be useful to the code 
  • Show some finished project deliverables.


Friday 3 February 2017

Week 1



This is the beginning of our year 2 group project , we had several meetings with our tutor and we decided on a moon tracker project. After placing our order before Christmas we still only received the Arduino UNO in this weeks lab.
We researched the Arduino as a team to gain a better understanding of the physical module and its coding language.

  • Received components:
- Arduino UNO
- Raspberry pi camera

  • Project plan: 


Week 1
Week 2
Week 3
Week 4
Week 5
Week 6
Components
Design
Testing
Report
Poster
                   
Blog



Moon Tracker software specification



Problem specification Team A: 

Write a program to control a pan and tilt bracket, allowing the following of the moon by a camera, mounted on top of said bracket.
Team B will then use the camera to take multiple pictures, which will be overlaid via image processing to produce a detailed final image.

Analysis

Inputs:
·         Time of day when bracket is placed in position for tracking
·         The date on which tracking is taking place
·         The longitude and latitude points of bracket position

Outputs:
·         Pan and tilt movement of the micro server controlled bracket

Relevant information for understanding of algorithm and astronomical terms:

Universal Time - Also known as astronomical time or solar time, refers to the earth rotation. It is used to compare the pace provided by international atomic time with the actual length of an Earth day [1].

Julian Day number - is the integer number of days that have elapsed since the initial epoch, which is defined as noon universal time, Monday, January 1, 4713 BC in the Julian calendar [2].

Used to find celestial coordinate:
Right Ascension – the representation of an observer points longitude on earth in space [3].

Declination – the representation of an observer points latitude on earth in space [3].

Used to find horizon coordinate:
Azimuth AngleThe azimuth (az) angle is the compass bearing, relative to true (geographic) north, of a point on the horizon directly beneath an observed object [4]. 

Altitude/Elevation - The elevation (el) angle, also called the altitude, of an observed object is determined by first finding the compass bearing on the horizon relative to true north, and then measuring the angle between that point and the object, from the reference frame of the observer [4].

Ecliptic longitude and latitude – co-ordinates of the apparent path of the moon on the celestial sphere.

Sidereal time - Sidereal time measures the rotation of our planet relative to the stars.  It allows astronomers to keep time without worrying about the motion of Earth around the sun [5]. Moon moves around the earth in roughly 27.3 days, also known as 1 sidereal month, with its average movement about 13.2 degrees per day [6].

Further considerations - Must take into consideration the speed of the earth(30 Km per second), the speed that the moon is moving relative to the earth(3683 Km per hour), also camera requires 10 seconds minimum between photographs.




[1] U. -. T. w. t. Standard, "timeanddate," [Online]. Available: https://www.timeanddate.com/time/aboututc.html. 
[2] J. D. N. Fandom, "Fandom," [Online]. Available: http://calendars.wikia.com/wiki/Julian_day_number. 
[3] A. MacRobert, "Sky and telescope," 20 July 2006. [Online]. Available: http://www.skyandtelescope.com/astronomy-resources/what-are-celestial-coordinates/. 
[4] T. Target, "Azimuth and Elevation," [Online]. Available: http://whatis.techtarget.com/definition/azimuth-and-elevation. 
[5] C. Crockett, "What is Sidereal time?," 10 June 2012. [Online]. Available: http://earthsky.org/astronomy-essentials/what-is-sidereal-time.
[6] M. Motion, "http://cseligman.com/text/sky/moonmotion.htm," [Online]. 


Group Members:

 Amy Bannon, Abdulrahman Alanazi, Dominyka Rubeziute, 

Junkun Di and Yoka Zhang.  

Supervisor: 

Dr. John Marsland