Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 28 29 30 [31] 32 33   Go Down

Author Topic: Weekly progress report  (Read 40311 times)

0 Members and 1 Guest are viewing this topic.

Michkov

  • member
  • Offline Offline
  • Posts: 17
Re: Weekly progress report
« Reply #360 on: February 09, 2019, 03:31:22 PM »

5000 years.

Shit .

What sort of flight simulator do you think I am building  ;)

For the inevitable ancient alien mod :)


Which reminds me to you need planet locations too?
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1225
Re: Weekly progress report
« Reply #361 on: February 10, 2019, 01:39:58 AM »

I have the code for the planets

I know I need to add Venus, it is so visible. However I am not sure which others I have to add.
Logged

Arkbird1000

  • member
  • Offline Offline
  • Posts: 1
Re: Weekly progress report
« Reply #362 on: February 10, 2019, 02:39:27 PM »

I have the code for the planets

I know I need to add Venus, it is so visible. However I am not sure which others I have to add.

Mars, Jupiter, and Saturn are bright in the sky. Perhaps Mercury too, as it is also quite visible from the ground, just not as easy to spot.
Logged

Jimbo947

  • member
  • Offline Offline
  • Posts: 89
Re: Weekly progress report
« Reply #363 on: February 11, 2019, 02:32:44 AM »

Sirius would be in that league
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1225
Re: Weekly progress report
« Reply #364 on: February 11, 2019, 06:05:27 AM »

Sirius is already in  :)
Logged

Jimbo947

  • member
  • Offline Offline
  • Posts: 89
Re: Weekly progress report
« Reply #365 on: February 12, 2019, 02:46:47 AM »

Another Senior Moment   :( :( :(
Logged

Pursuivant

  • member
  • Offline Offline
  • Posts: 666
Re: Weekly progress report
« Reply #366 on: February 12, 2019, 03:07:30 PM »

I know I need to add Venus, it is so visible. However I am not sure which others I have to add.

Venus, Mercury, Mars, Jupiter, and Saturn are the planets visible from Earth with the naked eye, but Mercury isn't that important for celestial navigation.

I guess if you want to get really fancy and add some more eye candy to the night sky, you could add in the Periodic Comets (e.g., Halley's Comet) and the periodic meteor showers (e.g., Perseid and Leonid meteor showers). If you wanted to get really really fancy, you could include the brighter artificial satellites. It would probably make more sense to allow such things to be added to the game and let someone else fill in the details.
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1225
Re: Weekly progress report
« Reply #367 on: February 14, 2019, 07:49:27 AM »

Planets are in.

At the moment I have them on all the time (stars turn off when the sun drops close to the horizon) as I know Venus is often visible during the day.

However this is very crude. I would like a way of computing the correct luminance so I can turn them on and off properly.

Currently Saturn, Mars, and Jupiter are much too visible.

If anyone comes across a good equation, please let me know.



Logged

Michkov

  • member
  • Offline Offline
  • Posts: 17
Re: Weekly progress report
« Reply #368 on: February 16, 2019, 07:46:58 PM »

Not a formula but at least a starting point, Twilight and it's 3 different definitions. Which are all based on the declination of the sun below the horizon. Which I assume you have in the code or at least can extract, since you have it move across the sky. In effect you from Nautical twilight (47mins past sunset) onwards you should be able to navigate using the stars. By Astronomical Twilight (70mins past sunset) you should be able to see at least down to the least visible stars, that is dependent on environmental conditions though.

I'd implement it via a function that turns up the global luminance value depending on where the sun is below the horizon. Hitting the two conditions outlined above. I'm not quite sure what the usual magnitude of the navigational stars is but that should be easy to find out.


On another note, your moon phase looks very odd. Ignore the following paragraph if it's still WIP, but the lunar phases look like this



Essentially what you got is a circle which is the fully lit moon and superimposed on it a dark ellipse with its long axis running perpendicular to the moon sun vector. As the moon goes from new to the first quarter, your ellipses short axis goes from the full lunar radius to zero at the first quarter.
In the next quarter you to the same in reverse, you have to switch to an ellipse that doesn't darken the moon but reveals the other quarters as the moon moves towards full.
Waning would be the process in reverse.

In the end the size of the small axis of the ellipse is a function of the angle between Sun and Moon as seen from the Earth.
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1225
Re: Weekly progress report
« Reply #369 on: February 17, 2019, 01:26:53 AM »

I realised my moon phase calculation is rubbish when I was in Stockholm. Sadly I haven't had chance to change it. (yet)

I render a sphere for the moon and change the lighting position to get the desired moon phase.

I calculate the moon phase using the epoch 1990 day (days since 1st of January 1990) and currently return this as a value in the range 0 - 1

Sadly in the display code I just multiply this by Pi, which is rubbish.

When it comes to the stars I use the angle between the sun position and the horizon to control display, this will be correct no matter the latitude.


Logged

Pursuivant

  • member
  • Offline Offline
  • Posts: 666
Re: Weekly progress report
« Reply #370 on: February 18, 2019, 02:43:07 PM »

However this is very crude. I would like a way of computing the correct luminance so I can turn them on and off properly.

How much detail do you need?

The nitty-gritty of calculating Apparent Magnitude for planetary objects is fairly complex, and requires calculating planetary orbits, distance of a given body from both the Earth and the Sun, etc. then converting everything from AM to Lux.

If you wanted to handwave it, you could just assume a fixed AM for any given planetary object and have it "fade out" as luminance from competing light sources increases. Otherwise, you go down the rabbit hole into some fairly complex math. (The good news is that if you go that direction, you have the rudiments of a space flight simulator!)

I believe that this is one good entrance to the rabbit hole:

https://stjarnhimlen.se/comp/tutorial.html

This paper also gets into the fiddly bits about calculating AM for planetary objects (KBO in this case):

comethunter.lamost.org/scwrk/THECAL/opam.pdf

For the hand-wavy option:

Planet Min AM Mean AM Max AM (Remembering that when measuring AM negative numbers = brighter)
Venus (-2.98, -4.14, -4.92)
Jupiter (-1.66,-2.20,-2.94)
Mars (+1.86,+0.71,-2.94)
Mercury (+7.25,+0.23,-2.48)
Saturn (+1.17,+0.46,-0.55)

Faintest objects visible with naked eye when sun less than 10* above the horizon: -2.5
Faintest objects observable during day when sun is high: -4.0
Faintest stars visible in urban neighborhood with naked eye: +3 to +4
Naked eye limit: ~+6.0

Apologies if this is TMI or repeats stuff you already know.
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1225
Re: Weekly progress report
« Reply #371 on: February 19, 2019, 01:42:12 AM »

I have apparent magnitudes for all the stars and planets.

The table of when objects become visible is very useful, but it assumes ground level.

When you are at 45,000 feet the equation is very different  :D

It's a good start though, and has kicked off the little grey cells.

It occurs to me that the angle between the sun and the eye is a key factor, and at 45,000 feet you will be able to see over the curvature of the earth making the apparent horizon lower.... could be something there
Logged
Pages: 1 ... 28 29 30 [31] 32 33   Go Up
 

Page created in 0.052 seconds with 27 queries.