chrisarridge / Ikuchi

Ikuchi is a Javascript application for viewing magnetospheric geometries
GNU General Public License v3.0
7 stars 2 forks source link

Add an aberrated solar wind velocity vector #5

Open chrisarridge opened 9 months ago

chrisarridge commented 9 months ago

Alongside the direction to the Sun we should add another vector showing the aberrated direction of the solar wind which accounts for the speed of the solar wind and the speed of the planet's orbital motion.

idrak888 commented 9 months ago

Hi I am interested in working on this

chrisarridge commented 9 months ago

You'd be very welcome @idrak888! In the coordinate system of the model the x axis points from the planet to the Sun (represented by oPlanetSunVector in the Ikuchi class in source/js/ikuchi.js). If the planet was at rest (not moving around the Sun) and the solar wind went straight away from the Sun then the solar wind would point exactly in the $-x$ direction (-1,0,0). the following crude sketch shows the directions:

image

So we could add another vector like

this.oSolarWindVector = new THREE.ArrowHelper(new THREE.Vector3(-1.0,0.0,0.0), origin, 5.0, this.solarWindVectorColour)

But because the planet is moving around the Sun the solar wind appears like it's coming at an angle $\tan^{-1}(v{planet}/v{solarwind})$ from the Sun direction towards the planet's orbit. So it will be a case of calculating this angle, for the selected planet, and constructing the appropriate THREE.Vector3.

We don't have the planet orbital speed in the source/js/planets.json data file but this could be added using the data from the NASA Planetary Fact Sheets. Plus we'd need to store the solar wind speed somewhere (there could be in a GUI element for it) and we'd need to add a button to turn this vector on/off (probably in the "Options" part of the GUI).

Is that enough information to go on?