Go to Space!

6/20/2014

I wrote codes to project a real image of the earth by using azimuthal equidistant projection 2 years ago. But recently I found out it did not work on newer PC.
It seemed that the cause might be the version of .Net framework. The version I was working on to create the program was 3.0, on which it can run normally. The version it did not correctly run on was 4.5. But I had been so screwed up with this problem.

Finally, I found the cause was the minor difference of behavior of Marshal::Copy() in different versions. In my program, I used this copying function to transform data on an array to the form of 24-bit bitmap, and vice versa. If you learned computer engineering, you may know 24-bit bitmap has "padding", or additional space, at the end of each row of the image so that the byte size of the row can be a multiple of 4. Actually, I didn't know well about how the function worked, so I just put data on an array without padding and let it convert data to bitmap. The old version seems to flexibly convert data and automatically put necessary padding, but the newer one seems so strict about the format of the array and some portion of data had been accidentally put into the space of padding. This means the order of RGB data could be corrupted. That's why the result of problematic image lost colors and was distorted.

The width of the image is 533. So the total byte size of the row is 533 x 3 = 1599 bytes. To make this a multiple of 4, 1 byte of padding must be added. The image above misses this 1-byte space, and the function mistakenly took next 1 byte of data as padding. So the row of image gradually shifts to the left as it goes from top to bottom.

So I took this feature into consideration. I reformatted the array so that it has padding in each row.
Now the program can normally run on .Net framework 4.5!

8/25/2013

In this summer, I took pictures of the night sky because I found out my cheap digital camera can control its shutter speed. But the result was horrible. The following is the picture which was exposed for 15 seconds.

You cannot see anything, can you? (Actually, there is a few dark points though)

OK, so I used Gimp to enhance the image. Gimp is a kind of software to draw and paint. But, in addition, it can also modify and enhance images. I used Curves, one of the modifying tools.
At the menu bar, Tools -> Color Tools -> Curves. Then, you can transfer dark pixels to the brighter level.http://docs.gimp.org/en/gimp-tool-curves.html

This is the result.

Many stars! Pegasus is on the left side. Lacerta and Andromeda are at the lower right and the upper right, respectively.

The location where I took this picture was an urban area. So I will try the same thing in a rural area someday!

5/29/2013

I remember NASA used to have so called "constellation program" several years ago. Briefly, they were planning to send human beings to the Moon again.

This program seems the preparation to build a stronghold on the Moon for the space exploration of the further celestial bodies. The gravity on the Moon is less than 20% of that of the Earth. If some resources are available there, people can build a base and launch rockets by using less energy. The Moon has the potential to be a gate way to deep space.

But this program was canceled because of its huge cost. You know sending humans requires more cost and technologies rather than sending machines. However, this means autonomous systems can play an important role on the efficiency of exploration. In addition, sophisticated autonomous technologies will also reduce the cost of manned exploration in the future. I think the current trend in space exploration is an unmanned autonomous spacecraft. So robotics will gain more focus in the future. (yet, already?)

5/08/2013

You may know the atmosphere can be divided into several layers. What is the furthest layer from here? Yes, it's the ionosphere. This layer plays an important role for radio communication. The molecules in the layer are ionized by the radiation from the Sun. These ionized molecules reflect radio waves from the ground. (of course, such waves with higher frequency can go through the layer though...) That is, we can send radio waves beyond the horizon. But this layer changes dynamically. So it is important to understand the phenomena and mechanism of it.

This picture is the experiment to observe winds in the ionosphere. The equipment of the rocket released the vapor of lithium. The flame color of lithium is red, so you can see a red clound in the image. It seems there are some other types of metal released. The scientists can figure out the dynamics of the ionosphere by analysing the transition of these clouds.
You can see the details about the experiment here.http://www.nasa.gov/multimedia/imagegallery/image_feature_2504.html

9/25/2012

Finally, Microsoft released Visual Studio Express 2012, and it has IntelliSense for C++/CLI! If you have ever used Visual C++ 2010 Express, you might have complained about the absence of IntelliSense in it. So you don't need to use VC++ 2008 anymore.

But, unfortunately, there is no C++/CLI template for Windows Form Application as of Sept. 25th 2012.

8/14/2012

I am recently excited about Mars exploration, especially Curiosity rover. You might have known that this spacecraft landed by using incredible techniques.

The previous rovers, such as Mars Exploration Rovers, used airbags and bounced on the ground several times to land on Mars. However, Curiosity used different process. After deploying its parachute and slowing down correctly, it separated from the parachute facilities and fell down with the special machine called Sky Crane. The crane hovered and hanged the rover with a cable. When the rover touched down, it flied away with the cable.

I think spacecrafts orbiting an celestial object are important to make the environment for exploration because they can establish the network around the object and Earth.
Even in deep space where a rover has to work by itself without the control room, if there are orbiters, they can seize the information of wide areas of an object.
In the future, it may be a major way to send a rover with many orbiters and machines scattering around an object rather than sending just a single rover or spacecraft.

7/09/2012

Today, I heard the first cry of cicadas. It's summer! And It is very hot. The maximum temperature is 30 deg. Celsius. But how do you say it in Fahrenheit?
I am sometimes confused with the two scales of temperature: Fahrenheit and Celsius.

You know Fahrenheit is used in a few countries including the U.S. I don't know why Fahrenheit is still commonly used in the U.S. even though many other countries use Celsius. Every time I talk about weather with them, I have to "translate" Celsius to Fahrenheit, and vice versa.

But it is ridiculous to always hold a pen and notes (or a calculator) to use this formula: (F=C*9/5+32). So I have several steps to easily calculate scales in my head.