Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:53 25 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : (MM/DM) Precision Time Keeping Project

     Page 3 of 3    
Author Message
DuinoMiteMegaAn
Senior Member

Joined: 17/11/2011
Location: Australia
Posts: 231
Posted: 02:56pm 25 Dec 2011
Copy link to clipboard 
Print this post

Update ... There are some nagging bugs that needed fixed in the (MM/DM) Precision Time Keeping Project R1.

I fixed the following bugs and did some cosmetic changes to the code and will release the revised code in the near future:

Using the DST/RTC periodic interrupt every 24 hours causes a very large time drift (+-36 seconds). DM MMBasic must be using the watch crystal for this periodic interrupt? I had to come up with a precision periodic 24 hour time algorithm.
There is talk of using this same watch crystal as a time base in the DuinoMite
sleep command. I would caution users that this sleep command would be way off!

Re-entry by gosub into a dimensioned array will cause errors. (You need to erase the array variable after every use!)

Long term beta testing on going ...
Edited by DuinoMiteMegaAn 2011-12-27
 
centrex

Guru

Joined: 13/11/2011
Location: Australia
Posts: 320
Posted: 01:57am 28 Dec 2011
Copy link to clipboard 
Print this post

Hi Duino.................
I have a puzzle.
I have been running your precision time software modified to run on a Maximite (SM1) board, I have input fixed parameters for the lat/long/timezone.
I am using data from my home location a little south west of Sydney.
I get the following results Sunset 9:10 azimuth 240.868
Sunrise 18:46 azimuth 119.108

I have also run the program from TassyJim using the same parameters.
I get the following results Sunrise 5:48 azimuth 119.168
Sunset 20:10 azimuth 240.868

Note the printouts are reversed, the times are quite different but the azimuth are the same although reversed.
The times from TassyJim are more in line with what happens here at -34.0497 Lat 150.816667 long, timezone -11 date 28/12/2011.

Perhaps there is a explanation.

Bye the way the precision software is fun to play with even though I am only using the PCF8563 RTC.
regards
Centrex

Cliff
 
DuinoMiteMegaAn
Senior Member

Joined: 17/11/2011
Location: Australia
Posts: 231
Posted: 03:24am 28 Dec 2011
Copy link to clipboard 
Print this post

TassyJim's Sunrise/Sunset algorithm was put into my precision time keeping algorithms. In all documents and even the source code I have acknowleged/credited TassyJim for his more accurate sunrise/sunset algorithm.

I have also run the program from TassyJim using the same parameters.
I get the following results Sunrise 5:48 azimuth 119.168
Sunset 20:10 azimuth 240.868


Both his/mine algorithms are the same???

Its really the matter of putting in the right variables.
I did several locations checks and they were within one minute of the calculated
Internet times.
Note: The date format must be in the European format Date/Month/Year.
Note: The PIC32 RTC feeds date to the algorithm for the calculation.
Note: My sunrise/sunset test algorithm is for Columbus, Ohio USA EDT +5 hrs.

Sunrise 18:46

Impossible? 6:46 in the evening?

Check this link out.
http://www.thebackshed.com/forum/forum_posts.asp?TID=4434&PN =3

Also, do the following "down under" test below.



=======================
TassyJim sunrise sunset
=======================

Sydney, Australia Lat: -33 deg 53' South Long: 151 deg 10 East
Posted: 13 December 2011 at 8:50am | IP Logged

latitude is negative for South and in decimal degrees.
Longitude is Positive for East and in decimal degrees. <----------

Decimal Latitude = -33.88333 Link A: (above)
Decimal Longittude = 151.16667 Link A: (above)
Time zone -11 Eastern summer time.

Actual Results

\> run

Lat-deg=? -33.88333

Long-deg=? 151.16667

Time zone-hrs=? -11

Year= ? 2011

Month= ? 12

Day= ? 18


Sunrise at 05:39, azimuth 119.16
Sunset at 20:04, azimuth 240.814

Internet calculated sunrise/sunset for the date = Sunrise 5:39 AM Sunset 8:04 PM - LinkB (above)




Edited by DuinoMiteMegaAn 2011-12-29
 
centrex

Guru

Joined: 13/11/2011
Location: Australia
Posts: 320
Posted: 07:20am 28 Dec 2011
Copy link to clipboard 
Print this post

Thanks it looks like I will have to check for finger trouble
Centrex
Cliff
 
     Page 3 of 3    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024