Stargazing Stars in sky given arbitrarily sized/oriented window

  • Thread starter Thread starter Phil A
  • Start date Start date
  • Tags Tags
    Sky Stars Window
AI Thread Summary
The discussion revolves around creating a virtual window to the night sky using a Raspberry Pi project, where the user seeks to calculate visible stars based on specific latitude, longitude, and time. The user has successfully calculated stars visible from horizon to horizon and is exploring how to adjust calculations for a window of arbitrary size and orientation. They seek clarification on the mathematical approach needed to determine star visibility when the window is tilted, particularly how to adjust for changes in elevation and azimuth angles. Recommendations for foundational mathematics, such as spherical trigonometry, are provided, alongside suggestions to study existing astronomy apps for insights. The ultimate goal is to map visible stars to a matrix of LEDs, with an interest in understanding the math behind varying window orientations.
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:
TL;DR Summary: In 3 years, the Square Kilometre Array (SKA) telescope (or rather, a system of telescopes) should be put into operation. In case of failure to detect alien signals, it will further expand the radius of the so-called silence (or rather, radio silence) of the Universe. Is there any sense in this or is blissful ignorance better? In 3 years, the Square Kilometre Array (SKA) telescope (or rather, a system of telescopes) should be put into operation. In case of failure to detect...
Thread 'Could gamma-ray bursts have an intragalactic origin?'
This is indirectly evidenced by a map of the distribution of gamma-ray bursts in the night sky, made in the form of an elongated globe. And also the weakening of gamma radiation by the disk and the center of the Milky Way, which leads to anisotropy in the possibilities of observing gamma-ray bursts. My line of reasoning is as follows: 1. Gamma radiation should be absorbed to some extent by dust and other components of the interstellar medium. As a result, with an extragalactic origin, fewer...
This thread is dedicated to the beauty and awesomeness of our Universe. If you feel like it, please share video clips and photos (or nice animations) of space and objects in space in this thread. Your posts, clips and photos may by all means include scientific information; that does not make it less beautiful to me (n.b. the posts must of course comply with the PF guidelines, i.e. regarding science, only mainstream science is allowed, fringe/pseudoscience is not allowed). n.b. I start this...
Back
Top