Posts Tagged ‘OS X’

Using Google Maps Route Data on Garmin EDGE

As you may recall, I’ve been using a Garmin EDGE 205 since Christmas to keep track of the miles I’ve been covering on the bikes. The unit itself is pretty impressive for the cost (well, at least the cost from EBay), but for Mac users the software supplied by Garmin is pretty crap to say the least.

Kike has asked how he can get Google Earth route data out to the unit so he can design some new rides. Now what I’m going to explain here is similar, but is using what’s available for Google MAPS rather than Earth, as it’s generally simpler.

Now remember, this post is aimed at Mac users primarily - but I imagine that it’s the same deal for Windows and Linux users too - it’s just that I don’t have time to check them all out for you. If you’re a curious Windows or Linux user, just go and play - you shouldn’t be able to do any harm :)

Free Software Required:

GMAPtoGPX - you need to follow the instructions on the site to drag a bookmarklet to your browser bookmark bar. This is used from Google Maps to convert your route data to GPX format

GPSBabel

You will need to install GPSBabel to your Mac as we will be using this to upload Route data directly to your Garmin EDGE unit.

Once these are installed, we’re ready to go make some interesting routes.

Plug in your Garmin to an available USB port and turn it on, then follow the action on the video.

Get the Flash Player to see this player.

One caveat with this approach is that every stage of the directions from Google is treated as a separate route. I’ll come back to editing the GPX into a single route in another post. I guess one other thing is that this is no good if you want to actually digitise a route from the map base - particularly if it’s for MTB use.

Tags: , , , , , ,

Garmin Edge 205 (and using it on the Mac)

Father Christmas brought me a Garmin Edge 205 for the bike(s) this year.

The unit is roughly the size of a mobile phone. It’s waterproof, Welsh hail proof (as determined during today’s ride), and can be charged from USB, so it doesn’t really matter if you pick one up from abroad.

Garmin Training Center

Garmin Training Center is the software that’s available for both PC and Mac. It’s on v3.smmat on PC, but only back at v2.x for Mac. Looking at the About information for the softwarem it looks like it’s been put together by none other than the folks at Omni Group, purveyors of such fine software as OmniPlan, OmniGraffle and OmniOutliner Pro. Given that this is a particularly fine stable of software, I can only imagine that Garmin wrote their brief on the back of a fag packet for how they wanted Garmin Training Center to work on the Mac, and then OmniGroup sneezed the code out on to an iPod Touch.

It took Garmin quite a while to release a version of their software for OS X, and they’ve managed to upgrade the software in the meantime for PC users without keeping the OS X version in step. Nothing new there for most Mac users, but it’s a bit depressing that figuring out that there are an increasing number of Mac users out there is taxing Garmin - perhaps they should open up the source to the community :

Oh, the base map is absolutely rubbish for any purpose other than a very rough estimate of where you’ve just cycled in this version of the software. But no matter - there are other maps available out there, including Garmin’s own online services at Motionbased.com which rather handily supports Macs and has done since day one afaik.

Getting Route and Performance Data out of the Edge 205

More on this to follow, but in brief: you can use the Training Center to export a full .tcx file and/or use GPSBabel to read direct from the GPS unit and transform your routes, tracks and waypoints out to GPX for Google Maps or Google Earth.
Getting Route Data in to the Edge 205

So having managed a few runs just tracking my somewhat below-par performance, I decided I’d like to have a crack at predetermining a route and having it available on the Edge for me to follow. You can forget using the Training Center software for this, as all it will allow you to do is create a new route based on historical routes you’ve taken. Total cobblers.

No, for this bit of functionality, you’ll need to grab yourself a copy of GPSBabel and have that installed on your Mac. I’ll post a full howto as a follow up to this - probably to be written on the hop over the pond to Lotusphere. You basically need todo some Google Maps direction finding and then use GMapToGPX to convert the output to waypoints that your unit can use. Pretty simple really, and I haven’t got lost yet. In fact - the only time I disagreed with the directions the unit was telling me, I ended up being wrong and cycling further than I needed to.

Future Usage

Now I’d really like to try and use the Garmin Edge 305 with both the Cadence and Heartrate Monitor, but just can’t stretch to afford it given that I’ve only just splurged cash on the Kona, and then there’s the small matter of feeding/clothing the family and paying the mortgage. Trifling issues, I agree, but duties there to be fulfilled and complied with nonetheless. [Hey Garmin, I'm making eyes at you!]
Right about now Garmin will also be releasing the Edge 605 and 705 models which look set to be all swanky and colourful with their brighter displays and candy-coloured maps.  Again, I’d love to field test these on 2 counts: 1) they’re really great gadgets for cyclists, and, more importantly; 2) it gets me out of the house and away from the keyboard.

If you’re riding reasonably, you should really REALLY go and get one of these to replace your standard cycling computer. Check out EBay for bargain prices rather than breaking the bank on full retail.

Tags: , , , , , , ,

OS X 10.5 DTrace - with shiny play-a-long interface

Oh this *IS* fun.

OS X Instruments

Tags: , , , ,

Liferay / Alfresco

On the back of getting Confluence up and running on Glassfish, on a Mac Mini, I’m now going to attempt to cram Liferay and Alfresco on there too, as I’d quite like to get a handle on the performance and footprint of the the two products. If it’s relatively low-fat, I can see that we could leverage this for rapid deployment point solutions - again on Glassfish as our chosen J2EE server.

Update: I was talking nonsense. I looked at the installers for Liferay and they made me cry real tears at how horrid the distributions were. I’ve resolved to go and ‘do’ Open Portal instead, just as soon as I can extract myself from Facebook (which will be some day real soon now that I’m all Facebooked out).

Right - apology time. I’ve pulled my head out of Facebook and come back to thinking about the Liferay / Alfresco post I originally made. I stand corrected on the ease of deployment front - I think I must have been in a very tired and dejected place then. Lucikly, Eduardo posted a little snippet saying that all was good with the world and that Liferay are distributing an official Liferay / Glassfish bundle.

As recompense, I’ll run a review asap [I have to for work sanity anyway :)]

Tags: , , , , , ,

Confluence on Glassfish (on OS X) Revisited

Ok, this post is a repeat process of the other day, just to sanity check getting Confluence up and running on Glassfish, and actually deploying live on this very box. When we get a little more time in the office, we’ll probably look to deploy on Solaris and test integration with LDAP. Here I’m just using internal authentication for Confluence, but sticking a MySQL instance at the backend.

To start off with, we need to grab the current version of Glassfish Beta 2
% wget http://java.net/download/javaee5/v2_branch/promoted/Darwin/glassfish-installer-v2-b41d.jar

It’s just under 70Mb, so won’t take that long to download. Not even for UK based folks at the mercy of BT’s so-called broadband offerings.

What do you mean you don’t have wget? Pick up the binary here. And yes, you could use cURL if you really wanted to, but my memory is almost at capacity these days, and so I find the simple methods are often the only route open to me.

Follow the glassfish install instructions - in this instance I’m installing in /usr/local - which is where my jar file is currently residing.

% java -Xmx256m -jar glassfish-installer-v2-b41d.jar

This command will unbundle GlassFish and create a new directory structure rooted under a directory named ‘glassfish’.


% cd glassfish

Set the execute permission for the Ant binaries that are included with the GlassFish bundle.

% chmod -R +x lib/ant/bin
% lib/ant/bin/ant -f setup.xml

Now given that this is going to be running on my test Mini, there’s not uch point me adding in the clustering support right now, so I can step over the Clustering supported installation, but if you have a bunch of Macs or Xserves you want to try this on, then just change step 4 from the above installation

% lib/ant/bin/ant -f setup-cluster.xml

To test out Confluence, I’m going to use a Confluence Personal Server license from Atlassian. You need to head on over to Atlassian and setup an account to apply for a Personal Server License, which is valid for 12 months. The license will give you a 2 user limited version of the Wiki. That is to say 2 active registered users at any one time, if you catch my drift. You can, of course, leave anonymous access on for spaces that you want the world and their wife to have access to if you are so inclined and don’t have IP restrictions to contend with.

The current version of Confluence at the time of writing is: 2.5.3, and you can grab it using:

% wget http://www.atlassian.com/software/confluence/downloads/binary/confluence-2.5.3.tar.gz

Which will give you the EAR/WAR deployment version as opposed to the Tomcat standalone version which you may recall is the cause of my initial pain and reason for looking in to Glassfish in the first place.

Preparing Confluence for install.

Unpack Confluence

% tar -zxvf confluence-2.5.3.tar.gz
% cd confluence-2.5.3
% vi confluence/WEB-INF/classes/confluence-init.properties

Edit the properties file to point confluence at a directory you want to use for storing uploads n’ stuff. In this case I’ll use one of the defaults in the file and create the directory structure on the mini - before I forget :)

% mkdir -p /var/data/confluence

Haven’t tried an EAR build and deploy (yet), but WAR definitely works - as per previous mail.

Build the WAR by running the build script

% sh build.sh

Once the build is complete, you’ll find the output in ./dist
Bung the resulting file in your glassfish autodeploy directory

% cp dist/atlassian-confluence-2.5.3.war /usr/local/glassfish/domains/domain1/autodeploy

Now in this case I’m going to use MySQL to handle content for Confluence. Don’t sneer (particularly not you Rasputnik), as it’s already running on the box for other reasons. Maybe sometime soon I can do a clean up and shift to Postgres - wouldn’t hold out hope of that happening anytime soon. For the record, Atlassian like Postgres, but support MySQL 4.1+ (but not 5), Oracle 10g+ and DB2 8.2+.

We’ll need the JDBC Connector for MySQL which you can grab from MySQL at http://www.mysql.com/products/connector/j/index.html
Unpack the distribution and copy the jar into glassfish/lib


% tar -zxvf mysql-connector-java-5.0.6.tar.gz
% cp mysql-connector-java-5.0.6/mysql-connector-java-5.0.6-bin.jar /usr/local/glassfish/lib

Restart Glassfish to get this picked up.


% asadmin stop-domain domain1
% asadmin start-domain domain1

The next task is to setup a JDBC Resource and Connection Pool in Glassfish. You can either do this through the cmdline, or through the GUI if you’re feeling all point-and-click.

I’ve already setup my MySQL DB and added grants to the user I’m going to use for the service, so I can use that information here now. Then go and create your JDBC resource. Remember the name of the JDBC Resource, you’ll need it during the Confluence install.

Now without changing anything else, the deployed copy of Confluence will be running on http://hostname.foo:8080/atlassian-confluence-2.5.3/

I’m out of time to look at virtual servers and/or apache mod_proxy as options right now (though the former will get attention first)

Easy-peasey-lemon-squeezy - and you can see it in action on breadedcod.com

Tags: , , ,