<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>pigeon's blog - pigeond.net &#187; software</title>
	<atom:link href="http://pigeond.net/blog/category/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://pigeond.net/blog</link>
	<description>the pigeon concerto in D minor</description>
	<pubDate>Sat, 28 Jun 2008 06:52:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>My real experience of M$ Winblows Vista today&#8230;</title>
		<link>http://pigeond.net/blog/2008/02/12/my-real-experience-of-m-winblows-vista-today/</link>
		<comments>http://pigeond.net/blog/2008/02/12/my-real-experience-of-m-winblows-vista-today/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 12:53:16 +0000</pubDate>
		<dc:creator>pigeon</dc:creator>
		
		<category><![CDATA[software]]></category>

		<category><![CDATA[sucks]]></category>

		<category><![CDATA[vista]]></category>

		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://pigeond.net/blog/2008/02/12/my-real-experience-of-m-winblows-vista-today/</guid>
		<description><![CDATA[What do you call a piece of software that&#8230;

cannot copy 268MB of files from and to the same harddisk (i.e. the infamous &#8220;out of memory&#8221; error)?
cannot show me the total size of a folder because the &#8220;General&#8221; tab stopped appearing in the properties, until I rebooted?
I have to reboot 6 times for various reasons (network [...]]]></description>
			<content:encoded><![CDATA[<p>What do you call a piece of software that&#8230;</p>
<ul>
<li>cannot copy 268MB of files from and to the same harddisk (i.e. the infamous <a href="http://blogs.zdnet.com/hardware/?p=829">&#8220;out of memory&#8221;</a> error)?</li>
<li>cannot show me the total size of a folder because the &#8220;General&#8221; tab stopped appearing in the properties, until I rebooted?</li>
<li>I have to reboot 6 times for various reasons (network not working, change of settings, etc) within 3 hours of usage?</li>
</ul>
<p>Answer: <a href="http://www.microsoft.com/windows/products/windowsvista/">useless piece of junk</a>.</p>
<p>Please. Save yourself. Save your friends. Save the world. Tell everyone <a href="http://badvista.fsf.org/what-s-wrong-with-microsoft-windows-vista">what&#8217;s wrong with Vista</a>. I&#8217;m a Linux guy, but I&#8217;m not asking you to run Linux. I&#8217;m just asking you not to use this piece of crap. Use something that you deserve.</p>
]]></content:encoded>
			<wfw:commentRss>http://pigeond.net/blog/2008/02/12/my-real-experience-of-m-winblows-vista-today/feed/</wfw:commentRss>
		</item>
		<item>
		<title>First post! In my new blog system&#8230;</title>
		<link>http://pigeond.net/blog/2008/01/26/first-post-in-my-new-blog-system/</link>
		<comments>http://pigeond.net/blog/2008/01/26/first-post-in-my-new-blog-system/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 00:36:09 +0000</pubDate>
		<dc:creator>pigeon</dc:creator>
		
		<category><![CDATA[general]]></category>

		<category><![CDATA[personal]]></category>

		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://pigeond.net/blog/2008/01/26/first-post-in-my-new-blog-system/</guid>
		<description><![CDATA[I&#8217;ve finally done it. I&#8217;ve replaced my old blog system.
Unfortunately for anyone who has subscribed to my rss feed, your reader will probably see all old posts appearing as new ones. I apologies if this causes any troubles.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally done it. I&#8217;ve replaced my old blog system.</p>
<p>Unfortunately for anyone who has subscribed to my rss feed, your reader will probably see all old posts appearing as new ones. I apologies if this causes any troubles.</p>
]]></content:encoded>
			<wfw:commentRss>http://pigeond.net/blog/2008/01/26/first-post-in-my-new-blog-system/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bonding - switching network interface without losing connections</title>
		<link>http://pigeond.net/blog/2007/02/12/bonding-switching-network-interface-without-losing-connections/</link>
		<comments>http://pigeond.net/blog/2007/02/12/bonding-switching-network-interface-without-losing-connections/#comments</comments>
		<pubDate>Mon, 12 Feb 2007 09:48:19 +0000</pubDate>
		<dc:creator>pigeon</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[bonding]]></category>

		<category><![CDATA[ethernet]]></category>

		<category><![CDATA[ifenslave]]></category>

		<category><![CDATA[ifplugd]]></category>

		<category><![CDATA[network]]></category>

		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://pigeond.net/blog/2007/02/12/bonding-switching-network-interface-without-losing-connections/</guid>
		<description><![CDATA[There&#8217;s wireless setup at my wife&#8217;s home in Taiwan. But whenever I&#8217;m upstairs in our room I prefer using the wired connection. While when I&#8217;m downstairs I have no choice as there&#8217;s no extra ethernet port.
Switching between the two networks is not a big deal. And with the help of ifplugd, the switching is automatic. [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s wireless setup at my wife&#8217;s home in Taiwan. But whenever I&#8217;m upstairs in our room I prefer using the wired connection. While when I&#8217;m downstairs I have no choice as there&#8217;s no extra ethernet port.</p>
<p>Switching between the two networks is not a big deal. And with the help of <a href="http://packages.debian.org/stable/net/ifplugd"><code>ifplugd</code></a>, the switching is automatic. But after all, they are two different interfaces. It would be good if I could switch between them without losing any existing connections. After a bit of googling around, I&#8217;ve found one solution: Ethernet channel bonding.</p>
<p>From the Linux source code <code>Documentation/networking/bonding.txt</code>: &#8220;The Linux bonding driver provides a method for aggregating multiple network interfaces into a single logical &#8220;bonded&#8221; interface&#8221;. In my case, I&#8217;m bonding the <code>eth0</code> (wired) and the <code>eth2</code> (wireless) together.</p>
<p>Under Debian, the bonding driver is built as a module <code>bonding</code>. I&#8217;ve also installed the <a href="http://packages.debian.org/cgi-bin/search_packages.pl?keywords=ifenslave"><code>ifenslave</code></a>. So I put the bonding driver into my <code>/etc/modules</code> so it&#8217;s loaded at system startup:</p>
<pre class="file_content">
bonding mode=1 miimon=500</pre>
<p>where <code>mode=1</code> sets the bonding mode to active-backup. The bonding driver also supports a few different load-balancing modes, which you might want to check out as well. <code>miimon=500</code> sets the link check interval in milliseconds.</p>
<p>There&#8217;s also a <code>primary</code> parameter which you could specify which slave interface will always be used if it is available (e.g. <code>primary=eth0</code>).</p>
<p>The bonding driver gives you a new network interface <code>bond0</code>. Now to setup <code>bond0</code>, <code>eth0</code> and <code>eth2</code> in <code>/etc/network/interfaces</code>:</p>
<pre class="file_content">
# the wired interface
iface eth0 inet manual
    hostname xxxxxxx

# the wireless interface
iface eth2 inet manual
    wireless-key s:xxxxxxxxxxxxx restricted
    wireless-essid xxxxxxxxxxxx
    wireless-mode managed

# the bonding interface, eth0 + eth2
iface bond0 inet dhcp
    pre-up ifconfig bond0 up
    pre-up ifenslave bond0 eth0 eth2
    pre-down ifenslave -d bond0 eth0 eth2</pre>
<p><code>bond0</code> is set to use DHCP, while <code>eth0</code> and <code>eth2</code> are not, as they will act as slave interfaces. <code>bond0</code> is the master. The 2nd pre-up command for <code>bond0</code> attaches both <code>eth0</code> and <code>eth2</code> as slaves to the bonding device. Note that it is possible to configure a bonding device via <code>sysfs</code>, which is also documented in <code>Documentation/network/bonding.txt</code>.</p>
<p>While <code>ifplugd</code> takes care of <code>eth0</code> going up and down, I also want to turn off the wireless completely when the wired network is plugged in. So I added my own script <code>/etc/ifplugd/action.d/bonding</code>:</p>
<pre class="file_content">
#!/bin/sh
set -e

if [ ! -f /proc/net/bonding/bond0 ]; then
    exit
fi

case &#8220;$1&#8243; in
eth0)
    case &#8220;$2&#8243; in
    up)
        /sbin/ifdown eth2
        /sbin/ifconfig eth2 down
        /sbin/iwconfig eth2 txpower off
        ;;

    down)
        /sbin/iwconfig eth2 txpower auto
        /sbin/ifup eth2
        /sbin/ifconfig eth2 up
        ;;
    esac

    # I need to do this sometimes, so I&#8217;ve put it in
    # or could someone comment on this?
    ifdown bond0
    ifup bond0

    ;;
esac</pre>
<p>This script will turn off the wireless radio for me when my <code>eth0</code> wired network is up.</p>
<p>I&#8217;m relying on <code>ifplugd</code> to bring up <code>bond0</code>, which will then bring up <code>eth0</code> and <code>eth2</code>. Hence in <code>/etc/network/interfaces</code> I did not set any of the interfaces to be auto. I also added <code>-l</code> to the arguments of <code>ifplugd</code> in <code>/etc/default/ifplugd</code>:</p>
<pre class="file_content">
ARGS="-q -f -u0 -d10 -w -I -l"</pre>
<p>so that it will run the &#8220;down&#8221; script on <code>ifplugd</code> startup if no cable is detected. That way my script will bring up my wireless <code>eth2</code> if <code>eth0</code> is not plugged, say at boot time.</p>
<p>With this setup, the bonding driver automatically switches to use <code>eth0</code> or <code>eth2</code>, whichever is brought up. In my setup, <code>eth0</code> and <code>eth2</code> won&#8217;t be up at the same time. If you use the <code>primary</code> parameter, the primary slave interface will always be used, even if the other slaves become available.</p>
<p><code>/proc/net/bonding/bond0</code> shows the status of the bonding interface. For example I&#8217;m now on the wireless network:</p>
<pre class="file_content">
Ethernet Channel Bonding Driver: v3.0.3 (March 23, 2006)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth2
MII Status: up
MII Polling Interval (ms): 500
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: down
Link Failure Count: 0
Permanent HW addr: 00:11:2f:9c:57:25

Slave Interface: eth2
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:11:2f:9c:57:25</pre>
<p>It&#8217;s pretty obvious that the currently active slave is my <code>eth2</code> wireless. I can run something like <code>watch -n 1 cat /proc/net/bonding/bond0</code>, and as I plug the ethernet cable back, the active slave will become <code>eth0</code>. You can also find out the currently active slave via <code>/sys/class/net/bond0/bonding/active_slave</code>.</p>
<p>For completeness, here is the output of <code>ifconfig</code>:</p>
<pre class="file_content">
bond0     Link encap:Ethernet  HWaddr 00:11:2F:9C:57:25
          inet addr:192.168.11.3  Bcast:192.168.11.255  Mask:255.255.255.0
          inet6 addr: fe80::211:2fff:fe9c:5725/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:329306 errors:0 dropped:0 overruns:0 frame:0
          TX packets:329010 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:732552585 (698.6 MiB)  TX bytes:204431117 (194.9 MiB)

eth0      Link encap:Ethernet  HWaddr 00:11:2F:9C:57:25
          UP BROADCAST SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:303936 errors:0 dropped:0 overruns:0 frame:0
          TX packets:304693 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:245381818 (234.0 MiB)  TX bytes:27905638 (26.6 MiB)
          Interrupt:5 Base address:0xd800

eth2      Link encap:Ethernet  HWaddr 00:11:2F:9C:57:25
          inet6 addr: fe80::211:2fff:fe9c:5725/64 Scope:Link
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:25370 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24317 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:487170767 (464.6 MiB)  TX bytes:176525479 (168.3 MiB)
          Interrupt:5 Base address:0xe000 Memory:ff9fe000-ff9fefff</pre>
<p>which shows <code>bond0</code> being the master, and <code>eth0</code> and <code>eth2</code> being slaves.</p>
<p>It almost makes plugging and unplugging the ethernet cable fun. I can just sit there and keep replugging the cable alllllll day&#8230; :)</p>
<p>I&#8217;ve been using this setup for at least a week now and has been working very well. Please let me know if there&#8217;s anything I&#8217;ve missed, or any even better way of setting this up.</p>
]]></content:encoded>
			<wfw:commentRss>http://pigeond.net/blog/2007/02/12/bonding-switching-network-interface-without-losing-connections/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Windows badness, and VirtualBox goodness</title>
		<link>http://pigeond.net/blog/2007/02/11/windows-badness-and-virtualbox-goodness/</link>
		<comments>http://pigeond.net/blog/2007/02/11/windows-badness-and-virtualbox-goodness/#comments</comments>
		<pubDate>Sun, 11 Feb 2007 13:31:29 +0000</pubDate>
		<dc:creator>pigeon</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[avermedia]]></category>

		<category><![CDATA[dvb-t]]></category>

		<category><![CDATA[usb]]></category>

		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://pigeond.net/blog/2007/02/11/windows-badness-and-virtualbox-goodness/</guid>
		<description><![CDATA[Just don&#8217;t ask why, really, but (under the influence of my wife) we bought a AverMedia Hybrid (DVB-T + Analogue) + FM Radio USB 2.0 box. It&#8217;s a nice little USB device, and it also has composite and s-video input, audio input, and a remote control.
And of course it works under that proprietary . Then [...]]]></description>
			<content:encoded><![CDATA[<p>Just don&#8217;t ask why, really, but (under the influence of my wife) we bought a AverMedia Hybrid (DVB-T + Analogue) + FM Radio USB 2.0 box. It&#8217;s a nice little USB device, and it also has composite and s-video input, audio input, and a remote control.</p>
<p>And of course it works under that proprietary . Then we realized it has rather serious issues with the composite-in being a bit slow (both slow frame rate and sometimes laggy).</p>
<p>As a Linuxer, naturally I then tried the device under Linux. Only just halfly expected, there is no driver for Linux yet. That&#8217;s no better way to spend your holidays overseas? I decided to spend a little on looking into the possibility to reverse engineer the windows driver.</p>
<p>Doing things on windows is always painful. Though I got one of the windows USB sniffer working, it wasn&#8217;t as convenient as doing things on Linux. So I went for using QEMU booting into windows and capture all the USB traffic. Unfortunately, windows (xp) crashes (classic BSOD style) while installing the device driver. I thought for a second, maybe it&#8217;s QEMU not emulating something that is needed?</p>
<p>Someone on #bochs pointed me to <a href="http://virtualbox.org/">VirtualBox</a>, so I gave it a go. Still out of luck though, windows xp crashes at the exact same spot. Damn.</p>
<p>On the bright side, I have discovered VirtualBox - yet another virtualizer for x86 hardware, and it&#8217;s pretty awesome:</p>
<ul>
<li>(On this Pentium M 1.6GHz laptop) VirtualBox is much much faster than QEMU (with kqemu) for, well, running windows xp.</li>
<li>It has a GUI frontend for setting up VMs. As much as I prefer text/command-line based apps, a GUI frontend does help new users to try things out a lot.</li>
</ul>
<p>Having said that, VirtualBox (currently anyway) is not entirely open source. It has <a href="http://www.virtualbox.org/wiki/Editions">two editions</a>. And the version I tried was the one with those closed-source features. On the other hand they did say &#8220;some of these features will eventually be made available with the open-source version as well&#8221;.</p>
<p>So, no, I didn&#8217;t go very far with the reverse engineering. It&#8217;s usually a painful and time-consuming process. I did have some of the USB traffic sniffed and logged under windows, but I haven&#8217;t done much with them yet.</p>
<p>I have some more photos and info of the device <a href="http://pigeond.net/~pigeon/a818/">here</a>, including photos of it pulled apart.</p>
<p><center><img src="http://pigeond.net/~pigeon/a818/.dsc03810.thumb.jpg" border="0" height="156" width="207" /></center></p>
]]></content:encoded>
			<wfw:commentRss>http://pigeond.net/blog/2007/02/11/windows-badness-and-virtualbox-goodness/feed/</wfw:commentRss>
		</item>
		<item>
		<title>&#8220;I know kung fu&#8230;&#8221;</title>
		<link>http://pigeond.net/blog/2007/02/11/i-know-kung-fu/</link>
		<comments>http://pigeond.net/blog/2007/02/11/i-know-kung-fu/#comments</comments>
		<pubDate>Sun, 11 Feb 2007 12:36:47 +0000</pubDate>
		<dc:creator>pigeon</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[bigpond]]></category>

		<category><![CDATA[cable]]></category>

		<category><![CDATA[debian]]></category>

		<category><![CDATA[ipkungfu]]></category>

		<category><![CDATA[netwinder]]></category>

		<category><![CDATA[network]]></category>

		<category><![CDATA[telstra]]></category>

		<guid isPermaLink="false">http://pigeond.net/blog/2007/02/11/i-know-kung-fu/</guid>
		<description><![CDATA[And so does everyone else. Simply apt-get install ipkungfu.
I&#8217;ve finally switched my gateway box from my 12 years old Pentium (I) 166MHz gateway box (still running Debian potato, kernel 2.2. This is Linux for you, when it works, it can work forever&#8230;), to my 5-6 years old Netwinder.
I was also very glad that the Netwinder [...]]]></description>
			<content:encoded><![CDATA[<p>And so does everyone else. Simply <em>apt-get install ipkungfu</em>.</p>
<p>I&#8217;ve finally switched my gateway box from my 12 years old Pentium (I) 166MHz gateway box (still running Debian potato, kernel 2.2. This is Linux for you, when it works, it can work forever&#8230;), to my 5-6 years old <a href="http://pigeond.net/photos/netwinder/">Netwinder</a>.</p>
<p>I was also very glad that the Netwinder is now (or still) officially supported by Debian. I had Debian potato installed on it for years. Upgrading it was painless.</p>
<p>My old gateway box was running such an old kernel, and the firewall was one of those copied-from-others script using ipchains. This time I decided to use a better way to manage my firewall rules. After a bit of research and trying things out, I&#8217;ve chosen <a href="http://packages.debian.org/testing/net/ipkungfu">ipkungfu</a>. Again, it was painless to setup.</p>
<p>The only not-so-good bit was, I did the machine switching-over only 1 day before I went away. So as it turned out, my net connection went down in about 2 days time. I always have some scripts checking if the net is up or not, and it would reset everything (bringing down/up the interface, renewing IP, relogging on, etc). But looks like that wasn&#8217;t helping either. So I thought it might be one of those cable-modem-needed-to-be-reset situation.</p>
<p>I asked my uncle to power cycle the cable modem for me. And just to be safe I asked him to do the same for the gateway box too. As expected my net connection went up again. And I was happy, for a while.</p>
<p>Who would have thought, it went down again. Suspiciously, it also only stayed up for about 2 days. My instinct told me it wasn&#8217;t a coincident. A few days later my uncle again power cycled the modem.</p>
<p>I got on and check the logs again and found that my firewall was blocking (and logging) a lot of IGMP packets from some mysterious 10.x.x.x (Telstra internal network instruments) IP. It&#8217;s strange though, I haven&#8217;t seen these logs when I was testing the net. So apparently just the bpalogin client heartbeat is not enough. Seems that without the IGMP packet response (or how-ever IGMP works), after a certain timeout period (2 days?) the other end terminates the net connection and stops leasing IP, even if the cable modem is on or even there are existing network connections. So of course, I&#8217;ve then updated my firewall rules.</p>
<p>Lesson learnt, testing the net for 1 day is not enough, cos it will go down in 2 days ;)</p>
<p>Once again, many thanks to my uncle for the trouble.</p>
]]></content:encoded>
			<wfw:commentRss>http://pigeond.net/blog/2007/02/11/i-know-kung-fu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FlightGear + Google Earth fun</title>
		<link>http://pigeond.net/blog/2006/12/12/flightgear-google-earth-fun/</link>
		<comments>http://pigeond.net/blog/2006/12/12/flightgear-google-earth-fun/#comments</comments>
		<pubDate>Mon, 11 Dec 2006 20:56:39 +0000</pubDate>
		<dc:creator>pigeon</dc:creator>
		
		<category><![CDATA[flightgear]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[blender]]></category>

		<category><![CDATA[fgmap]]></category>

		<category><![CDATA[google earth]]></category>

		<category><![CDATA[KML]]></category>

		<guid isPermaLink="false">http://pigeond.net/blog/2006/12/12/flightgear-google-earth-fun/</guid>
		<description><![CDATA[Last week I briefly played with Google Earth (GE) and KML, exploring the potential of using it to do something useful with FlightGear (FG).
The quickest hack I did was the GE version FGMap, which shows a moving map of all the online pilots on the FG MP servers. It is basically a very simple change [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I briefly played with <a href="http://earth.google.com/">Google Earth</a> (GE) and <a href="http://earth.google.com/kml/">KML</a>, exploring the potential of using it to do something useful with <a href="http://flightgear.org">FlightGear</a> (FG).</p>
<p>The quickest hack I did was the GE version <a href="http://pigeond.net/flightgear/fgmap.html">FGMap</a>, which shows a moving map of all the online pilots on the FG MP servers. It is basically a very simple change with the FGMap CGI that translate MP server info into XML, only this time it outputs KML. Very simple and straight forward, nothing fancy at all. Check it out by opening <a href="http://pigeond.net/flightgear/fgmap/fg_server_map.kml">this file</a> in GE (if no one is on the server, you&#8217;ll see nothing! Check <a href="http://pigeond.net/flightgear/fg_server_map.html">FGMap</a> too).</p>
<p><center><a href="http://pigeond.net/photos/flightgear/fgge/mpmap-ge-20061203.jpg"><img src="http://pigeond.net/images/blog/fgge/mpmap-ge-20061203.jpg" alt="FGMap Google Earth" title="FGMap Google Earth" border="1" height="266" width="320" /></a></center>[Updated] GE MP map using 3D models work-in-progress:</p>
<p><center><a href="http://pigeond.net/images/blog/fgge/mpmap-ge-02.png"><img src="http://pigeond.net/images/blog/fgge/mpmap-ge-02.thumb.png" alt="FGMap Google Earth" title="FGMap Google Earth" border="1" height="239" width="320" /></a></center>This weekend I started looking into GE&#8217;s 3D model support. Currently it supports two kinds of 3D model definition. KML embedded model using <em>MultiGeometry</em>, or a Collada .dae format. After some investigation I figured I have to use Collada to do what I want - having a 3D model of an aircraft and updating its position/orientation in GE. <em>MultiGeometry</em> (current version at least) is a fixed coordinates format, while with a Collada model you can place it in GE and then move it around, and also altering its heading/pitch/roll.</p>
<p>Quickly I found this <a href="http://colladablender.illusoft.com/">Collada exportor plugin for Blender</a>. As a test I loaded the C172P aircraft AC3D model from FG into Blender, followed by a few trail-and-error and I figured out what I need to export for GE: 1) Convert all faces to triangles, 2) Export <em>Triangles</em>, <em>Disable Physics</em>, <em>Use UV Image</em> and optionally <em>Use Relative Paths</em>.</p>
<p>According to the <a href="http://earth.google.com/kml/kml_21tutorial.html">KML tutorial</a> I have to pack up the .dae file together with the textures, along with a <em>textures.txt</em> for textures path mapping. However I discovered you could actually alter the path referenced in the .dae file to a local jpeg file, or even an HTTP URL.</p>
<p>So now I&#8217;ve got GE to show a 3D model of an aircraft from FG. Next is to get FG to talk to GE. There are many ways (network, serial port, etc) in FG you can export real time flight data. To make things easier for now, I&#8217;ve set it up to export simply <em>latitude, longitude, altitude, pitch, roll, heading</em> to a file (or actually a fifo), then I wrote a little program to read and output a KML file for GE to read. Then on the GE side, I have to create a KML with a <em>NetworkLink</em> to refresh the actual FG KML.</p>
<p>Now, problems. It seems even if I set the refresh time to be 0 seconds, and I can see GE refreshing the link continuously, on screen it still only updates the position/orientation about once per second. It could well be a GE internal limitation (or feature). The bottom line is, we need a sane way to feed data into GE.</p>
<p>Another thing is I can never get GE to &#8220;follow&#8221; the aircraft properly. It&#8217;s either not panning faster enough, or it will go kinda crazy and jitter a lot. Guess I&#8217;m not a GE/KML yet. I need to test it more and tidy up my codes/scripts/things a bit and I&#8217;ll put them up.</p>
<p>Nevertheless, it&#8217;s kind of fun to &#8220;fly FG inside GE&#8221;.</p>
<p><center>Screenshots of FlightGear running side by side with Google Earth, whereby FG sending data to GE and showing the 3D aircraft. Possibly more screenshots <a href="http://pigeond.net/photos/flightgear/fgge/">here</a><a href="http://pigeond.net/photos/flightgear/fgge/fgge-ksfo.jpg"><img src="http://pigeond.net/images/blog/fgge/fgge-ksfo.jpg" border="1" height="231" width="320" /></a></p>
<p>KSFO</p>
<p><a href="http://pigeond.net/photos/flightgear/fgge/fgge-hong-kong.jpg"><img src="http://pigeond.net/images/blog/fgge/fgge-hong-kong.jpg" border="1" height="258" width="320" /></a></p>
<p>Hong Kong with <a href="http://www.gearthblog.com/blog/archives/2006/12/hong_kong_in_3d_in_g.html">Computamaps Hong Kong 3D models</a></p>
<p></center></p>
]]></content:encoded>
			<wfw:commentRss>http://pigeond.net/blog/2006/12/12/flightgear-google-earth-fun/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Got new software?</title>
		<link>http://pigeond.net/blog/2006/09/19/got-new-software/</link>
		<comments>http://pigeond.net/blog/2006/09/19/got-new-software/#comments</comments>
		<pubDate>Mon, 18 Sep 2006 21:28:09 +0000</pubDate>
		<dc:creator>pigeon</dc:creator>
		
		<category><![CDATA[software]]></category>

		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://pigeond.net/blog/2006/09/19/got-new-software/</guid>
		<description><![CDATA[As free and open source software getting more popular, more and more new ones are turning up. People are now more likely to try new things. But of course new things don&#8217;t always work as expected. Bugs, crashes, memory leaks, and these often stop people straight away from keep trying or using it again.
Well, the [...]]]></description>
			<content:encoded><![CDATA[<p>As free and open source software getting more popular, more and more new ones are turning up. People are now more likely to try new things. But of course new things don&#8217;t always work as expected. Bugs, crashes, memory leaks, and these often stop people straight away from keep trying or using it again.</p>
<p>Well, the only thing I want to say is, I wonder why people don&#8217;t just stop using m$ windows when they first get the <a href="http://en.wikipedia.org/wiki/BSOD">BSOD</a> :)</p>
]]></content:encoded>
			<wfw:commentRss>http://pigeond.net/blog/2006/09/19/got-new-software/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Fun with Wine hacking</title>
		<link>http://pigeond.net/blog/2006/08/20/fun-with-wine-hacking/</link>
		<comments>http://pigeond.net/blog/2006/08/20/fun-with-wine-hacking/#comments</comments>
		<pubDate>Sun, 20 Aug 2006 05:46:58 +0000</pubDate>
		<dc:creator>pigeon</dc:creator>
		
		<category><![CDATA[coding]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[opengl]]></category>

		<category><![CDATA[shin sangoku musou 3]]></category>

		<category><![CDATA[wine]]></category>

		<guid isPermaLink="false">http://pigeond.net/blog/2006/08/20/fun-with-wine-hacking/</guid>
		<description><![CDATA[So I got this PC version of the game Shin Sangoku Musou 3 (真三國無雙). And of course it for some proprietary operating system (we do not speak of its names :P). As a Linux person the first thing you try is to try running it under Wine / WineX / Cedega.
A little bit of surprise, [...]]]></description>
			<content:encoded><![CDATA[<p>So I got this PC version of the game Shin Sangoku Musou 3 (真三國無雙). And of course it for some proprietary operating system (we do not speak of its names :P). As a Linux person the first thing you try is to try running it under <a href="http://winehq.org/">Wine</a> / <a href="http://transgaming.com/">WineX / Cedega</a>.</p>
<p>A little bit of surprise, it ran with Wine latest development version, at least it&#8217;s gone thru all the splash screen, characters selection, until it gets to the actual game, crashed.</p>
<p>After turning on some debugging and tracing, followed by consulting on #winehq, I&#8217;ve learnt that this game hits one of the famous Wine and DirectX issue, multi-threaded Direct3D.</p>
<p>Still I&#8217;m a bit adventurous as usual, and did a bit of code reading and hacking in Wine, trying a few different quick-and-dirty approaches to get threads to use the same GLXContext, not that I&#8217;m an OpenGL guru.</p>
<p>After a few tries, I gave up. However I still kind of wanna be able to play this game under Linux. So I rethink the problem from a different approach, and did a even more dirty hack, so that only the main thread can do any GL calls. Any other threads will simply returns before trying. Yes, VERY UGLY indeed. So ugly that let&#8217;s not even talk about it anymore ;)</p>
<p>And guess what, that does the trick. It gets into the actual game. So apparently it&#8217;s creating a new thread only for the pre-game loading screen. So now instead of the loading animation screen, I simply get a black blank screen, and the game continues after that.</p>
<p>And just for fun, I&#8217;ve even created a character with the top Taiwanese model&#8217;s name :P</p>
<p>More screenshots <a href="http://pigeond.net/photos/screenshots/musou-wine/">here</a>.</p>
<p><center><a href="http://pigeond.net/photos/screenshots/musou-wine/"><img src="http://pigeond.net/photos/screenshots/musou-wine/musou-wine-12.thumb.png" border="1" height="120" width="160" /></a>   <a href="http://pigeond.net/photos/screenshots/musou-wine/"><img src="http://pigeond.net/photos/screenshots/musou-wine/musou-wine-08.thumb.png" border="1" height="120" width="160" /></a></center></p>
]]></content:encoded>
			<wfw:commentRss>http://pigeond.net/blog/2006/08/20/fun-with-wine-hacking/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FGLive 0.1 LinuxTag edition</title>
		<link>http://pigeond.net/blog/2006/05/15/fglive-01-linuxtag-edition/</link>
		<comments>http://pigeond.net/blog/2006/05/15/fglive-01-linuxtag-edition/#comments</comments>
		<pubDate>Sun, 14 May 2006 21:30:14 +0000</pubDate>
		<dc:creator>pigeon</dc:creator>
		
		<category><![CDATA[flightgear]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[fglive]]></category>

		<category><![CDATA[live]]></category>

		<guid isPermaLink="false">http://pigeond.net/blog/2006/05/15/fglive-01-linuxtag-edition/</guid>
		<description><![CDATA[The first, sorta official release of FGLive is here. FGLive - FlightGear Live is a bootable live system on CD (or any bootable medium) that boots into Linux, with FlightGear setup, ready to run. FlightGear is an open-source, multi-platform, cooperative flight simulator development project.
To find out more about FGLive, see here, and make sure you [...]]]></description>
			<content:encoded><![CDATA[<p>The first, sorta official release of <a href="http://pigeond.net/flightgear/fglive.html">FGLive</a> is here. FGLive - FlightGear Live is a bootable live system on CD (or any bootable medium) that boots into Linux, with <a href="http://www.flightgear.org/">FlightGear</a> setup, ready to run. FlightGear is an open-source, multi-platform, cooperative flight simulator development project.</p>
<p>To find out more about FGLive, see <a href="http://pigeond.net/flightgear/fglive.html">here</a>, and make sure you read the <a href="http://pigeond.net/flightgear/fglive/0.1-delta/README.fglive.html">README</a> as well.</p>
<p>See screenshots and videos of FlightGear <a href="http://pigeond.net/photos/flightgear/">here</a>.</p>
<p><center></p>
<table border="0" cellpadding="5" cellspacing="4">
<tr>
<td><img src="http://pigeond.net/flightgear/fglive/0.1-delta/fglive-0.1-linuxtag-01.thumb.jpg" border="0" height="120" width="160" /></td>
<td><img src="http://pigeond.net/flightgear/fglive/0.1-delta/fglive-0.1-linuxtag-02.thumb.jpg" border="0" height="120" width="160" /></td>
</tr>
</table>
<p></center></p>
]]></content:encoded>
			<wfw:commentRss>http://pigeond.net/blog/2006/05/15/fglive-01-linuxtag-edition/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google Map v1 vs v2</title>
		<link>http://pigeond.net/blog/2006/05/02/google-map-v1-vs-v2/</link>
		<comments>http://pigeond.net/blog/2006/05/02/google-map-v1-vs-v2/#comments</comments>
		<pubDate>Tue, 02 May 2006 09:09:10 +0000</pubDate>
		<dc:creator>pigeon</dc:creator>
		
		<category><![CDATA[coding]]></category>

		<category><![CDATA[flightgear]]></category>

		<category><![CDATA[personal]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[api]]></category>

		<category><![CDATA[fgmap]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[map]]></category>

		<category><![CDATA[taipei 101]]></category>

		<guid isPermaLink="false">http://pigeond.net/blog/2006/05/02/google-map-v1-vs-v2/</guid>
		<description><![CDATA[So I was porting FGMap to GMap API v2 from v1.
At the same time I did some &#8220;sightseeing&#8221; around, and checking out one of my favorite buildings, currently the tallest building in the world, the Taipei 101. Then I noticed the difference (pretty obvious) between the satellite images from GMap v1 and v2. The one [...]]]></description>
			<content:encoded><![CDATA[<p>So I was porting <a href="http://pigeond.net/flightgear/fg_server_map.html">FGMap</a> to GMap API v2 from v1.</p>
<p>At the same time I did some &#8220;sightseeing&#8221; around, and checking out one of my favorite buildings, currently the tallest building in the world, the <a href="http://www.emporis.com/en/wm/bu/?id=100765">Taipei 101</a>. Then I noticed the difference (pretty obvious) between the satellite images from GMap v1 and v2. The one from v1 is in fact newer than v2. The one in v2 is still being built!</p>
<p><center></p>
<table align="center" border="0" cellpadding="10" cellspacing="0">
<tr>
<td align="center"><a href="http://pigeond.net/gmap-v1.html?ll=121.56384944915771,25.03537195684597&amp;z=0&amp;t=s"><img src="http://pigeond.net/images/diary/taipei101-gmap-v1-small.jpg" alt="GMap v1" title="GMap v1" border="1" /></a>GMap v1</td>
<td align="center"><a href="http://pigeond.net/gmap-v2.html?ll=121.56384944915771,25.03537195684597&amp;z=0&amp;t=s"><img src="http://pigeond.net/images/diary/taipei101-gmap-v2-small.jpg" alt="GMap v2" title="GMap v2" border="1" /></a>GMap v2</td>
</tr>
</table>
<p></center></p>
]]></content:encoded>
			<wfw:commentRss>http://pigeond.net/blog/2006/05/02/google-map-v1-vs-v2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FlightGear Multiplay Air Traffic with Google Map</title>
		<link>http://pigeond.net/blog/2005/09/11/flightgear-multiplay-air-traffic-with-google-map/</link>
		<comments>http://pigeond.net/blog/2005/09/11/flightgear-multiplay-air-traffic-with-google-map/#comments</comments>
		<pubDate>Sun, 11 Sep 2005 13:41:58 +0000</pubDate>
		<dc:creator>pigeon</dc:creator>
		
		<category><![CDATA[coding]]></category>

		<category><![CDATA[flightgear]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[api]]></category>

		<category><![CDATA[fgmap]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[map]]></category>

		<category><![CDATA[mpserver]]></category>

		<guid isPermaLink="false">http://pigeond.net/blog/2005/09/11/flightgear-multiplay-air-traffic-with-google-map/</guid>
		<description><![CDATA[After seeing lots useful and cool stuff people have been doing using the Google Map API, I was inspired to write something perhaps to plot buildings/models I have been/will be doing for FlightGear. While trying the API out a bit, an idea striked my head. What about a real time map for the FlightGear multiplay [...]]]></description>
			<content:encoded><![CDATA[<p>After seeing lots useful and cool stuff people have been doing using the <a href="http://maps.google.com/apis/maps/">Google Map API</a>, I was inspired to write something perhaps to plot buildings/models I have been/will be doing for <a href="http://www.flightgear.org/">FlightGear</a>. While trying the API out a bit, an idea striked my head. What about a real time map for the FlightGear multiplay server air traffic map?</p>
<p>And so I started off doing it. It&#8217;s heaps of fun, not to mention finding out all those bugs with IE. M$ is very kind, they always do things that make people laugh. This always gives me a chance to revise a lot with Javascript.</p>
<p>I also ended up writing my own routines for map overlays displaying plane markers and info, instead of using the GMAPI&#8217;s GMarker. A bit more flexible, and it does exactly what I want.</p>
<p>There is time when Javascript is useful, and there is time where it&#8217;s just overkill. IMHO, Javascript is useful for writing &#8220;web app&#8221;. Same as using Flash, or Java applet. But btw this does NOT mean every website should be bloody web app!!</p>
<p>And there you go, the <a href="http://pigeond.net/flightgear/fg_server_map.html">FlightGear server online map</a>. A couple of FlightGearers have been using it as a flying map and as a simple ATC radar. If it&#8217;s the right time you&#8217;ll see us flying!</p>
<p>I&#8217;ve got plans to add more features, like airports/navids lookup. And of course, improving the usability and UI is always on the plate. Comments are also welcomed&#8230;</p>
<p>Also thanks to everyone who has helped me with testing and giving suggestions to the page. (ampere, AJ, thorben, vivian, gorilla, Surge, johnh51, MasseR, etc)</p>
<p align="center"> <a href="http://pigeond.net/flightgear/fg_server_map.html"><img src="http://pigeond.net/images/diary/fggm.png" alt="FlightGear Google Map" title="FlightGear Google Map" border="0" height="346" width="493" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://pigeond.net/blog/2005/09/11/flightgear-multiplay-air-traffic-with-google-map/feed/</wfw:commentRss>
		</item>
		<item>
		<title>OpenH323</title>
		<link>http://pigeond.net/blog/2002/07/02/openh323/</link>
		<comments>http://pigeond.net/blog/2002/07/02/openh323/#comments</comments>
		<pubDate>Tue, 02 Jul 2002 12:31:44 +0000</pubDate>
		<dc:creator>pigeon</dc:creator>
		
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://pigeond.net/blog/2002/07/02/openh323/</guid>
		<description><![CDATA[OpenH323 is cool.
With ip_masq_h323, I got OhPhone to talk to a NetMeeting client, via my firewall/gateway box.
ip_masq_netmeeting works well with the actual NetMeeting client under my firewall, but it doesn&#8217;t like OhPhone.
So I&#8217;m sticking to OhPhone with ip_masq_h323 now, with thanks to all these opensource effort. :)
So I was testing all these with Catty in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.openh323.org/">OpenH323</a> is cool.</p>
<p>With <a href="http://www.coritel.it/coritel/ip/sofia/nat/nat2/nat2.htm">ip_masq_h323</a>, I got OhPhone to talk to a NetMeeting client, via my firewall/gateway box.</p>
<p><a href="http://netmeetingmasq.sourceforge.net/">ip_masq_netmeeting</a> works well with the actual NetMeeting client under my firewall, but it doesn&#8217;t like OhPhone.</p>
<p>So I&#8217;m sticking to OhPhone with ip_masq_h323 now, with thanks to all these opensource effort. :)</p>
<p>So I was testing all these with Catty in Taiwan last couple of nights, thanks too :)</p>
]]></content:encoded>
			<wfw:commentRss>http://pigeond.net/blog/2002/07/02/openh323/feed/</wfw:commentRss>
		</item>
		<item>
		<title>vim 6 is cool!</title>
		<link>http://pigeond.net/blog/2002/07/01/vim-6-is-cool/</link>
		<comments>http://pigeond.net/blog/2002/07/01/vim-6-is-cool/#comments</comments>
		<pubDate>Mon, 01 Jul 2002 06:46:32 +0000</pubDate>
		<dc:creator>pigeon</dc:creator>
		
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://pigeond.net/blog/2002/07/01/vim-6-is-cool/</guid>
		<description><![CDATA[At last, I&#8217;ve offically switched to vim 6 from vim 5. It&#8217;s cool!
Spent some time on vim.sf.net trying a lot of useful scripts. Here are some which are really helpful and I&#8217;m actually using them.

gdbvim
a.vim
bufexplorer
taglist
showmarks

]]></description>
			<content:encoded><![CDATA[<p>At last, I&#8217;ve offically switched to vim 6 from vim 5. It&#8217;s cool!</p>
<p>Spent some time on <a href="http://vim.sf.net/">vim.sf.net</a> trying a lot of useful scripts. Here are some which are really helpful and I&#8217;m actually using them.</p>
<ul>
<li><a href="http://vim.sourceforge.net/scripts/script.php?script_id=84">gdbvim</a></li>
<li><a href="http://vim.sourceforge.net/scripts/script.php?script_id=31">a.vim</a></li>
<li><a href="http://vim.sourceforge.net/scripts/script.php?script_id=42">bufexplorer</a></li>
<li><a href="http://vim.sourceforge.net/scripts/script.php?script_id=273">taglist</a></li>
<li><a href="http://vim.sourceforge.net/scripts/script.php?script_id=152">showmarks</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://pigeond.net/blog/2002/07/01/vim-6-is-cool/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
