Closed rb3maker closed 3 years ago
Ah, I actually just noticed that too a few days ago! Yes, I think you’re right. Pysolar used to be non-timezone aware, but now it is. I think your correction is right; I’ll fix that.
Thank you! This is such a useful library. My students will be using it for their solar trackers.
Could I also suggest that you pull the latitude and longitude arguments out of the function and assign them to variables so that it is clear which one is which.
~ Rich
date = datetime.datetime.now(datetime.timezone.utc) latitude = 42.206 longitude = -71.382print(get_altitude(latitude, longitude, date))date = datetime.datetime(2007, 2, 18, 15, 13, 1, 130320, tzinfo=datetime.timezone.utc)print(get_altitude(latitude, longitude, date))
On Fri, Mar 5, 2021 at 8:30 AM Brandon Stafford notifications@github.com wrote:
Ah, I actually just noticed that too a few days ago! Yes, I think you’re right. Pysolar used to be non-timezone aware, but now it is. I think your correction is right; I’ll fix that.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pingswept/pysolar/issues/142#issuecomment-791531739, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJC2GGOKOEYCH6KYBPTDFRTTCEBLDANCNFSM4YQCBXFQ .
Hi Rich,
That’s another good suggestion. I fixed it. Let me know if you see other deficiencies, or feel free to send pull requests with patches to fix stuff yourself.
Hey, by the way, I was curious about your mention of students above, so I googled you, and it appears that we have basically the same job. I run the Nolop makerspace at Tufts University near Boston. Anyway, hello, fellow traveler!
Brandon,
Yes, I teach at Seattle University and run the Innovation Lab that is embedded in the electrical and computer engineering department. So very similar to you. We are also opening a campus wide space next fall that I am helping with.
The project that we are working on is for our Jr. Lab sequence. It is a solar tracker with a single solar cell. See attached photo. I use the project to teach electrical engineering fundamentals, lab skills, and design to our students.
Initially, we used light dependent resistors to track the sun. Spring quarter is a lot more open ended so I imagine that most students will switch to pysolar since it saves energy.
I really enjoy visiting other spaces, but that won't be happening for a while. And Boston is always a great city to visit.
My school email is bankhear@seattleu.edu. You can see some of my personal projects at @rb3.maker on Instagram.
~ Rich
On Mon, Mar 8, 2021 at 7:06 AM Brandon Stafford notifications@github.com wrote:
Hey, by the way, I was curious about your mention of students above, so I googled you, and it appears that we have basically the same job. I run the Nolop makerspace at Tufts University near Boston. Anyway, hello, fellow traveler!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pingswept/pysolar/issues/142#issuecomment-792816607, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJC2GGI3ZRGAB3PGWXHZYKTTCTRXBANCNFSM4YQCBXFQ .
The documentation does not appear to be correct for implementing pysolar
I get the following error because date is not timezone-aware:
The following code works and returns a datetime at UTC.
Am I missing something?