I don't know how to calculate it but do you really have to? I mean, do you have to calculate it on the PIC, at runtime? It's not like your wall clock is changing location on a day to day basis, is it?
You could calculate it (or simply look it up) on your PC, store the results in your PBP program and look it up at runtime. If calculating it is "heavy" then a pre-calculated table is probably smaller in size and definetly faster.


Reply With Quote

Bookmarks