Planet Linux Australia

Syndicate content
Planet Linux Australia - http://planet.linux.org.au
Updated: 18 min 24 sec ago

Richard Jones: Introducing pythonhosted.org - the new packages.python.org

Mon, 2014-08-11 14:25

We've just added a new domain to the python.org stable, pythonhosted.org, to replace the existing packages.python.org domain. All accesses to the old domain are redirected to the new - all existing references will work. Google et al should catch up eventually.

This was done as part of an overall review of security of the PyPI website. Warning, that thread is longish :-)

Richard Jones: How awesome was PyCon?

Mon, 2014-08-11 14:25

PyCon was awesome.

It started with the Young Coders tutorial where I had the privilege of helping out as an assistant. The kids were amazing. Barbara Shaurette and Katie Cunningham were amazing. It was awesome.

The next day I popped in to help set up that room again but then spent the rest of the day focusing on my afternoon tutorial teaching people to write games in Python. It was packed - 35 or so attendees had signed up but then a bunch of the kids from the first day of Young Coders also came along to watch and learn. Including an 8 year old girl who told her dad she wanted to write video games. Awesome.

Then the conference proper started with an inspiring opening speech by the conference chair Jesse Noller about his vision of Change the future - education, outreach, politeness, respect, tenacity and vision. A broad, ambitious and awesome vision, and one I can fully get behind. Then Eben Upton took the stage to tell us about his journey with the Raspberry Pi project and a little of his vision. Lots of similarities. And then everyone got a Raspberry Pi. Awesome.

People wanting help figuring out how to teach kids to program their Raspberry Pi could try the free Raspberry Pi Education Manual PDF.

I spent a lot of time during the conference split between talking through various things in the hallway (I'm the Cheeseshop BDFL and there's many things afoot there and PyCon is a great time to move things forward very quickly), and spending time in the Raspberry Pi lab, chairing talk sessions for amazing speakers and generally having my mind awesomely expanded.

I taught many people the basics of pygame. I ran into the Kivy developers, and talked to them about the Pi. During the sprints they ported Kivy to the Pi and even developed some simple games using Kivy, the Pi and some simple hardware sensors (I'm playing the game with a tilt sensor).

I had an inspiring conversation with James Bennett during which a light went off in my head and the result is Python Enhancement Proposal (PEP) 439 for "Inclusion of pip bootstrap in Python installation". (apologies if you get a badly-formatted version; it should be fixed shortly.)

I'm exhausted. The people here - the community - is amazing and vibrant and brilliant and huge. 2500 people at the conference, 20% women. Awesome.

Seriously, look how many people were there...

Richard Jones: Compiling cx_Oracle on OS X

Mon, 2014-08-11 14:25

Occasionally I need to compile cx_Oracle on OS X and the 32- and 64-bit worlds collide head-on in a mess of "implicit conversion shortens 64-bit value into a 32-bit value" and "file was built for unsupported file format which is not the architecture being linked (x86_64)" errors.

I keep forgetting the various steps needed to make this work correctly so here they are:

  1. Create a virtualenv with a python interpreter stripped to 32-bit only. In the virtualenv bin directory ($WORKON_HOME/name_of_virtualenv/bin): % mv python python.fat % lipo python.fat -remove x86_64 -output python Doing this saves all the hassles of that "arch", "VERSIONER_PYTHON_PREFER_32_BIT" and "defaults write blah blah" guff and doesn't affect any other virtualenvs.
  2. Now that we have a "thin" Python compatible with the Oracle library, we can build cx_Oracle. Unfortunately even though Python is thin its configuration is not so we need to force things using an obscure environment variable that distutils will pick up: ARCHFLAGS="-arch i386" pip install cx_Oracle

There, that was easy, wasn't it?

Richard Jones: Cheese Shop (PyPI) sprinting at PyCon AU

Mon, 2014-08-11 14:25

We've had a fun couple of days sprinting on the Cheese Shop at PyCon AU where a number of contributors have fixed bugs and improved or added features (though always with the goal of keeping the service simple of course.)

In particular:

  1. Andy Todd helped clean up some aspects of the underlying database and fix up some of the sql.
  2. Capel Brunker added some more XML-RPC functionality, performed some tracker triage and also addressed some bugs and security issues.
  3. Kaleb Ufton, in his first contribution to Open Source development, added a bug tracker URL field to packages (which persists across releases and you must enter by editing through the website.) He also helped me sort out some twisted Apache configuration issues.
  4. I finally got around to writing the "newest packages" RSS feed.

There's another secret project we kicked off that will hopefully appear in the next couple of days, and some additional work that will hopefully come to fruition within a week or so. Stay tuned :-)

Thanks to everyone who contributed!

Ian Wienand: Finding out if you're a Rackspace instance

Mon, 2014-08-11 10:26

Different hosting providers do things slightly differently, so it's sometimes handy to be able to figure out where you are. Rackspace is based on Xen and their provided images should include the xenstore-ls command available. xenstore-ls vm-data will give you a handy provider and even region fields to let you know where you are.

function is_rackspace { if [ ! -f /usr/bin/xenstore-ls ]; then return 1 fi /usr/bin/xenstore-ls vm-data | grep -q "Rackspace" } if is_rackspace; then echo "I am on Rackspace" fi

Other reading about how this works:

Sridhar Dhanapalan: Twitter posts: 2014-08-04 to 2014-08-10

Mon, 2014-08-11 01:26

Colin Charles: MySQLNoSQLCloud 2014 – Edition #3

Sun, 2014-08-10 19:25

I’ve enjoyed visiting Buenos Aires once a year for the MySQLNoSQLCloud event, put together by the awesome people at Binlogic (in particular, their proprietor Santiago Lertora). It’s happening again in 2014, which by my count is the third edition, and there’s a twist: Buenos Aires on 13 & 14 November, and Cordoba on 17 November. It’s never been held in Cordoba before (like an annex event), so I think this could be extremely exciting.

If you’re looking to speak, send Santiago a note at events@binlogic.com (or leave a message here). I’ll put you in touch with him. If you’re looking to sponsor, you get attendees from all over Latin America.

Related posts:

  1. Upcoming MariaDB/MySQL events: Tokyo, Buenos Aires
  2. Sun Systems Tour; MyGOSSCON
  3. MySQL Community Awards: Community Contributor of the Year 2014

Russell Coker: Being Obviously Wrong About Autism

Sun, 2014-08-10 03:26

I’m watching a Louis Theroux documentary about Autism (here’s the link to the BBC web site [1]). The main thing that strikes me so far (after watching 7.5 minutes of it) is the bad design of the DLC-Warren school for Autistic kids in New Jersey [2].

A significant portion of people on the Autism Spectrum have problems with noisy environments, whether most Autistic people have problems with noise depends on what degree of discomfort is considered a problem. But I think it’s reasonable to assume that the majority of kids on the Autism Spectrum will behave better in a quiet environment. So any environment that is noisy will cause more difficult behavior in most Autistic kids and the kids who don’t have problems with the noise will have problems with the way the other kids act. Any environment that is more prone to noise pollution than is strictly necessary is hostile to most people on the Autism Spectrum and all groups of Autistic people.

The school that is featured in the start of the documentary is obviously wrong in this regard. For starters I haven’t seen any carpet anywhere. Carpeted floors are slightly more expensive than lino but the cost isn’t significant in terms of the cost of running a special school (such schools are expensive by private-school standards). But carpet makes a significant difference to ambient noise.

Most of the footage from that school included obvious echos even though they had an opportunity to film when there was the least disruption – presumably noise pollution would be a lot worse when a class finished.

It’s not difficult to install carpet in all indoor areas in a school. It’s also not difficult to install rubber floors in all outdoor areas in a school (it seems that most schools are doing this already in play areas for safety reasons). For a small amount of money spent on installing and maintaining noise absorbing floor surfaces the school could achieve better educational results. The next step would be to install noise absorbing ceiling tiles and wallpaper, that might be a little more expensive to install but it would be cheap to maintain.

I think that the hallways in a school for Autistic kids should be as quiet as the lobby of a 5 star hotel. I don’t believe that there is any technical difficulty in achieving that goal, making a school look as good as an expensive hotel would be expensive but giving it the same acoustic properties wouldn’t be difficult or expensive.

How do people even manage to be so wrong about such things? Do they never seek any advice from any adult on the Autism Spectrum about how to run their school? Do they avoid doing any of the most basic Google searches for how to create a good environment for Autistic people? Do they just not care at all and create an environment that looks good to NTs? If they are just trying to impress NTs then why don’t they have enough pride to care that people like me will know how bad they are? These aren’t just rhetorical questions, I’d like to know what’s wrong with those people that makes them do their jobs in such an amazingly bad way.

Related posts:

  1. Autism and a Child Beauty Contest Fenella Wagener wrote an article for the Herald Sun about...
  2. Autism, Food, etc James Purser wrote “Stop Using Autism to Push Your Own...
  3. Communication Shutdown and Autism The AEIOU Foundation The AEIOU Foundation [1] is a support...

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:

((expression))
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 main.cf

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:

darkmere.gen.nz 20140720 simon@darkmere.gen.nz simon-mail@cyan.usenet.net.nz root@darkmere.gen.nz simon@darkmere.gen.nz

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)
  • set TERRAIN_ENABLE to 1 and TERRAIN_FOLLOW to 1
  • 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!

Chris Samuel: How Far We Have Come: Comets

Thu, 2014-08-07 01:26

In 1986 ESA’s Giotto mission visited Comet Halley and I watched Patrick Moore on the BBC as the first images of a comets nucleus were returned.

Now it’s 28 years later and the ESA mission Rosetta has just arrived at 67P/Churyumov-Gerasimenko, and the difference in imagery is just amazing – and this isn’t even the full resolution version!

More images from Rosetta are on the ESA Space Images website.

This item originally posted here:



How Far We Have Come: Comets

Andrew Pollock: [life] Day 189: Kindergarten, a bit more cleaning, a little bit of startup stuff, swimming

Wed, 2014-08-06 22:25

I felt a bit better today after a good night's sleep, but still not great. I had a lazy start to the day, blogging in bed about my recent geeky endeavours (of which I am very proud), until I remembered I had my chiropractor appointment.

Then I finished off the cleaning I didn't finish yesterday. I should have done some of my real estate licence study, but first I got side-tracked making my Chromecast work with Netflix (successfully, which also pleased me immensely), and then I did about an hour's worth of work on assessment for my real estate training, before it was time to get a massage.

I've been a little bit sore ever since my trampolining last week, so I've been particularly looking forward to today's massage.

After that I caught up with Anshu for lunch, and then we picked up Zoe from Kindergarten.

She seemed to be doing better today, and said she was up for her swim class, so after a brief play at home, we all headed out to the pool. After we got back, Anshu had to head out to babysit for a friend, and I started on dinner.

Zoe was pretty tired, so I got her to bed a bit early without any fuss. Hopefully she sleeps well tonight.

Leon Brooks: Well, that was both nauseating and educational

Wed, 2014-08-06 21:37
Today, as I walked into a grocery store, I spotted a person whom I know (call them ‘Pan’ as a suitable acronym/handle) at the other end of an aisle.



They were dressed in a “power” colour and black, were (as always) so wrapped up in themselves that they were oblivious to everything outside their circle of interest, and were dominating a conversation with an older couple.



The husband was significantly taller than Pan, the wife significantly shorter. Pan hadn’t needed to assume an overbearing posture or anything like that, however the couple were reacting to Pan’s controlling actions as if they were puppets. The only important thing in the Universe to them at that that instant was obviously Pan.



This fits the character: to Pan, other people are only important in their appointed rôle (always, of which rôle they are completely unaware) of making Pan look good. That is all.



One of the (many) contradictions in Pan’s life is that they literally don’t care about others at all, other than that they appear to look good to said others. <shrug> I don’t know how this can be, and I very much wish that their actions had no effect on me or on those I care about.



Contra that, feelings like fear, love, anger or joy have no meaning at all for Pan beyond their use as methods for controlling others. Consequently, they have no conscience at all, and absolutely no sense of empathy.



Nausea? I remember having reacted like a puppet, in very much the same fashion.



Education? That massive disconnection from reality explains some of the apparently idiotic actions Pan has taken (legal documents applying only to premises outside their area of jurisdiction, false accusations of others having done the very things that Pan had already (and/or has since) done, painstakingly hammering false memories into the minds of innocents, that manner of thing).



As long as Pan can claim that they have taken certain actions, aspects of the situation like truth or integrity have no meaning; they are irrelevant to Pan, and so (by regal definition) irrelevant to all others. Pan can effectively get what they want, and hang the consequences, if any. The one-word term for this is ‘bullying.’





Since ‘anger’ has no meaning for them, actions which are immediately potentially lethal (including to themselves) were not taken by Pan out of anger (although they willingly feign anger when it suits their purposes), they were taken in ‘defence’ of a grandiose (and false) self-image.



Pan thinks that without said grandiose (and false) self-image, they have nothing and are nothing.



News Bulletin: as this self-image is a mirage (not real, not genuine at all) Pan has nothing and is nothing.



How someone who is (in emotional terms) completely heartless deals with this, I don’t know. I strongly suspect that the answer is “not at all.”

Russell Coker: Booting GPT

Wed, 2014-08-06 18:26

I’m installing new 4TB disks on an older Dell server, it’s a PowerEdge T110 with a G6950 CPU so it’s not really old, but it’s a couple of generations behind the latest Dell servers.

I tried to enable UEFI booting, but when I turned that option on the system locked up during the BIOS process (wouldn’t boot from the CD or take keyboard input). So I had to make it boot with a BIOS compatible MBR and a GPT partition table.

Number  Start (sector)    End (sector)  Size      Code  Name

  1            2048            4095  1024.0 KiB  EF02  BIOS boot partition

  2            4096        25169919  12.0 GiB    FD00  Linux RAID

  3        25169920      7814037134  3.6 TiB    8300  Linux filesystem

After spending way to much time reading various web pages I discovered that the above partition table works. The 1MB partition is for GRUB code and needs to be enabled by a parted command such as the following:

parted /dev/sda set 1 bios_grub on

/dev/sda2 is a RAID-1 array used for the root filesystem. If I was installing a non-RAID system I’d use the same partition table but with a type of 8300 instead of FD00. I have a RAID-1 array over sda2 and sdb2 for the root filesystem and sda3, sdb3, sdc3, sdd3, and sde3 are used for a RAID-Z array. I’m reserving space for the root filesystem on all 5 disks because it seems like a good idea to use the same partition table and the 12G per disk that is unused on sdc, sdd, and sde isn’t worth worrying about when dealing with 4TB disks.

Related posts:

  1. booting from USB for security Sune Vuorela asks about how to secure important data such...
  2. How I Partition Disks Having had a number of hard drives fail over the...
  3. Resizing the Root Filesystem Uwe Hermann has described how to resize a root filesystem...

Andrew Pollock: [geek] Lifehacking with NFC, Tasker and HabitRPG

Wed, 2014-08-06 09:25

Oh man, I'm such a geek...

Being a single parent has required a considerable amount of self-discipline on my behalf. I find I do best in an environment with routine to make sure stuff gets done. One of the things I did to try and make sure stuff got done was to form positive habits. To help and make this a bit more "fun", I started using HabitRPG, an online role-playing game based on habits.

I've only ever used it in a half-arsed manner, and as a result, I die a lot. Often I'll do my dailies, but then forget to mark them off. Sometimes I just fall off the habit wagon altogether. And die.

One of my dailies is to scoop my cat's litterboxes. For whatever reason, I find this a tad onerous, and had found myself falling out of the habit of doing it on a daily basis. My cat deserves better than this, so I wanted to get back on the habit wagon, but make it a bit more "fun" as well.

I love NFC, I've been a big NFC weenie for a long time. It's a solution looking for a problem. I have a huge collection of NFC tags, and I've finally found a problem I could use them with. I wanted to make it more frictionless to mark a task as completed in HabitRPG. I didn't want to have to take out my phone, unlock it, open the HabitRPG app and check off the daily task. I just wanted to wave my phone at an NFC tag. Here's how I did it.

The inimitable Paul Fenwick, who first inspired me to use HabitRPG, has a way more complicated set up to achieve something similar. The Site Reliability Engineer in me wanted the least number of moving parts and third-parties to have to get from my phone to HabitRPG.

After some hunting around, I found this wiki page on integrating Tasker with HabitRPG's API, so based on that breadcrumb, I got hacking.

I'd not used Tasker before. I was already using AutomateIt to do some other, reasonably dumb automation on my phone, though. Tasker is a little bit obtuse, and it took me a couple of days of casual fiddling with it to wrap my head around it's usage model. The fact that it can run arbitrary JavaScript, and that NFC Tools integrates with it is where the real awesome lies.

So based off the wiki, I crafted a couple of bits of JavaScript, one to mark daily tasks as complete on HabitRPG, and one to query HabitRPG to see if they have been marked as complete.

For the former, it was trivial, using NFC Tools, to write an NFC tag that then runs the Tasker task to call the HabitRPG API to mark a daily task as complete. That goal was now complete.

The equally satisfying part was also having Tasker do a time-based conditional nag based on the state of the daily task in HabitRPG. So now if it gets to 4:45pm and I haven't scooped the litterboxes, my phone literally tells me I'd better go do it.

I've also done the same thing with putting the dishwasher on. I've stuck an NFC tag on the dishwashing powder bottle lid, and I get a conditional reminder before bed time. It used to be an unconditional reminder with AutomateIt, and it was dumb, because I rarely forget to put the dishwasher on. Now, I can use HabitRPG to keep state on it instead.

The hunk of JavaScript to update HabitRPG is very simple:

function mark_completed() { var http = new XMLHttpRequest(); http.open("POST", http_post_url, false); http.setRequestHeader("x-api-user", global('HabitrpgUserid')); http.setRequestHeader("x-api-key", global('HabitrpgApiToken')); http.send(); return(http.responseText); } try { var result = mark_completed(); } catch(e) { var error = e.message; }

All of the interesting stuff is defined in variables preceding the JavaScript in the task definition. Here's a screenshot of the Task in Tasker that tells a thousand words:

Similarly, to query HabitRPG, I'm using:

function query_task() { var http = new XMLHttpRequest(); http.open("GET",http_get_url,false); http.setRequestHeader("x-api-user", global('HabitrpgUserid')); http.setRequestHeader("x-api-key", global('HabitrpgApiToken')); http.send(); var p = JSON.parse(http.responseText); return p['completed']; } try { var task_completed = query_task(); } catch(e) { var error = e.message; }

It's only slightly trickier because you have to parse the JSON blob that comes back.

Again, a screenshot.

Now maybe I'll stop dying so much in HabitRPG, my cat will have the clean toilet she deserves, and I'll stop getting reminded about putting the dishwasher on when I already have. Better living through automation, that's my motto.