Planet Linux Australia

Syndicate content
Planet Linux Australia -
Updated: 1 hour 58 min ago

Maxim Zakharov: So tango

Sat, 2014-08-09 14:25

I feel happy returning home at 2am last night catching the last train from the city. I’ve been to my first milonga, dancing and watching real life tango for almost 5 hours. It was an amazing experience!

Half year ago I’ve thought I can not dance at all. It is changing since then with the help of Sophia de Lautour (Alvarez), my tango instructor, who is passionate about tango, very friendly and patient teaching someone who was not born to dance. If you wish to try learn tango, especially in North Sydney or Eastern suburbs, please take a look on the web-site of her school: So Tango: tango classes and private lessons in Sydney.

The topping of the evening were 3 tangos performed by Natalia Hill and Alejandro Aquino who showed the art of tango haute couture. Watch them dancing in Taipei last year:

Brendan Scott: brendanscott

Fri, 2014-08-08 23:29

In July I got an update to Android on my phone (an otherwise wonderful Galaxy Note 3).  It’s not awful, but the choices it has made are very annoying. In particular:

* email – I cannot now just have my email update when I click the refresh icon because I need to have auto sync data enabled.  So to have manual syncing of data I need to go into settings ->connections->data usage, press the menu button, select “auto sync data”, then go to my email app and click its refresh icon (then, technically, go back again to turn off auto sync again)

* wifi – everything is now dependent upon whether or not I’m connected to wifi, because, if I’m connected to wifi everything must be ok right? Well, you genii, who put wifi hotspot functionality into my phone? Now, I can’t actually use my wifi hotspot without worrying whether my tablet is going to auto-download a ton of stuff and blow my cap when I least expect it.  Thanks, thanks a lot.

* internet – I used to be able to have a number of windows open, and scroll through the open ones.  Now only my last _four_ are visible.  What the hay?  Sort of undermines the point of being able to have a number of windows open much? (Internet in general has a heap of odd design choices – forcing new tabs to open in the foreground being a pet hate)

* background data – if I want to have background data restriction on it puts a permanent notification in the notification bar.  Get that junk out of there. I’m a responsible adult for heaven’s sake.

* wifi direct (not actually from the update): why can’t I use wifi to transfer files directly between my phone and tablet without without going via a third router?  My phone can act as a wifi hotspot, why do I have to connect both devices to a third device?

These mind boggling UI choices make me wonder what’s going on with Android and whether it’s turned a corner – the wrong corner.




Andrew Pollock: [life] Day 191: A quiet day at home, Science Friday returns

Fri, 2014-08-08 23:25

Zoe woke up at 2:30am because she'd lost Cowie, and then woke up at 6am for the day. It took some effort to get out of bed this morning.

Getting out of the shower, I received a call from a trainer at the REIQ this morning saying I'd officially passed the registration block of my real estate license training. I'll get a Certificate of Registration, which is the bare minimum to work in the Real Estate industry soon. I took a moment to reflect on the fact that I've only been working on this for about 3 months, so it's a nice milestone and achievement. I've got plenty more units to do to get my full licence though.

Zoe was a bit more sniffly today, so I thought a quiet day at home was in order. I haven't done Science Friday since we got back from our US trip, mostly due to lack of planning. I wasn't that much more prepared today, but I did think of it earlier in the day, so we did a couple of things.

First up, we tried a twist on the old "vinegar and sodium bicarbonate" one that we've done in the past. This time, we filled a balloon with the sodium bicarbonate, and put some vinegar in the bottom of an empty 2 litre soft drink bottle. We put the balloon on the neck of the bottle and allowed the sodium bicarbonate to fall into the bottle. We got enough gas from the reaction to inflate the balloon, although some leaked out around the thread on the neck. Zoe was impressed.

I've also had two jars of polyvinyl alcohol solution sitting in the fridge since we last tried making slime, so it was a pretty easy one to just make another batch of slime. This time Zoe chose yellow.

Zoe wanted to work on the cardboard box robot she's been on and off wanting to make, but after a trip to the compost bin, it was time for lunch. After a fairly sizeable meltdown, we had some lunch.

I couldn't find my Leatherman after lunch, so we couldn't work on the robot anyway, so we read some books instead. Zoe wanted to read her Grug books, so I decided it was a good day to surprise her with the plush Grug that I'd purchased on impulse last year and squirreled away.

After some reading, I thought I'd try and get her to take a nap, so I told her that she could sleep in my bed and I'd read for a bit. She liked that idea and was in my bed faster than you could say "Jack Robinson". After reading some e-books, she fell asleep pretty quickly, and I used the couple of hours to catch up on some reading.

She woke up a little bit grumpy, but perked up after some TV and afternoon tea and then Sarah arrived to pick her up. It was nice to have a quiet day at home. The only time we left the house was to visit the compost bin.

Ian Wienand: Bash arithmetic evaluation and errexit trap

Fri, 2014-08-08 17:25

In the "traps for new players" category:

count=0 things="0 1 0 0 1" for i in $things; do if [ $i == "1" ]; then (( count++ )) fi done echo "Count is ${count}"

Looks fine? I've probably written this many times. There's a small gotcha:

The expression is evaluated according to the rules described below under ARITHMETIC EVALUATION. If the value of the expression is non-zero, the return status is 0; otherwise the return status is 1. This is exactly equivalent to let "expression".

When you run this script with -e or enable errexit -- probably because the script has become too big to be reliable without it -- count++ is going to return 0 (post-increment) and per above stop the script. A definite trap to watch out for!

Simon Lyall: Updating my personal email setup

Fri, 2014-08-08 10:27

I’m in the process of moving my personal hosting from one VPS to another ( I host with Linode and am buying a new virtual machine with a similar spec to my current one for half the monthly price ) and I decided to rearrange my home email. My old setup was:

Internet –> Exim on VPS -> Download via fetchmail to home -> Send to spamassassin and dspam at home -> filtering into mboxes on home workstation  -> read via alpine

The main disadvantages of this were:

  • Had to ssh into home to read email (couldn’t read on my phone)
  • Hard to view images in email or HTML emails
  • Sending via my ISP was unreliable and they are  implementing filters
  • No notification of new email

So I decided to make some changes.

Internet -> Postfix on VPS -> procmail to spamassassin on VPS -> procmail to maildirs -> read via imap

This setup is a lot simpler than the previous one and a bit more mainstream.

  • Since the email is online via imap I can read it directly from alpine or my phone (or another client)
  • Online running one anti-spam program (spamasaasin) instead of two (dspam and spamassassin)
  • Email operations on one server (the VPS) insead of 3 (VPS, workstation, home virtual machine)
  • Sending email straight via VPS instead of home VM and my ISP’s mail server
Details of my setup

There are a lot of HOWTOs on getting email to work via postfix and dovecot. I decided that the main feature I needed were virtual aliases for my domains. I also decided that since I only had a few mailboxes (mine own and two others) I could just create accounts on the server rather than maintain virtual users in postfix/dovecot. The server is running Ubuntu 14.04

Roughly speaking I followed the advice on these two pages by Rimuhosting:

I added these lines to my Postfix’s

virtual_alias_maps = hash:/etc/postfix/virtual home_mailbox = Maildir/ mailbox_command = /usr/bin/procmail -a "$EXTENSION" DEFAULT=$HOME/Maildir/ MAILDIR=$HOME/Maildir

Theses lines tell postfix to (1) use the virtual file (see below) (2) deliver to Maildirs (3) use procmail for delivery.

and create a /etc/postfix/virtual file like: 20140720

The first line indicates the domain should be used (this option is a little hidden in the virtual manpage) and then their are various addresses. simon-mail is a noshell account and cyan is the name of the server to so the email is delivered locally to it.

The simon-mail account just has a simple .procmailrc file with my various filters and a Maildir to store the email. Spam processing is called by procmail via:

:0 fW * < 280000 | spamc -u simon-mail -d localhost :0: * ^X-Spam-Status: Yes, score=([5-9]|1[0-9]|[2-9][0-9]) .junk/

which just puts all email that looks like spam into a junk folder (which I can check now and then until I’m happy with the filters).

Dovecot for imap worked out of the box except I had to tell it the location of my email. I just edited the file /etc/dovecot/conf.d/10-mail.conf and changed the mail_location setting to:

mail_location = maildir:~/Maildir

For sending email I pretty much followed this guide directly.

Overall it wasn’t too hard. The main problem was the fact that there were so many guides (I read over a dozen) each of which differed slightly and which were in many cases designed more much larger sites. I’ve currently got the setup in final testing (it is getting a copy of all my incoming email) and intended to switch over soon. In the short term I’m keeping my old mail folders (all 752 of them adding up to 1.8GB) locally at home but may move them at a later date.

Andrew Pollock: [life] Day 190: Hand casting, rock climbing and a play date

Thu, 2014-08-07 23:25

We had a pretty busy day today, even though we didn't do that much. Between some strange lower back pain and my cold, I felt pretty wiped out by mid-afternoon.

Zoe slept pretty well. She woke up around 6am, but given I put her to bed a bit early, that wasn't entirely unexpected.

I capitalised on having some extra adult help, and after breakfast, we had another attempt at taking a mold of Zoe's hand. With some more accurate scales and a little more care mixing it up, we were much more successful this time. We poured some plaster of Paris into the mold and left it to set while we went rock climbing.

It was good to go to Rocksports with another adult. It meant I could squeeze in a couple of climbs myself, and there was someone else to take photos while Zoe climbed. Zoe did pretty well again, going progressively higher every time she attempted a climb, but wanting to come down before making it to the top.

After a late lunch at home, we took the cast of Zoe's hand out of the mold. It turned out pretty well for our first full attempt. I had to have her curl her fingers slightly when it was being made so it would fit in the alginate, and unfortunately the plaster didn't properly file into all the fingers properly, so there's some air bubbles in the tips of a couple of her fingers, but failing that, the detail isn't too bad at all. Zoe was pretty impressed with the result. I think there should be enough alginate left for one more attempt.

After that, we headed around to Megan's house for a play date and to check on the progress of the house extensions.

Anshu headed home from there, and not longer afterwards, Zoe and I headed back so I could start dinner.

Zoe was pretty tired from her big morning of climbing, so I put her to bed early again.

Tridge on UAVs: Terrain following added to APM:Plane

Thu, 2014-08-07 16:01

In preparation for the upcoming APM:Plane 3.1.0 release I thought it would be useful to showcase some of the new features that have been added.

The biggest new feature in this release is automatic terrain following. That is something I have wanted to add for a long time, and it is now finally done, prompted by the need for better terrain following for the upcoming Outback Challenge 2014 competition.

How it works

Terrain following works by maintaining a terrain database on the microSD card on the autopilot which gives the terrain height in meters above sea level for a grid of geographic locations. On the Pixhawk this database is stored in the APM\TERRAIN directory on the microSD card. Unfortunately code side limitations and the lack of a microSD card mean terrain following is not available for the APM1 or APM2.

The terrain database is populated automatically by the autopilot requesting terrain data from the ground station over a MAVLink telemetry link. This can happen either during flight planning when the autopilot is connected over USB, or during flight when connected over a radio link. Once the terrain data is sent from the GCS to the autopilot it is stored on the microSD card so that it is available even when the GCS is not connected. This makes it possible for the autopilot to use terrain data to perform a terrain following RTL (Return To Launch) even when it is not able to talk to the ground station.

During flight the ardupilot code automatically reads in the needed terrain data from the microSD card into memory as the aircraft approaches a new area. It maintains an area of about 7km by 8km in memory if the default terrain grid spacing is used.

In addition to any terrain data for the immediate vicinity of the aircraft, ardupilot also asks the ground station for terrain data for any mission waypoints which are loaded, and for any rally points which are loaded. This ensures that terrain data is available on the microSD card for a whole mission even if the GCS becomes unavailable.

Terrain Following Flight Modes

In APM:Plane terrain following is available in the following flight modes:

  • RTL – Return to launch
  • LOITER – circle a point
  • CRUISE – long distance cruising
  • FBWB – speed/height maintenance
  • GUIDED – “fly to” waypoints
  • AUTO – fully autonomous missions

Use of terrain following in RTL, LOITER, CRUISE, FBWB and GUIDED modes is controlled by the TERRAIN_FOLLOW parameter. That parameter defaults to off, so no terrain following will be used in those modes by default. Set TERRAIN_FOLLOW to 1 to enable terrain following in those modes.

Use of terrain following in AUTO missions is controlled on a waypoint by waypoint basis using the reference frame of the waypoint. Normal (non terrain following) waypoints have a “Relative” reference frame, and altitudes are specified relative to the home location. Terrain following waypoints have a “Terrain” reference frame, and altitudes are relative to the ground level given in the terrain database.

Terrain Following in CRUISE mode

CRUISE mode is a flight mode which is designed for long distance flying, especially for things like FPV. When you enable terrain following with the TERRAIN_FOLLOW=1 parameter CRUISE mode will hold an altitude above the terrain rather than a barometric altitude. This allows easier flying at a set AGL altitude which makes terrain avoidance easier, and also makes it easier to stay within regulatory altitude limits.

Terrain Following in RTL mode

When you engage RTL (either as a flight mode or as a failsafe) the plane flies back to either the home location or the closest rally point. If you have TERRAIN_FOLLOW=1 then the plane will follow the contours of the terrain on the way to the RTL location, which makes RTL much safer in hilly areas.

Uses of Terrain Following

Terrain following is very useful when flying ardupilot in areas where the terrain may vary significantly. Key uses are:

  • Safe RTL. Being able to come over a hill rather than trying to fly through it when you enter RTL in a hilly area is very useful!
  • Aerial Photography. It is useful to be able to maintain a constant altitude over the ground when taking a sequence of aerial photos
  • FPV flying. When flying FPV in CRUISE mode it is useful to maintain constant height above the ground so you can spend more time enjoying the scenery and less time avoiding hills
Sources of terrain data

The ground station is responsible for providing the raw terrain data which is sent to the aircraft via MAVLink. Right now only MissionPlanner (beta version as of 6th August 2014) and MAVProxy support the required TERRAIN_DATA and TERRAIN_REQUEST messages needed for terrain following support. If you are using a different ground station then to load terrain data you will need to connect using one of the two supported ground stations to allow ardupilot to load terrain data onto your board. It typically takes around 2 minutes to load all the terrain data for a mission. Once it is loaded it is saved permanently on the microSD card.

Both MissionPlanner and MAVProxy support the global SRTM database for terrain data. That database has a global grid spacing of 3 arc-seconds (around 100 meters), but has a smaller grid spacing in some parts of the world (around 30 meters in the US). Support for other terrain databases can be added by extending the ground station code without changes to the ardupilot code.

Terrain Spacing

The ardupilot terrain code has a user settable parameter called TERRAIN_SPACING which controls the grid spacing which is used for requests for terrain data from the aircraft to the ground station. The default TERRAIN_SPACING is 100 meters, but users may set a different grid spacing for specialist applications. When ardupilot uses the terrain data it interpolates between grid points.

The amount of terrain data kept in memory is directly related to the grid spacing. If you decrease the TERRAIN_SPACING by a factor of 2 then the amount of terrain area kept in memory is reduced by a factor of 4. It is recommended that you use a TERRAIN_SPACING of at least 30 meters to prevent the aircraft running off the side of a grid in flight and not having data available.

If the ground station does not have terrain data available at the resolution requested by the aircraft then the ground station will interpolate as necessary to provide the requested grid size.

Terrain Accuracy

The accuracy of the SRTM database varies over the surface of the earth. Typical accuracy is around 10 to 20 meters, although some areas are worse. This makes terrain following suitable for aircraft that are flying at altitudes of 60 meters or more. Using terrain data for low flights is not recommended.

Setting up for terrain following

To setup your fixed wing aircraft for terrain following follow these steps

  • make sure you have APM:Plane 3.1.0 or later loaded
  • make sure you have the latest MissionPlanner installed (latest beta version as of August 2014)
  • connect to your vehicle over USB when you have GPS lock
  • check the FlightData->Status page in MissionPlanner and look for the terrain status data:

When the autopilot has finished loading terrain data you should see “ter_pend” goes to zero and the current terrain altitude in meters showing up in “ter_alt”. The “ter_pend” value is the number of terrain blocks that the autopilot is waiting to load from the ground station.

Terrain Lookahead

The terrain following code “looks ahead” of the current position along the flight path to try to ensure that the aircraft climbs soon enough to avoid upcoming terrain. The amount of lookahead is controlled by the TERRAIN_LOOKAHD parameter, which defaults to 2000 meters. The lookahead is also limited by the distance to the next waypoint in AUTO mode, so you need to ensure that you don’t have any legs of your mission which include climb rates your aircraft cannot achieve.

The climb rate used in the terrain look ahead is based on the TECS_MAX_CLIMB parameter, combined with your current ground speed.

Give it a try!

If you like the sound of terrain following then please give it a try! I've just released a 3.1.0-beta1 release that you can try now. Please let me know how it goes!