astronomy

Moon / Lunar Phase Algorithm

让人想犯罪 __ 提交于 2019-11-27 09:20:04
问题 Does anyone know an algorithm to either calculate the moon phase or age on a given date or find the dates for new/full moons in a given year? Googling tells me the answer is in some Astronomy book, but I don't really want to buy a whole book when I only need a single page. Update: I should have qualified my statement about googling a little better. I did find solutions that only worked over some subset of time (like the 1900's); and the trig based solutions that would be more computationally

Calculate whether it is close to dawn/dusk based on sunrise/sunset?

浪子不回头ぞ 提交于 2019-11-27 08:45:46
问题 Is it possible to calculate when dawn/dusk will be if I have the time for sunrise, sunset and the longitude and latitude of a particular location? 回答1: there are some simplified equations for that but the real thing is this: solving Kepler's equation btw your question is very similar to this: time when the sun is X degrees below/above Horizon if you want easy solution then obtain sunrise calendar for your location it should look something like this: Just pick the closest latitude or generate

Reverse radial axes of Matplotlib polar plot

风格不统一 提交于 2019-11-27 07:47:05
问题 I'm trying to create an astronomical polar plot with a radial axis that starts from -45° on outer line and increases to 90° in the center of the plot. But I didn't find any way to reverse radial axis of the PolarAxes instance. invert_yaxis() method doesn't work at all. Also, there are some hidden methods such as ax.set_rlim() that doesn't have any docs. Here is my current code: fig = plt.figure() ax = fig.add_axes([0.1,0.1,0.8,0.8], polar=True) # ax.invert_yaxis() ax.set_theta_zero_location(

swift sphere combine star data

我只是一个虾纸丫 提交于 2019-11-27 05:42:07
i want to build a stargazing app. And now i already built a sphere and cover it with a star map (based on celestial coordinates). ( https://svs.gsfc.nasa.gov/cgi-bin/details.cgi?aid=3895 ) now i have a json file which has the star catalog from YBS. (also based on celestial coordinates). ( http://tdc-www.harvard.edu/catalogs/bsc5.html ) i want to combine the data with star map, wishing the map to show the name of Constellation whenever my camera node turn to that place. but i don't know how to combine data and sphere. since the sphere will rotate due to user's latitude and time. The star data's

Position of the sun given time of day, latitude and longitude

大城市里の小女人 提交于 2019-11-26 21:26:58
This question has been asked before a little over three years ago. There was an answer given, however I've found a glitch in the solution. Code below is in R. I've ported it to another language, however have tested the original code directly in R to ensure the issue wasn't with my porting. sunPosition <- function(year, month, day, hour=12, min=0, sec=0, lat=46.5, long=6.5) { twopi <- 2 * pi deg2rad <- pi / 180 # Get day of the year, e.g. Feb 1 = 32, Mar 1 = 61 on leap years month.days <- c(0,31,28,31,30,31,30,31,31,30,31,30) day <- day + cumsum(month.days)[month] leapdays <- year %% 4 == 0 &

calculate the time when the sun is X degrees below/above the Horizon

给你一囗甜甜゛ 提交于 2019-11-26 18:01:33
I want to know what is the time when the sun is X degrees below/above the Horizon. For example, I want to find the time when the sun is 19.75 degrees below the horizon. I think it has something to do with the zenith in the function date_sunrise / date_sunset but I'm not sure. Thanks in advance! Spektre collect Sun ephemerids data for day you need take 1 hour steps and get Suns position in azimuthal coordinates for the geo-location you need. Either use equations you found or use some WEB service like: JPL Horizons don't like this one as they use some weird output reference frames that does not

How to draw sky chart? [closed]

为君一笑 提交于 2019-11-26 14:47:20
How do I draw a star chart like this ? I have: A star database with coordinates (right ascension and declination) Observer coordinates (latitude, longitude) Time of observation I need a formula which considered these parameters. stellar database google for: BSC (Bright star catalog) ~10K stars up to +6.5 mag (naked eye) Hipparcos ~118K stars up to +12 mag (telescopes) and also has parallax (3D coordinates) and many more Hipparcos is mine favorite. both can be downloaded freely in ASCII format from many Astornomy server just google ... planets (bodies) You can compile the orbital parameters

Position of the sun given time of day, latitude and longitude

浪子不回头ぞ 提交于 2019-11-26 12:18:08
问题 This question has been asked before a little over three years ago. There was an answer given, however I\'ve found a glitch in the solution. Code below is in R. I\'ve ported it to another language, however have tested the original code directly in R to ensure the issue wasn\'t with my porting. sunPosition <- function(year, month, day, hour=12, min=0, sec=0, lat=46.5, long=6.5) { twopi <- 2 * pi deg2rad <- pi / 180 # Get day of the year, e.g. Feb 1 = 32, Mar 1 = 61 on leap years month.days <- c

calculate the time when the sun is X degrees below/above the Horizon

浪尽此生 提交于 2019-11-26 06:08:43
问题 I want to know what is the time when the sun is X degrees below/above the Horizon. For example, I want to find the time when the sun is 19.75 degrees below the horizon. I think it has something to do with the zenith in the function date_sunrise / date_sunset but I\'m not sure. Thanks in advance! 回答1: collect Sun ephemerids data for day you need take 1 hour steps and get Suns position in azimuthal coordinates for the geo-location you need. Either use equations you found or use some WEB service

Star B-V color index to apparent RGB color

血红的双手。 提交于 2019-11-26 04:25:56
问题 I\'m trying to convert a star\'s B-V color index to an apparent RGB color. Besides look up tables and color ramps, it seems like there\'s no well known algorithm for doing this. What\'s a B-V color index? It\'s a number astronomers assign to a star to indicate its apparent color. Hot stars (low B-V) are blue/purple and cool stars (high B-V) are red with those white/orange stars in between. Initial algorithm B-V to Kelvin var t = 4600 * ((1 / ((0.92 * bv) + 1.7)) +(1 / ((0.92 * bv) + 0.62)) );