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
- MesiCopter, 1999, research project, external electronics, 1.5 cm rotor diameter
- Smartflyer, 2003-2009, Complete family of really small quadrocopters, from 15g upwards
- MicroX4, 2006, 16 cm, 40g, CFK props, rotors 8 cm
- YAUP, 2007, (Yet another UFO project), X-Twin props
- Nanocopter X-Twin, integrated on one PCB
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!):
| Offset | Length | Data Type | Contents |
|---|---|---|---|
| 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. |
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 kmlUse 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
Rankestrasse 17
38102 Braunschweig
jdi@l4x.org
+49 - 531 - 3884123
+49 - 179 - 4570689
Address history
| 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
#!/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
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=128This 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
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
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
posted at: 23:06 | path: /home/jdittmer/web/l4x.org/entries/unix | permanent link to this entry
Wed, 07 Mar 2007
FrontRow
posted at: 22:42 | path: /home/jdittmer/web/l4x.org/entries/macos | permanent link to this entry
