Sunday, June 29, 2008

How we may use Google Earth Plugin? :-)

Some time ago Google introduces Google Earth Plugin.

Playing with this plug-in I tried to use GPS track from my visit in LA to create some kind virtual trip :-)

See in new window

Nice? :-) [you must remember that to see it you will need Google Earth Plugin and rather quick connection to the Internet]

Most important thing in this solution is using of GPS data not only to place us "in the World" but also to determine camera angle.
I decided to use vector created from current point and next point of GPS track [OK, truly it's not full GPS track but only some points], when I know this vector I may calculate camera angle.

function fixAngle(angle,dx,dy) {
if (dx==0) {
if (dy>=0) angle = 90;
else angle = 270;
} else if ((dx>0) && (dy>=0)) {
angle = angle;
} else if ((dx>0) && (dy<0)) {
angle = angle+=360;
} else if ((dx<0)) {
angle = angle + 180;
return angle%360;
var dx = nx-x;
var dy = ny-y;
var angle = 0;
if (dx!=0) {
angle = Math.atan(dy/dx);
Where (nx,ny) are coordinates of next point in track and (x,y) are coordinates of current point.

Btw. imagine, using this plug-in and some server we may build real-time and super realistic multiplayer flight simulator :-)

Similar postsbeta
Recursion is evil ;-)
How to create valid file name?
How to get negative number from size() in LinkedList in Java? ;-)
Abuse of Booleans ;-)
How many i 1+1 in Java? ;-)

Asus EEE 900

Yeah! :-)

Almost year ago I read in some newspaper about new project of Asus called EEE. I loved an idea, but Asus didn't love Poland and EEE wasn't available in Poland.

Asus didn't start to distribute EEE in Poland, but some smaller companies started it ;-)

Thanks to this I have my own Asus EEE 900 :-)

It's quiet nice tool to play and work, my 900 is shipped with Windows XP, Star Office 8 and MS Works.

Star Office 8 from my EEE works nice with OpenOffice.org2GoogleDocs :-)

Similar postsbeta
25 seconds :-)
New issue to Google Docs API to vote for :-)
Calculation of SSD life time in EEE PC
Codename: Stokrotka - next test version of 1.7.0, this time without bug ;-)
I hate 6 o'clock....