In about 4 hours time I’ll be on my way to LCA2008. This is also my first trip to Melbourne. All good!
Also just wondering if there’s any other FlightGear-ers around LCA this year? (apart from those who I already know). We could have a little chat, or maybe some hacking/debugging/troubleshooting sessions? Or even some multiplay fun?
Every now and then people e-mail me or ask me on IRC where my FlightGear stuff is. So during this holiday I’ve spared a few moments and put together a dedicated page about all the stuff I’ve done with FlightGear.
Hot day, cool people; nice LCA bag, bad wireless. My first day at LCA 2007.
It was pretty exciting to meet for the first time with a few people who I have known online for quite a while. George (or Gorilla) from the FlightGear gang, Leeds I know from #handhelds.org, and Endy from the ScummVM team showing off the latest version that has AGI support (for some of the old Sierra games like Space Quest I). Looking forward to his lightning talk at the Gaming Miniconf tomorrow.
Apparently Jeff ended up demonstrating the Wii in the Gnome miniconf (which I have missed). I reckon he should have demo using the Wiimote on Linux, which is pretty easy to setup. Or maybe that should be in the Gaming miniconf… :)
On the other hand, I was having weird trouble with the wireless on my laptop. It’s a Intel Centrino PRO/Wireless 2200BG, and I was using the ipw2200 module with the corresponding firmware. For some reasons it wasn’t able to get an IP from DHCP most of the time. I managed to get an IP once, but it dropped out pretty much straight away. I tried setting the same IP I got statically but it was only partially working (DNS working, for example, but nothing else worked, which was expected).
After consulting Jamie and John a bit they reckoned my wireless somehow kept dropping packets. And to be honest I haven’t actually use the wireless much on this laptop. I have no idea whether it’s a hardware/radio/firmware/driver problem or what. I ended up using my CF wifi card and it worked beautifully.
Anyone in the conference is welcomed to fix it for me :)
Took fewer photos than I wanted to today, but anyway they can be found here. I’ll try to put up new photos there for each LCA day.
So, we bought a Wii. Amazingly my wife managed to walk-in and bought apparently the second last Wii in that shop, on the first day of the release in Australia. We also got an extra Wiimote, Zelda the game, and two Wiimote grip protectors.
With thanks to WMD, you could use the Wiimote under Linux fairly easily. For those who don’t know Wiimote talks to the Wii console via bluetooth. So it works with any computer with bluetooth as well.
People have been using the Wiimote on the computers in all sorts of different ways. As a guitar (Wiitar), as a drum machine, for games like Counter Strike, a virtual light sabre, etc. As for me, using the Wiimote with a flightsim, like FlightGear, would naturally be the first thing I wanna try.
The Wiimote has three accelerometers for the three axes. I’ve modified slightly the WMD script to send the X and Z force to the uinput device as the absolute coordinates. jscal then takes care of the calibration of the two axes. Then I changed the commandMap in the script to send BTN_0 to BTN_9 from all the buttons on the Wiimote.
On the FlightGear side all I need is to write a joystick definition XML for the Wiimote. I’ve also made the ‘B’ button to be the modifier. For example I have arrow Up and Down for throttle, Left and Right for the rudder. Then if I hold down ‘B’, Up Down Left Right become panning the viewport. ‘1′ and ‘2′ for changing views, ‘+’ and ‘-’ for zooming in and out, ‘A’ for brakes and gears. All set. Now I can fasten my seatbelt^H^H^H^H^H^H^H^Hwrist strap, sit back and ready for take off.
Updated 5th Jan 2007: Here is a patch against WMDSVN repository. Like I said it’s pretty hacky at the moment. And you definitely have to use jscal to calibrate it before it will behave sanely. Also you probably want to make changes to the commandMap in wmd/Config.py to map more buttons.
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 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 this file in GE (if no one is on the server, you’ll see nothing! Check FGMap too).
[Updated] GE MP map using 3D models work-in-progress:
This weekend I started looking into GE’s 3D model support. Currently it supports two kinds of 3D model definition. KML embedded model using MultiGeometry, 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. MultiGeometry (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.
Quickly I found this Collada exportor plugin for Blender. 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 Triangles, Disable Physics, Use UV Image and optionally Use Relative Paths.
According to the KML tutorial I have to pack up the .dae file together with the textures, along with a textures.txt 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.
So now I’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’ve set it up to export simply latitude, longitude, altitude, pitch, roll, heading 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 NetworkLink to refresh the actual FG KML.
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.
Another thing is I can never get GE to “follow” the aircraft properly. It’s either not panning faster enough, or it will go kinda crazy and jitter a lot. Guess I’m not a GE/KML yet. I need to test it more and tidy up my codes/scripts/things a bit and I’ll put them up.
Nevertheless, it’s kind of fun to “fly FG inside GE”.
Screenshots of FlightGear running side by side with Google Earth, whereby FG sending data to GE and showing the 3D aircraft. Possibly more screenshots here
FGMap now does metar, and more… 2006/12/03 20:30:48
Recently updated FGMap with various bug fixes, as well as adding a new tabbed info box for airports. That way I could easily add more different information, such as metar information. I have to admit I first got the idea of adding metar information for FGMap when I first saw it on flyagogo.net. They have excellent real world aviation charts, data and an awesome flight planning tools. I’m simply using the metar in Debian at the moment. Hopefully it will match FlightGear’s weather when using with its real weather fetch.
Also I’ve added external links in the airport info box to World Aero Data and AirNav (for U.S. airports).