Sunday, August 25, 2019

D3-Celestial showboating

Position (RA / Dec): - / - (Hold down mouse button to stop animation)
🔴 Show the colors!
🠋 Download image

Showing off some new features and howtos for d3.celstial. First setting the Color of DSOs. The new settings below allow to display alle the deep space objects in a uniform default color if the 'colors' setting is set to false in the configuration-section under 'dsos'. The colr is determined by the 'fill' and 'stroke' properties.

  dsos: {
    colors: false,  // Show DSOs in symbol colors if true, use style settings below if false
    style: { fill: "#cccccc", stroke: "#cccccc", width: 2, opacity: 1 }, // Default style for dsos
  }

Second, how to convert cursor position to map coordinates. For this we need the function invert that is implemented for every map projection. If it gets valid x/y screen coordinates relative to the upper left corner of the map (that's why offsetLeft/Top are subtracted first), it returns the sky position in decimal degrees. Caveat: A position outside of the projected map returns [NaN, NaN].

  function getPosition(e) {
    var p = document.getElementById ('celestial-map17').getBoundingClientRect(),
        x = e.pageX - p.left - document.documentElement.scrollLeft,
        y = e.pageY - p.top - document.documentElement.scrollTop,
        inv = Celestial.mapProjection.invert([x, y]);
    return inv; // [right ascension -180...180 degrees, declination -90...90 degrees]
  }
  document.getElementById('celestial-map17').addEventListener('mousemove', getPosition, false);
  

If you want to pretty print the coordinates in hms and dms as above, here are the conversion functions for your convenience:

  function deg2hms (deg) {
    if (deg === null || isNaN(parseFloat(deg))) return;
    var ra = deg < 0 ? (deg + 360) / 15 : deg / 15, 
       h = Math.floor (ra),
       rest1 = (ra - h) * 60,
       m = Math.floor(rest1),
       rest2 = (rest1 - m) * 60;
       s = Math.round(rest2);
    return '' + pad(h) + 'ʰ ' + pad(m) + 'ᵐ ' + pad(s) + 'ˢ';
  }
  function deg2dms (deg) {
    if (deg === null || isNaN(parseFloat(deg))) return;
    var d = Math.floor (deg),
       rest1 = (deg - d) * 60,
       m = Math.floor(rest1),
       rest2 = (rest1 - m) * 60;
       s = Math.round(rest2);
    return '' + pad(d) + '° ' + pad(m) + '′ ' + pad(s) + '″';
  }

  function pad(n) { 
    if (n < 0) return n > -10 ? '-0' + Math.abs(n) : n;
    return n < 10 ? '0' + n : n; 
  }

And last a simple added functionality, a download link that saves the current canvas content as an image.

  var button = document.getElementById('btnDownload');
  // Set the file name to your liking, e.g. add the displayed date/time
  button.setAttribute('download', 'd3-celestial.png');
  button.addEventListener('click', function (e) {
    var canvas = document.querySelector('#celestial-map canvas'),
        // To get a download instead of image display, according to stack overflow 
        dataURL = canvas.toDataURL('image/png').replace('image/png', 'image/octet-stream');
    button.href = dataURL;
  });

Tuesday, July 30, 2019

Solar System Missions Update 2019-08

Here's my map of all active and future Solar System Missions as of August 1st 2019.

ISRO finallz launched Chandrayaan 2 to the Moon, it will be inserted into moon orbit on the 13th or 14th this month. In September it will deploy the Vikram lander for a lunar touchdown.

Data, images and documentation are available on my space exploration history GitHub repository and the associated website.

Saturday, June 29, 2019

Solar System Missions Update 2019-07

Here's my map of all active and future Solar System Missions as of July 1st 2019.

The Chang'e 4 mission continues on the lunar far side, Hayabusa 2 will retrieve a sample from Asteroid Ryugu on July 11th. ISRO will attempt to launch the Chandrayaan 2 Moon mission on the 15th.

And then there are two new future missions, Dragonfly will send a quadcopter drone to Titan, Comet Interceptor will go to the Earth/Sun L2 point and wait for a comet fresh from the Oort cloud or from interstellar space to intercept.

https://twitter.com/CometIntercept

Data, images and documentation are available on my space exploration history GitHub repository and the associated website.

Friday, May 31, 2019

Solar System Missions Update 2019-06

Here's my map of all active and future Solar System Missions as of June 1st 2019.

The Chang'e 4 mission continues on the lunar far side, Hayabusa 2 will probably retrieve a sample from the crater it made last month with the SCI Impactor at Asteroid Ryugu. ISRO will attempt to launch the Chandrayaan 2 Moon mission in July.

And instead of building the Lunar Gateway station the plan is now to land on the Moon in 2024 under the name Artemis, or do both in parallel, we will see...

Data, images and documentation are available on my space exploration history GitHub repository and the associated website.

Thursday, May 2, 2019

Space Observatories Update 2019-05

The Lomonossow and Spektr-R missions sadly have stopped working. Some new missions: SMILE (Solar wind Magnetosphere Ionosphere Link Explorer) and SPHEREx (Spectro-Photometer for the History of the Universe).

The source data are now available on my space exploration history GitHub repository, together with the included infographics.

Tuesday, April 30, 2019

Solar System Missions Update 05/2019

Here's my map of all active and future Solar System Missions as of May 1st 2019.

The Chang'e 4 mission continues on the lunar far side, Hayabusa 2 will check out the crater it made last month with the SCI Impactor at Asteroid Ryugu. ISRO has delayed the launch of Chandrayaan 2 Moon mission to July.

Another exciting announcement: The Chinese asteroid mission, as it was called on this graphic, now has the official name Zheng He (鄭和) after the famouse Admiral. It will return a sample from the near-earth asteroid/quasi-moon 469219 Kamo`oalewa, and continue on to a rendezvous with the main belt comet 133P/Elst-Pizarro

Data, images and documentation are available on my space exploration history GitHub repository and the associated website.

Sunday, March 31, 2019

Solar System Missions Update 04/2019

Here's my map of all active and future Solar System Missions as of April 1st 2019.

The Chang'e 4 mission continues on the lunar far side, in the first week of April Hayabusa 2 will launch an Impactor at Asteroid Ryugu, on the 11th the Beresheet mission will attempt a lunar landing, while ISRO also has announced to launch the Chandrayaan 2 Moon mission this month.

Data, images and documentation are available on my space exploration history GitHub repository and the associated website.