Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/31/07 09:18
Read: times


 
#140100 - Things i have got so far
Responding to: ???'s previous message
No DS1307 is not working.
No i cant read the date and time.
I have calculated all the necessary formula which are given in the mail.
For the calculation of solar angles i.e., Solar Altitude and Solar Azimuth we need three things
a) Latitude
b) Day of the year
c) Time of the Day

Part of my Solar Tracker is given below. In the below formulas i want to put values of day and time.



 /*calculate the "t"*/
                        t = (2 * pi * ((day - 1) / 365.0));
                        
                        /*calculte the fDeclination*/
 Declination = (0.322003- 22.971 * cos(t)- 0.357898 * cos(2*t)- 0.14398 * cos(3*t)+ 3.94638 * sin(t)+ 0.019334 * sin(2*t)+ 0.05928 * sin(3*t));

                        fDeclination=Declination*pi/180;
                        
                        /*calculate the altitude*/
fAltitude = asin(sin(fDeclination) * sin(latitude) + cos(fDeclination) * cos(latitude) * cos((15 * (time - 12)) * (pi / 180)));
Altitude =fAltitude*180/pi;

                           /*calculate the azimuth*/
fAzimuth = (acos((cos(latitude) * sin(fDeclination) - cos(fDeclination) * sin(latitude) * cos((15 * (time - 12)) * (pi / 180))) / cos(fAltitude)));

                      /* Adjust, to keep the range valid */
					if (time > 12) {
			Azimuth =-180+fAzimuth*180/pi;
						               } 
                        else {
			Azimuth =180-fAzimuth*180/pi;
			     }
                        
                        
                  /* Convert back to steps, from radians. */
fazimuth = (Azimuth / 1.5 * 180.0 / pi); // 1.5 IS THE STEPS PER DEGREE MOVEMENT//
faltitude = (Altitude / 1.8 * 180.0 / pi); // 1.8 IS THE STEPS PER DEGREE MOVEMENT//


  // FOR THE MOVEMENT OF THE RESPECTIVE MOTORS AS PER THE CALCULATED ANGLES//

	for (i= 0; i =fazimuth; i++) {
		movealtitude(CLOCKWISE, ALTITUDEONDELAY);
	                                }

	for (i = 0; i =faltitude; i++) {
		moveazimuth(CLOCKWISE, AZIMUTHONDELAY);
	                               }



List of 26 messages in thread
TopicAuthorDate
DS1307 code problem for AT89C52            01/01/70 00:00      
   What have you got so far?            01/01/70 00:00      
      Things i have got so far            01/01/70 00:00      
         DS1307            01/01/70 00:00      
         Code layout            01/01/70 00:00      
         PHEW            01/01/70 00:00      
         Use GPS receiver for Lat, Day and Time            01/01/70 00:00      
            Very good idea!            01/01/70 00:00      
            excellent idea            01/01/70 00:00      
            Why Both            01/01/70 00:00      
               have you heard of this thing called "Google"            01/01/70 00:00      
         Comments on Formula            01/01/70 00:00      
            there is code for this at the Maxim website            01/01/70 00:00      
               GPS Receiver-Good Idea            01/01/70 00:00      
                  Why both??            01/01/70 00:00      
                  Using the DS1307            01/01/70 00:00      
                     re \"suggestion to Craig\"            01/01/70 00:00      
                        8052.com expanding tabs into spaces            01/01/70 00:00      
                           Just read            01/01/70 00:00      
                              Tabs, 8052.com and email            01/01/70 00:00      
                                 crunched by quoting AND email            01/01/70 00:00      
                                    Bug in quoting            01/01/70 00:00      
                                 pre tags            01/01/70 00:00      
                           it is not just the tabs            01/01/70 00:00      
                     TABs are entirely unreliable - just avoid them!            01/01/70 00:00      
   Tracking            01/01/70 00:00      

Back to Subject List