Tue, 02 Feb 2010

Debian: List installed packages by size with dpkg

$ dpkg-query -W --showformat='${Installed-Size;10}\t${Package}\n' \
   | sort -k1,1n | tail -n 20 

posted at: 11:26 | path: /home/jdittmer/web/l4x.org/entries/unix | permanent link to this entry

Fri, 08 Jan 2010

Some really small quadrocopters

It's always fascinating how far you can minaturize nowadays. A selection of really small quadrocopters (UAV, VTOL, Mikrocopter):

posted at: 12:14 | path: /home/jdittmer/web/l4x.org/entries/qc | permanent link to this entry

Tue, 08 Sep 2009

Converting the Fugawi binary trk format for GPS waypoints

There does not seem to be a public specification of the binary trk format for GPS waypoints used by Fugawi navigation products. So I sat down and compared the exported csv waypoints with the binary format. Following is the specification. All fields are little endian encoded.

The file starts with a 36 byte header of which little is known. The first 6 bytes contain the string FUGTRK, bytes 7 and 8 are always 0xffff. Bytes 12 and 13 contain the number of records in the file.

After the header are the waypoint records, 48 bytes each. Each records contains the following fields (again little endian!):

OffsetLengthData TypeContents
0 4 ? ?
4 4 32-bit float Height
8 4 32-bit float Distance to last waypoint
12 4 ? ?
16 4 32-bit float Heading
20 4 ? ?
24 8 64-bit double Latitude WGS84
32 8 64-bit double Longitude WGS84
40 8 64-bit double Days since 1899-30-12 00:00:00 UTC, fractional part is the time in seconds of the day divided by 86400.
In my test files all the missing fields are filled with zeros. If anyone has a file without zeros at those positions I would be highly interested in adding this information.

Here is an example application which can convert trks to gpx or kml format

gcc fugawi.c -o fugawi
# output debug info
./fugawi test.trk
# output gpx
./fugawi test.trk gpx
# output kml
./fugawi test.trk kml
Use at your own rist

posted at: 13:12 | path: /home/jdittmer/web/l4x.org/entries/gps | permanent link to this entry

Tue, 25 Nov 2008

Imprint, places I lived

Jan Dittmer
Rankestrasse 17
38102 Braunschweig
jdi@l4x.org
+49 - 531 - 3884123
+49 - 179 - 4570689
Address history

  • Current address 2006-07-14 -

    Rankestrasse 17, 38102 Braunschweig
  • 2005-10-01 - 2006-07-14

    Gliesmaroder Strasse 75, 38106 Braunschweig
  • 2004-09-15 - 2005-09-30

    Eichholz 19, 20459 Hamburg
  • 2000-10-01 - 2004-09-15

    Schuettstrasse 3, 21073 Hamburg
  • 1984-10-01 - 2000-09-30

    Carl-Goerdeler-Ring 9, 38518 Gifhorn
  • 1980-01-04 - 1984-09-30

    Gartenweg 1a, 3170 Gifhorn
Click on the addresses to reveal their location.

posted at: 21:32 | path: /home/jdittmer/web/l4x.org/entries | permanent link to this entry

How to back date a subversion checkin

While setting up a new subversion (svn) repository for my old blog entries, I wanted to keep the original dates (mtime of the file) in the checkin commit (for use with the pyblosxom svn plugin). After a quick online research I came up with the following script:
#!/bin/sh
# svn-ci-date.sh
# Jan Dittmer <jdi@l4x.org> 2008
# Use at your own risk
#

D=`ls -l "$1" | cut -f6-7 -d' ' | sed 's/ /T/'`
D="${D}:00.000000Z"
echo "Date: $D"
if ! svn add "$1"; then exit 1; fi
if ! svn ci -m "Date $D" "$1"; then exit 2; fi
R=`svn info "$1" | grep "^Revision: " | cut -f2 -d' '`
echo "Revision: $R"
if [ "$R" == "" ]; then exit 3; fi
if ! svn propset --revprop svn:date -r$R "$D"; then exit 4; fi
Please note, that subversion does not do any sanity checking on the svn:date property. If svn log reports a 'Bogus Date' afterwards, make sure your dates have the format 'YYYY-MM-DDThh:mm:ss.uuuuuuZ'.

posted at: 20:49 | path: /home/jdittmer/web/l4x.org/entries/unix | permanent link to this entry

Sun, 06 Jul 2008

Controlling the fan speed of a Lenovo X300 under Linux

The Lenovo X300 has a really annoying fan running with high speeds already at low (40C) CPU temperatures. The lm-sensors package comes with a fancontrol daemon which does user space fan regulation. Just put this in your /etc/fancontrol
INTERVAL=10
FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp1_input
FCFANS= hwmon0/device/pwm1=hwmon0/device/fan1_input
MINTEMP=hwmon0/device/pwm1=60
MAXTEMP=hwmon0/device/pwm1=70
MINSTART=hwmon0/device/pwm1=32
MINSTOP=hwmon0/device/pwm1=32
MINPWM=hwmon0/device/pwm1=32
MAXPWM=hwmon0/device/pwm1=128
This will give you 1800 rpm for CPU temperatures > 50C and 5500 rpm (the next level) for temperatures higher 70C. As the fan is barely noticeable at 1800 and 70C is only reached by running two processes with 100% CPU load for more then 5 minutes (even at 30C ambient temperature) this will give you a nearly totally silent laptop :-). A pwm value of 255 sounds like a jet starting (8000 rpm)...

posted at: 20:04 | path: /home/jdittmer/web/l4x.org/entries/unix | permanent link to this entry

Thu, 19 Jun 2008

How to fix "A disk read error occurred" when using a Windows XP image in Virtualbox

If you encounter the error "A disk read error occured" when trying
to boot Windows XP off a raw disk image using Virtualbox (either directly by using
the write-through support or indirectly by booting a 1:1 copy) most
probably the BIOS of the original system reported an odd drive geometry
(C/H/S - Cylinders/Heads/Sectors).

To fix this boot the _physical_ system,
go to the grub command line, type 'c' to invoke the command prompt and then execute the command 'geometry (hd0)'. Write down the cylinders, heads and
sectors values reported. Back in your host system, open the .vmdk file using a normal text editor, scroll down to the end of the file and adjust the following lines

ddb.geometry.biosCylinders="1023"
ddb.geometry.biosHeads="240"
ddb.geometry.biosSectors="63"
.
(1023/240/63 are the values reported by the Lenovo X300 Notebook BIOS).

Now try to boot Windows in the virtualized environment. In my case it
worked right on the first try. There may also be a Windows tool to get
the original drive geometry.

The short explanation is, that the boot loader from Windows seems to have
hard coded values for the drive geometry <

posted at: 20:35 | path: /home/jdittmer/web/l4x.org/entries/unix | permanent link to this entry

Wed, 09 Apr 2008

How to truncate a file the UNIX way

Astonishingly a search for 'truncate unix utility' doesn't turn up anything useful
apart from hundreds of references to the ftruncate man page.
This is how I did it:

dd of=destfile bs=1 seek=newsize count=1 </dev/null

where newsize can be 1k, 400G, whatever and destfile is obviously the
destination filename.

posted at: 20:35 | path: /home/jdittmer/web/l4x.org/entries/unix | permanent link to this entry

Mon, 03 Sep 2007

Opensync_and_Nokia_E60

Working config file for the syncml-obex-client plugin. 00:11:22:33:44:55 14 0 PC Suite 1 1 2 1 0 10000 0 Contacts Calendar Notes See also:

posted at: 23:06 | path: /home/jdittmer/web/l4x.org/entries/unix | permanent link to this entry

Wed, 07 Mar 2007

FrontRow

Helpful MacOS Trivia [http://www.macosxhints.com/article.php?story=20070125092851828] As joshewah pointed out, if you have the proper codecs installed in quicktime, and have the video files under movies, the files will be seen and playable under front row without having to create any reference files. Now with this in mind, if you have your video files elsewhere, on an external drive, or network mounts(!!), simply create aliases to any network mounted video folders and put the aliases into the movies folder. As long as the drives or shares are mounted, the aliases (treated by front row gui as folders) will show all the video files on the remote drives! Enjoy!

posted at: 22:42 | path: /home/jdittmer/web/l4x.org/entries/macos | permanent link to this entry