Paul Wise poked me this morning about uploading fatrace ( file access trace , see the original announcement for details) to Debian, thanks for the reminder!
So I filed an Intent To Package, and will upload it in a few days, unless some discussion evolves.
I also took the opportunity to do some modernization: The power-usage-report script now uses the current PowerTop 2.x instead of the old 1.13, uses Python 3 now, and includes the process device activity in the report. I released this as 0.5. The actual fatrace binary didn t change its behaviour, it just got some code optimizations; thanks to Yann Droneaud for those.
Anyone that has a fondness for good ol RSpec knows that there s a fair
number of matchers and predicates and whatnot involved. Life isn t helped
by the recent (as of 2.11) decision to switch to using expect everywhere
instead of should (apparently should will be going away entirely at some
point in the future).
There is a good looking RSpec cheatsheet out on the net, but it dates from
2006, and things have changed since then. We re using RSpec at work a lot
at the moment, though, so our tech writer kindly updated it for the
new-style syntax, gave it a nice blue tint, and put it out there for the
world at large to use. Here is our updated RSpec
cheatsheet
for anyone who is interested.
I can tell you for certain that a double-sided, laminated version of this
sucker looks very nice, and is a handy addition to the desk-of-many-things.
The differences between how one fuels one's car are quite pronounced,
between California and Australia.
Firstly, if you're paying with plastic, it's a given that you can pay at the
pump. I could count on my hands the number of times I've had to walk into a
gas station to pay for gas in the US. Having a small child, I was not
looking forward to having to either leave her in the car so I could pay for
my petrol, or having to deal with all of the rigmarole of getting her out of
her car seat, just so she can accompany me inside the petrol station to make
a brief transaction and then have to get her back into her car seat again.
Not to mention how it drags out the whole process. Yesterday I had to wait
for a pump while everyone leaves their car, queues inside to pay a single
cashier, and then returns to their car and drives away. It'd be an
interesting Productivity Commission
report to see how much time is lost, just so people can be tempted by the
high-margin items inside.
Then there's pumping the petrol. California, being all hippy, requires all
the fuel nozzles to have these fandangled "vapour recovery" things,
which basically fit over the part of the pump that goes inside the fuel tank
and does some sort of, well, vapour recovery. The upside, you're not
sniffing fumes while you're pumping your petrol.
The other fabulous thing about Californian fuel pumps is you can lock the
handle down, so you don't have to stand there like a shag on a rock
squeezing the handle while a $100 trickles into your car. You can get back
in your car and listen to the radio. Or clean your windscreen. Or entertain
your kid. I'd love to know why Australian pumps don't lock on any more. I
have memories from my early childhood of them locking on.
So yeah, I think Australians lose out quite badly when it comes to the
petrol station experience.
I was pleased to discover that the Woolworths branded Caltex petrol stations
seem to have some sort of pay at the pump infrastructure, it just requires
you to have their specific credit card or something. I need to do more
research, because if I can pay at the pump, I will.
| Publisher: | Greywolf |
| Copyright: | 2012 |
| ISBN: | 1-55597-535-6 |
| Format: | Hardcover |
| Pages: | 205 |
Keith and I have discovered a change in the behavior of the protection
circuits integrated in the LiPo batteries we sell for use with
Altus Metrum products that poses a risk for
our customers. This post is meant to document what we now know, communicate
changes we're planning as a result, and explain what we think flyers of our
existing electronics and batteries may want to do to maximize their chances
of successful flights.
Background
Choosing batteries and designing pyro circuits for high power rocketry avionics
involves a variety of trade-offs. Reliability is the highest concern, both
because nobody wants to lose an airframe due to a failed pyro event, and
also because airframes recovering anomalously have safety implications. But
we also care about other factors including cost and weight, and usually
want to minimize the complexity of both the electronics and the overall
installation.
The objective of a pyro circuit is to dump enough energy rapidly into an
electric match to cause it to catch fire. We need batteries both to power
the electronics that decide when to fire the charge, and to provide the
energy that actually ignites the match.
The two most common battery types seen in the rocketry hobby are alkaline
cells, often the nominal 9V rectangular variety, and rechargeable batteries
based on Lithium Polymer (LiPo) chemistry. LiPo cells are 3.7 volts per
cell nominal voltage, are very light, and have a high energy density.
LiPo capacity is measured in units of current times time, so an 850mAh
cell should be able to deliver 850 milliamps for an hour. The battery
industry also uses something called a "C rate" to describe how fast the
battery can be usefully discharged, wich is a multiplier relative to the
battery capacity. So a battery with 850mAh capacity and a "2C" rating can
deliver current at a sustained rate of 1700mA until discharged, while the
same capacity at a "5C" rating can deliver 4250mA.
By comparison, most 9V alkaline batteries are actually composed of 6
individual 1.5V cells enclosed in a wrapper. It's hard to get hard numbers
for capacity and discharge rate, since in an alkaline cell the two are not
independent, and the discharge rate is related to the volume of each
individual cell. The
data sheet for an Energizer 522
shows just over 600mAh at a 25mA discharge rate, dropping to about 300mAh
at a 500mA discharge rate.
Importantly for use in pyro circuits, LiPo cells have a very low source
impedance, which means they can source immense amounts of current. It's not
unusual for cells in the 1000mAh range to have ratings in excess of
30C! Because this rapid discharge ability can pose a risk of fire, it's common
for LiPo cells to come with a "protection board" integrated into the battery
assembly that is designed to limit the current to some rate such as 2C
continuous duty.
In large airframes, or projects that involve staging, air-starts, or other
complex pyro event sequences, the most reliable approach will always be
to use separate batteries for the control electronics and the source of
pyro firing power. In the limit, having separate pyro batteries for each
pyro charge with the control electronics only providing the switching to
connect the batteries to the charges could even make sense. But for most
airframes, this is overkill, and the increases in mass, volume, and wiring
complexity just don't make sense.
The challenge, then, is how to design electronics that will robustly initiate
pyro events without negatively affecting the rest of the electronics when
operating from a single shared battery.
Altus Metrum Pyro Circuits
The very first prototypes of TeleMetrum
were designed to use a single-cell LiPo battery, and had an on-board 100mA
charging circuit. Because we needed 5 volts to power the accelerometer, we
had a small switching regulator that up-converted the LiPo voltage, and we
used some of that regulator's output to charge a 1000uF capacitor. The pyro
circuit used Fairchild FDN335N N-channel MOSFET switches in a low-side
switching configuration to dump the energy stored in the capacitor through
an attached ematch. Those FETs had an on resistance of under a tenth of an
ohm in our operating conditions. The circuit worked very reliably, but the
1000uF electrolytic cap was huge and we struggled with the mechanics of such
a large part hanging off the board...
It turns out that 3.7 volts is way more than enough to fire a typical
low-current e-match or equivalents like the
Quest Q2G2
igniters. In fact,
bench testing with a good digital oscilloscope showed that a typical e-match
with resistance of 1.3-1.8 ohms will fire in approximately 13 microseconds
when hit with the nominal 3.7 volts from a LiPo.
So, starting with our v0.2 boards, we switched to using the LiPo battery
voltage directly to fire the pyro charges, eliminating the clunky electrolytic
capacitor entirely. We also switched to the Fairchild FDS9926A dual N-channel
MOSFET whose specs are better in all regards for our application. The on
resistance is down around 40 milli-ohms in our circuit, such that the current
ratings are much higher (FET current limits are primarily driven by how much
heat is generated due to current flowing through the channel's on resistance).
Because using the LiPo voltage directly means we're effectively temporarily
putting a very low resistance across the battery during the pyro events, the
input voltage to the voltage regulator gets pulled down. To ensure the
processor could "ride through" these events, we added a 100uF surface mount
bulk capacitor on the 3.3 volt regulated voltage rail, which bench testing
demonstrated was more than sufficient to maintain processor operation through
pyro events. And that is essentially the same pyro circuit on all the boards,
both TeleMetrum and
TeleMini, that we have shipped to date.
What's Changed
The LiPo batteries we source and sell with our electronics come with a
protection board and cable terminated in a 2-pin, 2mm "JST" connector. The
specs on the protection board have always been "2C continuous", but we
observed the
ability to source much higher currents for short periods such as the 13
micro-seconds or so required to fire an e-match. Thus these protection
circuits seemed just fine .. we could fire e-matches with a burst of current
but were protected against short circuits in the wiring or our boards by
the 2C continuous limit.
Unfortunately, the most recent batch of batteries we sourced seem to have a
much "twitchier" protection circuit. We can draw more than 2C for short
bursts, but not as much as with prior boards, and not for as long an interval.
With a 1 ohm power resistor on the pyro terminals of one of our boards, we
get about 9 milliseconds of power before the protection circuit cuts in and
shuts the battery down. The power stays down until all load is removed,
which at least means the board is turned off and back on again, and in some
cases could even mean the battery is unplugged and re-plugged since we draw
trace current to keep the GPS memory alive even when the power is turned off,
and at least some of the new batteries see that as enough to keep the power
turned off after an over-current event.
For many e-matches, this isn't an issue, since 9 milliseconds is way longer
than the 13 microseconds needed to fire the charge. Unfortunately, we've
discovered that many of the e-matches bought and used in the rocketry hobby
are actually made for use in the fireworks industry, where it is desireable
to retain continuity
after firing so that series connections of e-matches all can fire even if
some fire faster than others! This means that while the resistance goes
up some after firing, sometimes the drain on the battery remains sufficient
to cause the protection circuit to kick in even after the pyro charge has
fired.
What We're Doing About It
If we remove the protection circuit from the LiPo (or jumper around it), all
existing Altus Metrum products will operate successfully with pyro charges
thave have an effective resistance of as low as 1 ohm. That's lower than
any e-match or Q2G2 we've ever seen, so in effect what this means is that
if you have an existing Altus Metrum flight computer, and you remove the LiPo
protection circuit, you're good to go. This does not really make things any
more "dangerous", since our battery chargers are all current limited and our
discharge patterns will never cause heating of the battery. Frankly, in a
rocket, the most likely way to cause a problem with a LiPo is by smashing or
puncturing the actual battery during bench work or during a crash... and
those cause the same problems with or without a protection board present.
In the future, we will ship batteries that have either a much higher C rating
on the protection circuit, or have no protection circuit at all.
The number of problems reported by actual customers that we think should be
attributed to LiPo protection circuit boards is very low, and we
suspect most of our customers who are happily flying their boards can continue
to do so. Ground testing where you fire pyro charges (or at least e-matches)
using RF to issue the commands (not USB, since the LiPo charger is running
any time USB is connected!) will confirm whether there's a problem. If the
board resets (does startup beeps) after a pyro event, or shuts down completely
(no LED activity), then you have a problem. If the matches light and the
board keeps running, you're good to go.
However, any Altus Metrum customer with LiPo batteries sourced from us or
our distributors who is worried about this problem (even if you haven't seen
problems in ground testing or previous flights), and who doesn't want to try
soldering on the battery circuit board yourself, is welcome to contact us
about removing the protection circuit for you. We won't charge anything
other than shipping.
To take advantage of this offer, just send email to
fixmybattery@altusmetrum.org telling us how many of which capacity batteries
you have that you'd like updated, and we'll respond with an RMA number and
shipping details.
Going Even Further
As previously indicated, with the LiPo protection circuits removed, all of
our current products will work reliably with at least 1 ohm across the pyro
terminals. That should cover all real-world flying conditions just fine,
but we're not satisfied yet.
We've designed a new pyro control circuit that transfers the maximum possible
energy to the load regardless of battery voltage without ever allowing the
voltage to the processor to droop at all. We're testing this new circuit in
various prototypes now, and if it pans out it will probably show up first in
MegaMetrum and then trickle down to
TeleMetrum and
TeleMini as those products
are updated later this year. The new pyro circuit tolerates 0 ohms (dead
shorts) on the pyro terminals for as long as the battery can provide
current, which is as good as it gets. We think the circuit is clever enough
that we'll probably write more about it once we're finished validating it.
There is no common way to express license information in each source
file at the moment. Some people embed license information in each
file, others keep it in README or another file at the top of the
source tree.
Worse, there is no common syntax to express the license information
in a machine-parseable way. If we had this, we could have tools that,
for example, tell you if you're trying to merge code that has an
incompatible license.
Obviously, this kind of thing can never work perfectly. People
keep inventing new licenses, and it is not possible for a computer
program to fully understand any license. It is not clear humans
can do that, either. However, it would be possible to do it to a
number of well-known licenses, which would help most of the time.
A classic 20/80 situation.
I would like to suggest a syntax, similar to Emacs's "Hey Emacs"
modelines, for embedding a summary of the license, or licenses,
for a source file, in such a way that it can be programmatically
extracted and parsed and analysed. With this syntax, one could then
write a tool to ensure that all files in a project have the same
license, or that all licenses are compatible with the project's
overall license.
Such a tool will, of course, rely on heuristics and assumptions.
For example, it needs to assume the machine-parseable license
summary is correct, and rely on a ruleset on what licenses are
compatible with what licenses. Things can go wrong. That's life.
Remember, this is aiming at doing the 20% of the work that will
work 80% of the time, not perfection.
I don't have a tool written, but I have a suggestion for the syntax.
/*
* Copyright 2013 Lars Wirzenius
*
* tl;dr =*= Licenses: GPL-3+ or Expat, and Artistic =*=
*
* Blah. Blah. Blah. Imagine long, boring license texts
* here.
*/
The important part is this:
=*= Licenses: GPL-3+ or Expat, and Artistic =*=
The =*= prefix and suffix and the word Licenses are there to
make grepping reasonably reliable without too many false positives,
and to allow comment characters and other text on the same line.
The actual license summary follows the syntax and semantics
of the Debian copyright-format 1.0 specification, which I
chose because it exists and has had a fair bit of review so far,
and is reasonably expressive.
The license summaries can be extracted with the following GNU sed
invocation:
sed -n '/.*=\*= [Ll]icen[cs]es\?: \(.*\)=\*=.*/s//\1/p'
I allowed various forms of the word license, since it's a word
that a lot of people will get wrong, and it's easy to catch all
four common forms.
So, does anyone else think this might be useful? Would you use
it in your own projects?
Regular expressions are a wonderful tool, but as many other powerful tools they tend to be misused. If I had a penny for everytime I recommended against using regular expressions for parsing HTML fragments . yeah you know what I mean.
This time made me think a bit about my own use of regular expressions. Do I ever fall in the trap of misusing regular expressions myself? Looking at my current code base I couldn t find any glaring misuses, if I could only get a list of all the regular expressions in my current project.
Regular expressions to the rescue? No, that would probably be quite an horrible adventure. Luckily I have tools to parse Perl: PPI to the rescue:
<script src="https://gist.github.com/pmakholm/5354001.js"></script>
A few hundred regular expressions. Most of them just matching simple substrings (in some cases case insensitive) or just short hand for testing a handful of equalities in one go. The only zero-width assertions we are using are the word boundary and quantifiers are mostly used on simple character classes like \d, \s, [0-9a-f] and a few anything but this one or two characters ([^>]).
Lessons learned: 1) PPI is cool. 2) I really do use regular expressions as I preach.
I bought a ScanJet N6350 a few years back, in the belief that it
would work. After all, you write free Linux drivers for all your
printers, and when those printers are multifunctional printers with
scanners, you do make sure the scanner bits of those printers work too.
So it shouldn't be too hard to write a Linux driver for that scanner
too, right?
Apparently it is. For some reason that I can't imagine, you decided
that my money is worth more than my stress levels.
| Artist: | Gahan Wilson |
| Publisher: | Subterranean |
| Copyright: | 2009 |
| Printing: | 2012 |
| ISBN: | 1-59606-479-X |
| Format: | Kindle |
| Pages: | 32 |
[1] http://shogun-toolbox.org/page/Events/gsoc2013_ideas
[2] http://google-melange.appspot.com/gsoc/org/google/gsoc2013/shogun
# apt-get update # apt-get build-dep resiprocatewill obtain all the necessary build tools. Then, as a normal user:
$ mkdir ~/src/resiprocate $ cd ~/src/resiprocate $ apt-get source resiprocate $ cd resiprocate $ dpkg-buildpackage -rfakeroot -j12In a few minutes, you should find the packages (*.deb files) are created.
I like it very much
Working with dak is not exactly fun. The documentation is not that awesome, and dak contains many hardcoded stuff for Debian, e.g. it often expects the unstable suite to be present. Also, running dak on Debian Wheezy turned out to be a problem, as the Python module apt_pkg changed the API and dak naturally had problems with that. But with the great help of some Debian ftpmasters (many thanks to that!), dak is now working for Tanglu, managing the whole archive. There are still some quirks which need to be fixed, but the archive is in an usable state, accepting and integrating packages.
The work on dak is also great for Debian: I resolved many issues with non-Debian dak installations, and made many parts of dak Wheezy-proof. Also, I added a few functions which might also be useful for Debian itself. All patches have of course been submitted to upstream-dak.
This is also nearly finished
The Tanglu metapackages have been published in a first alpha version. We will support GNOME-3 and KDE4, as long as this is possible (= enough people working on the packaging). The Tanglu packages will also depend on systemd, which we will need in GNOME anyway, and which also allows some great new features in KDE.
Side-effect of using systemd is at least for the start that Tanglu boots a bit slow, because we haven t done any systemd adjustments, and because systemd is very old. We will have to wait for the systemd and udev maintainers to merge the packages and release a new version first, before this will improve. (I don t want to do this downstream in Tanglu, because I don t know the plans for that at Debian (I only know the information Tollef Fog Heen & Co. provided at FOSDEM))
The community
The community really surprised me! We got an incredible amount of great feedback on Tanglu, and most of the people liked the idea of Tanglu. I think we are one of the less-flamed new distributions ever started
Something else
I am involved in Debian for a very long time now, first as Debian Maintainer and then as Debian Developer and I never thought much about the work the Debian system administrators do. I didn t know how dak worked or how Wanna-build handles the buildds and what exactly the ftpmasters have to do. By not knowing, I mean I knew the very basic theory and what these people do. But this is something different than experiencing how much work setting up and maintaining the infrastructure is and what an awesome job the people do for Debian, keeping it all up and running and secure! Kudos for that, to all people maintaining Debian infrastructure! You rock! (And I will never ever complain about slow buildds or packages which stay in NEW for too long
)
This is my monthly summary of my free software related activities. If you re among the people who made a donation to support my work (114.19 , thanks everybody!), then you can learn how I spent your money. Otherwise it s just an interesting status update on my various projects.
Simple-CDD and debian-cd
I tried to use wheezy s version of debian-cd and simple-cdd to generate an automatic installer. In this process, I filed a couple of bugs on simple-cdd (#701963: type-handling package is gone and should not be listed in default.downloads, and #701998: the --keyboard parameter is not working with wheezy s debian-installer) and I commited fixes for a few issues in debian-cd:
--no-check-gpg when querying debootstrap4 comments Liked this article? Click here. My blog is Flattr-enabled.
I've occasionally used KPhotoAlbum for a few years and eventually added many tags to the pictures.
But I've decided I wanted to try other tools, and digiKam seems to be the best option from the many reviews I've read.
Still, there's apparently no automatic feature to import into digiKam the tags set in KPhotoAlbum.
Fortunately, some smart people have implemented Perl tools allowing to overcome this issue.
The process involves modifying the pictures to save the tags inside the files, using the IPTC standard. Then, digiKam will be able to load the tags from the modified files.
Here's a copy of the (translated) kphotoalbum2iptc.pl script (the original as in french) I copied from this blog post (in french too).
I've been able to generate .deb packages for the required 2 perl libs dependencies using the method described in the referenced post , with : dh-make-perl --build --cpan Image::Kimdaba and dh-make-perl --build --cpan Image::IPTCInfoNext.