Mahisorn Wongphati

The best way to make your dreams come true is to wake up!" — Paul Valery

Browsing Posts in Techs

http://www.qtsoftware.com/about/licensing

in /boost_x_xx_x/tools/build/v2/user-config.jam

# ——————
# GCC configuration.
# ——————

# Configure gcc (default version).
# using gcc ;

# Configure specific gcc version, giving alternative name to use.
# using gcc : 3.2 : g++-3.2 ;

Boost C++

ได้มาจาก web ชมรม
เท่ดีและน่าจะเอาไปทำอะไรได้อีกเยอะเลย

http://www.phunland.com/wiki/Home

Congratulations to all EIC members.

We win 2 World RoboCup 2009 titles

PS. Finally, someone already notice some relations between robotics and politics.

ทำแพนงหมูด้วยเครื่องแกงที่อาจารย์มานพให้มา อร่อยเลยทีเดียว พรุ่งนี้จะเอาไปให้ชาวบ้านกินด้วย

วันเสาร์ไปเรียนภาษาญี่ปุ่นมา อาจารย์อ้วนกลมสอนเก่ง ใช้ได้เลย เสร็จแล้วแวะไปกินอาหารไทยครั้งแรกในรอบ 6 เดือน คะน้าหมูกรอบไข่ดาวกะพริกน้ำปลา อร่อยโคตรๆ

อุปกรณ์ประหลาดแห่งปี “เครื่องแหกปาก เพื่อให้ปากตรงเรียว” บ้าไปละ

ถ้านึกขนาดไม่ออก ไอ้กีวีเขียวๆ เส้นผ่านศูนย์กลางประมาณไข่ไก่นะ

ปล. มีเด็กไม่น้อยมาอาศัยอยู่สามคนเนื่องจากมาแข่ง Rescue Simulation League ที่ Numazu (Japan Open)

และไอ้คุณน้องต้น (แว่นกลาง) บอกว่ากินอัน 3800 คนเดียวหมดสบายๆ บ้าไปละ

แบกขากล้องไปด้วย กะไปถ่ายพระอาทิตย์ตกแบบ HDR แต่…

ไปได้ 3/4 ยางรั่ว แสดดดด โดนตะปูตำ นึกว่าต้องเขนกลับมาบ้านซะแล้ว เพราะหาร้านไม่เจอเลย

แต่… โชคดีไปเจอปั้มที่เค้ารับปะยาง เลยรอดตัวไป

แต่… ค่าปะยาง 1 รู 1000 เยนเท่านั้นครับ แพงกว่าบ้านเราแค่ 15 เท่า เท่านั้นเอง

แต่… ก็ดีกว่าเขนกลับบ้านด้วยระยะทางมากกว่า 5 กิโล

แต่… แบกกล้องไปแล้วก็ถ่ายซะหน่อยแล้วกัน ได้รูปดู ok ๆ มาสองสามรูป

HDR

ดอกหญ้าริมทาง 1

ดอกหญ้าริมทาง 2

ได้ผลไม่ได้ผลไม่รู้ แต่การคิดอย่างมีเหตุมีผล จากประสบการณ์ เป็นอะไรที่ควรเรียนรู้และฝึกฝน

Guy Invents Potential Cancer Cure With Radio Machine Built Out of Pie Pans… and Hot Dogs

This is the best paper about KF filter… at less for me.

Using the Kalman Filter to track Human Interactive Motion-Modelling and Initialization of the Kalman Filter for Translation Motion

and This is Octave (Matlab) code from the paper. Input data is position of the object in (x, y)

function [raw, filter] = kf2DHumanMotion(data)
%printf(‘Loading file: %s\n’, data);
input = load(data);

%measurement data
Zx = input(:, 1)’;
Zy = input(:, 2)’;

raw(1,:) = Zx;
raw(2,:) = Zy;

%update time
dt = 0.1;

%max acceleration
aMax = 5000.0 * dt;

%max speed
vMax = 5000.0 * dt;

%identity matrices
I = eye(2);

%xminus_k = Ax_k + w_k
A = [1.0 0.0 dt 0.0;
0.0 1.0 0.0 dt;
0.0 0.0 1.0 0.0;
0.0 0.0 0.0 1.0];

%z_k = Hx_k + v_k
H = [1.0 0.0 0.0 0.0;
0.0 1.0 0.0 0.0;
0.0 0.0 0.0 0.0;
0.0 0.0 0.0 0.0];

%measurement covariance
covx = 500.0;
covy = 500.0;

%covariance for velocity are added to prevent invert matrice problem
R = [covx 0.0 0.0 0.0;
0.0 covy 0.0 0.0;
0.0 0.0 1.0 0.0;
0.0 0.0 0.0 1.0];

%process covariance
Q = (((aMax * aMax) * dt)/6.0) * [2*I*(dt*dt) 3*I*dt; 3*I*dt 6*I];

dsMax = vMax * dt;
s2 = dsMax*dsMax;
v2 = vMax*vMax;

P_0 = (1/16) * [s2 0.0 0.0 0.0;
0.0 s2 0.0 0.0;
0.0 0.0 v2 0.0;
0.0 0.0 0.0 v2];

%intial value
x_0 = [Zx(1); Zy(1); 0.0; 0.0];
x_k = zeros(4,1);
P_k = zeros(4);
Pminus_k = zeros(4);
K_k = zeros(4);
z_k = [0.0; 0.0; 0.0; 0.0];

filter(1,1) = x_0(1);
filter(2,1) = x_0(2);

count = 0;

for i = 2:size(Zx, 2)
%printf(“step %d\n”, i – 1);

%if not detect
if (Zx(i) == 0.0) && (Zy(i) == 0.0)
%printf(“zero input\n”);
%predict only or use old data
if(count < 3)
x_k = A*x_0;
Pminus_k = A*P_0*A’ + Q;
x_0 = x_k;
P_0 = Pminus_k;
end
count = count+1;

else
count = 0;
%printf(“input (%6.3f, %6.3f)\n”, Zx(i), Zy(i));

%Time update
x_k = A*x_0;
Pminus_k = A*P_0*A’ + Q;

%measurement update
K_k = (Pminus_k * H’) * inv((H*Pminus_k*H’) + R);
z_k = [Zx(i); Zy(i); 0; 0];
x_0 = x_k + (K_k * (z_k – (H*x_k)));
P_0 = (eye(4) – K_k*H)*Pminus_k;

end
filter(1,i) = x_0(1);
filter(2,i) = x_0(2);
%printf(“————————————————\n”);
end
end

Please read this guide before continue.

Some benefit for doing this kind of installation should obvious to someone that looking for this thing.

After finish reading the guide, I start new installation step by step as show in the guide. My actual setup steps are a little bit different from the guide (After failed in the first round). Because their is a problem that is not mention or notice by author (the guide may a little bit old for current update of XP).

The problem is how to move “Program Files” and everything in side it with out breaking the windows installation. I will explain it line by line along with my setup steps.

Before we begin.
!!PLEASE BACKUP AS MUCH AS YOU CAN!!
If you don’t know how to open command dialog and regedit. Please don’t try!!.

Tools

  • Windows setup CD and CD-key
  • Anything that help you remember the setup steps.

Setup Windows

  • After boot from CD delete all partition(s)
  • Create partitions as follow
    • C: ~ 5-6G
    • D: ~ 30G -40G for program installation
    • E: ~ the rest
  • Make sure that drive letters are C: D: and E:. However, any letter sequence should be fine. But Windows should install in C: to avoid any uncommon problems.

After setup complete

  • Log in with administrator account
  • Format drive D: and E: with default option (use quick format if possible)
  • Don’t install or update anything. We will do this later.
  • Uninstall every possible programs inside Control Panel – > Add and Remove Program

Following the steps below one by one or all at once if you really trust my guide :)

(One by one is recommended. Because it safer if you miss something, or I write something wrong. You may able to recover your Windows installation by your own)

Moving swap file

Y| REG ADD “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory management” /v PagingFiles /t REG_MULTI_SZ /d “C:\pagefile.sys 1024 1024\0D:\pagefile.sys 2048 2048″

Copy the command line above and pasts in command dialog. Change swap file size to match you RAM size. (also drive letter if you want). Open regedit and check that it already changed and correct.

Reboot, you must able to log in to your Windows. If not, good luck and see you.

After log in, make sure that we already move and change swap file setting. Show all hidden files and system protected file using folder option. Check that the size of “pagefile.sys” in drive C: and D: are correct.

Move user directory

“Documents and Settings” is what we are talking about. Copy and past following line to command dialog.

Change it location

Y| REG ADD “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList” /v ProfilesDirectory /t REG_EXPAND_SZ /d “e:\home”

Check with regedit to make sure.

After that, copy all data to new location using this command

XCOPY “c:\Documents And Settings” e:\home\ /E /C /H /O

Reboot and everything should work fine or you have re-install if you need to.

Finally, Move program directory

If you just follow the guide in the link (as I already did), everything will work fine after reboot. However, if you delete “Program Files” in C:, you will not able to use IE (mine is IE7) which is really important part of windows. This problem should not happen if we look closer to

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion

Because inside “Program Files” there is another important directory called “Common Files” which is used by windows itself and may programs in your system. And it has its own key for its localtion named “CommonFilesDir”. If you move “Program Files” but do not change location of “Common Files”, many programs will stop working.

By any chance, if you leave old “Program Files” in C: because new program will be installed in new location, everything will work fine. This will soon lead you to another problem.

5 ~ 6G disk space of drive C: will not enough.

This problem is caused by the fact that many programs will install many of their shared and common component into this directory.

Moreover, even you change “Common Files” you still cannot completely remove “Program Files” in C: because IE7 will stop working again. After doing some investigation, I found that

Windows and IE are (may be) the only programs those not follow the rule.

This is my testing method.

  • Change “Program Files” and “CommonFilesDir” location and copy all files (show later). But not delete the original files
  • Restart
  • Everything works file.
  • Rename “Program Files” to something else. We will be unable to start IE again.
  • I’m trying to create new account (let Windows do some initialization from what we have change)
  • This will happen after login to new account.
    • New “Program Files” appear in C: with
      • “Common Files” that have
        • “Microsoft Shared” folder and
        • “System” folder inside it
      • empty “Windows Media Player” also create
    • But IE is still unable to be start (its window appear and close immediately)
  • After a few copying and deletion, I found out that “Internet Explorer” folder and its content must stay in “C:\Program Files” and everything will woke fine.

At this point, we may be able to do some conclusion about what I have said in previous quote.

However, after installing some programs and doing some Windows updates. Size and component of “C:\Program Files” is not change. We may be able to say that “Program Files” is movable with a few exceptions. The following text is the detail of moving “Program Files” directory.

In “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion”

  • Change “CommonFilesDir” value to new location
  • Also change “ProgramFilesDir” to new location
  • Copy all data to new location using

XCOPY “c:\Program Files” d:\programs\ /E /C /H /O

Double check everything by your own sense. That all I can say.

Reboot the system.

Login if possible.

Now you can remove everything inside “Program Files” except two directory what I already mention before.

  • Common Files
  • Internet Explorer

Welcome to old Windows XP in a new installation effort.

PS 1. Please help me correct any errors (including grammar, and readability) if this post happen to be useful for your new Windows XP installation.

PS 2. Internet speed in Japan

55

And real download time is also about 1 min.

20080401 – update using Ford comment

Rss Feed Tweeter button Facebook button Technorati button Reddit button Linkedin button Webonews button Delicious button Digg button Flickr button Stumbleupon button Youtube button