I picked up my UAV work again. However, I was annoyed by the fact that the standard debian package of the APM planner 2 does not install nicely on the latest Ubuntu 14.04 LTS install because of the upgraded openscenegraph99 libraries (which mess up dependencies).
As such I changed the control file on the original debian package, repackaged it and giving some softlinking the package should installs nicely without triggering any errors in your package manager.
!! The nightly builds of the APM planner now address the above issue. I encourage you to download a nightly build or latest release when using Ubuntu 14.04. My bitbucket repository is offline as of now. !!
Awaiting an update of the official APM planner deb file on the main site you can download my file (at your own discretion) and read the installation instructions here: https://bitbucket.org/khufkens/apm-planner-fix.
Yesterday I updated my laptop from Ubuntu 12.04 LTS to the latest release 14.04 LTS (Trusty Thar). Overall the experience is very pleasant. I noticed that the interface is snappier, bootup is as fast (It’s difficult to notice any differences on a fast SSD drive). What I did not like was the removal of some functionality in the file manager, mainly splitting the file manager window into two columns. This has been a sore point for many users but there are work arounds of it really messes with your workflow. I’ll give it a try and go without for a while. Also some of my favourite themes don’t work anymore. I now use the Numix theme as a subsitute.
I also did some counting and I figured out that I’ve spend most of my research career (approaching 10 years) using Ubuntu, starting with their first release 4.10 (warty warthog). More so, aside from some graphics work for which I used a Mac I’ve been only using Linux for research and day to day needs, and never regretted making this move. With Ubuntu moving into tablet territory I foresee some exciting times in the linux (open-source) community.
I recently posted tools to extract DAYMET data for point locations. However, the product as produced by the DAYMET team is gridded data. If you want to scale models driven by DAYMET data spatially you need access to this gridded (spatial) data.
Sadly, access to the data is rather convoluted. If you want to download this gridded data, or tiles, you first have to figure out which tiles you need. This means, going to the DAYMET website and clicking several times within the tiles you want to download to get their individual numbers. After establishing all these tile numbers you can download them from the THREDDS server.
Obviously this routine is less than ideal, if for example you want to do regional to state based research and have to select a large number of tiles. I hope to automate this process. First step in this process is reprojecting the tiles grid to a latitude and longitude. Oddly enough the format of the netCDF file was not strandard and rather confusing. It took me a while to figure out how to accomplish this. Here is a bash script to do so. These instructions work on all ancillary netCDF grids as provided by DAYMET. From the generate tile file using the below code you can either determine the tile based upon any given point location or alternatively for a region of interest. The latter is my goal and in the works, as the former is covered by previous code.
# get filename with no extension
no_extension=`basename $1 | cut -d'.' -f1`
# convert the netCDF file to an ascii file
gdal_translate -of AAIGrid $1 original.asc
# extract the data with no header
tail -n +7 original.asc > ascii_data.asc
# paste everything together again with a correct header
echo "ncols 8011" > final_ascii_data.asc
echo "nrows 8220" >> final_ascii_data.asc
echo "xllcorner -4659000.0" >> final_ascii_data.asc
echo "yllcorner -3135000.0" >> final_ascii_data.asc
echo "cellsize 1000" >> final_ascii_data.asc
echo "NODATA_value 0" >> final_ascii_data.asc
# append flipped data
tac ascii_data.asc >> final_ascii_data.asc
# translate the data into Lambert Conformal Conic GTiff
gdal_translate -of GTiff -a_srs "+proj=lcc +datum=WGS84 +lat_1=25 n +lat_2=60n +lat_0=42.5n +lon_0=100w" final_ascii_data.asc tmp.tif
# convert to latitude / longitude
gdalwarp -of GTiff -overwrite -t_srs "EPSG:4326" tmp.tif tmp_lat_lon.tif
# crop to reduce file size, only cover DAYMET data areas
gdal_translate -a_nodata -9999 -projwin -131.487784581 52.5568285568 -51.8801911189 13.9151864748 tmp_lat_lon.tif $no_extension.tif
# clean up
My Dell Optiplex 980 at work doesn’t seem to play nice with Ubuntu 12.04 LTS. It fails to detect hyper-treading support on the CPU and defaults back to a single core setup when effectively running a 8-core CPU. This is rather annoying.
It seems that acpi settings are to blame, adding:
to your grub config file mediates this issue and enables SMP support. Sadly, adding this parameter is undone by kernel updates.
If you want to install the most recent version of Octave, an open source MatLab clone, on your older Ubuntu box you are out of luck. Only the most recent repositories (> 13.x) carry the latest Octave releases.
I found this quick fix for the problem. It involves four steps on a terminal.
sudo apt-add-repository ppa:octave/stable
sudo apt-get update
sudo apt-get install octave
sudo apt-get install liboctave-dev
To get to a fully functioning image processing toolbox run the following commands:
on the octave prompt
pkg -verbose install -forge general
pkg -verbose install -forge control
pkg -verbose install -forge specfun
pkg -verbose install -forge signal
pkg -verbose install -forge image
The command ‘pkg list’ will return a list of installed packages
Package Name | Version | Installation directory
control *| 2.6.0 | /usr/share/octave/packages/control-2.6.0
general | 1.3.2 | /usr/share/octave/packages/general-1.3.2
image | 2.0.0 | /usr/share/octave/packages/image-2.0.0
signal | 1.2.2 | /usr/share/octave/packages/signal-1.2.2
specfun | 1.1.0 | /usr/share/octave/packages/specfun-1.1.0
Finally, you load the image package using: