Stars in sky given arbitrarily sized/oriented window

  • Context: Stargazing 
  • Thread starter Thread starter Phil A
  • Start date Start date
  • Tags Tags
    Sky Stars Window
Click For Summary

Discussion Overview

The discussion revolves around calculating the visibility of stars through a window of arbitrary size and orientation, as part of a project involving astronomy and programming. Participants explore mathematical approaches to determine which stars can be seen based on the observer's location, the window's position, and its orientation.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes a method to calculate visible stars based on latitude, longitude, and time, proposing a mathematical approach involving angles and ranges of azimuth and elevation.
  • Another participant suggests that existing applications like Stellarium and Heavens Above already perform similar calculations, implying that familiarity with these tools could be beneficial.
  • A different participant emphasizes the importance of understanding undergraduate mathematics, including linear algebra, trigonometry, and spherical trigonometry, as foundational knowledge for the project.
  • One participant expresses confusion about transitioning from calculating all stars to determining visibility through a smaller window, suggesting that the problem may involve adjusting the cutoff for the sky globe.
  • A later reply introduces the concept of rotating the window and questions how this affects the visibility calculations, indicating a need for clarity on the mathematics involved in such transformations.
  • Another participant notes a potential misunderstanding of terminology, clarifying that "elevation" is often referred to as "altitude" in this context.

Areas of Agreement / Disagreement

Participants generally agree on the foundational mathematical concepts needed for the calculations, but there is no consensus on the specific methods for determining star visibility through an arbitrarily oriented window. Multiple competing views and uncertainties remain regarding the implementation details.

Contextual Notes

Limitations include potential misunderstandings of mathematical terminology and the need for clarity on how to adjust calculations when the window is rotated. There are unresolved questions about the transition from a full sky calculation to a limited window view.

Phil A
Messages
3
Reaction score
0
Hi All,
I've been taking a bit of a crash course in astronomy for a raspberry pi project I'm toying with. I basically want to create a window to the night sky without the actual window but a screen to replace it. Barring the practicality (psh, who needs that) of doing this, it's been a lot of fun learning all this stuff.

I've gotten to the point where given any lat/lng and time, I can calculate all the stars in the night sky from horizon to horizon. And I think given just a window with a squared up vertical/horizontal orientation, I can also calculate the stars in that range, even if the window moves up in elevation from the horizon.
My math for this is something like:
Assume the observer looking out is in the center of the window and estimate the distance to the window to get the angle of the observer's line of sight relative to the vertical window side. Doubling this (since your observer is centered) creates a range of azimuth angles.
Do something similar but with the horizontal window sides to get your range of elevation angles. Any stars that are within these ranges are visible through the window.

1) Is my math correct for this?
2) Now let's say I were to give the window an arbitrary orientation so that my vertical sides and horizontal window sides are tilted by X degrees, what does my math become then?

If an added visualization is needed, I think this problem is similar to how Star Walk is able to handle my tilting the phone one way or the other. How the heck is it able to calculate what stars are just ahead?

Thanks for any help you can provide!
 
Astronomy news on Phys.org
Hi there Phil

Welcome to PF :smile:

you know there are already quite a number of phone apps that do this sort of thing ?

Stellarium, Heavens Above ... to name a couple

cheers
Dave
 
Last edited:
Hi davenn,
Thanks for the response! And yep, Star Walk does this as well and was probably a seed of inspiration for the project, but that doesn't stop me from wanting to implement it myself. I think the problem is I don't even know what to google for or what branch of mathematics to start reading up on. Even some direction there would probably be very helpful.
 
I think that some decent knowledge of undergrad math (Linear Algebra, Trigonometry, Calculus) along with some spherical trigonometry is a good start. I recommend an old book I've already studied named Spherical Astronomy by W.M.Smart. You can download it from archive.org: https://archive.org/details/SphericalAstronomy. As davenn pointed out, there are already quite a number of apps out there - I have Stellarium on my desktop and I think, it would be a good idea to become sufficiently acquainted with some well established app before you make your own. You can see what it offers in detail and maybe discover or anyway understand some additional things, that you may want to incorporate to your app.
 
Phil A said:
Hi davenn,
Thanks for the response! And yep, Star Walk does this as well and was probably a seed of inspiration for the project, but that doesn't stop me from wanting to implement it myself. I think the problem is I don't even know what to google for or what branch of mathematics to start reading up on. Even some direction there would probably be very helpful.
I guess I'm confused about what the problem is: if you've already "calculate[d] all the stars in the night sky", then you are basically already finished setting-up the math. You just need a different cutoff to your sky globe than you are using (a small window instead of half the sky).
 
Sorry for any confusion, let me try to clarify. Also, if this isn't the right forum for this, let me know. It starting to feel like it might actually be a graphics programming problem.

Let's say I have a rectangular window sitting at 45 degrees elevation. The bottom and top "frames" of the window are parallel with the plane of the horizon. Using the azimuth and elevation, I believe it's fairly easy to tell what stars are visible through the window, as described in the first post. Now, let's say there's an invisible centerline from an observer to the stars, halfway between the vertical sides and the horizontal sides, and we rotate that window by 20 degrees about the centerline, I'm no longer sure how to tell what stars are visible through the window.

My eventual goal if I can get past the technical stuff is to be able to map the brightest stars to a matrix of LEDs and I'd like to be able to arbitrarily place that anywhere. It will most likely be at a vertical/horizontal orientation but for the completionist in me, I'd like to understand how the math changes when I rotate it about the centerline axis and ideally implement that as well.

Edit: I've been using the word elevation, but I think most people call it altitude. I'm still getting the hang of the nomenclature.
 
Last edited:

Similar threads

  • · Replies 29 ·
Replies
29
Views
2K
  • · Replies 5 ·
Replies
5
Views
17K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 9 ·
Replies
9
Views
9K
  • · Replies 3 ·
Replies
3
Views
9K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 21 ·
Replies
21
Views
6K
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K