NMEA Library for Arduino

NMEA 0183 (National Marine Electronics Association) is the communication standard for devices used in marine environments as an aid to navigation. The most common use outside of marine environments is for GPS devices, which use NMEA to broadcast their position.

I wrote this library for Loguino in order to provide global positioning metrics to the logger. For Loguino 2.0 I needed to simplify the build, which means moving non-core libraries into their own packages, a lot of people also use the libraries on their own without Loguino, so it’s about time this was the case.

The code is available on GitHub, under the GPL.

Download

You can download the ZIP file to import into the IDE here, or you can fork your own.

Methods

bool addChar(const char c)

Add a character from the gps stream. Returns True when a valid NMEA sentence has been completed. Generally you want to loop through all the data in the serial buffer and call addChar with the output of serial.read() until it returns true. At which point you can interrogate the NMEA object to determine if the fix is valid and then grab the location information if required.

bool validFix()

Returns true when the GPS has a valid fix.

string gps.getCourse()

Returns the course in degrees.

string getSpeed()

Returns the speed in Knots.

string getLatitude()

Returns the latitude.

string getLongitude()

Returns the longitude

string gps.getDate()

Returns the date as a string.

string gps.getTime()

Returns the time as a string.

Example

You can download an example project here.

El Altar

The Obispo summit of El Altar
The Obispo summit of El Altar

The Obispo summit of El Altar was without doubt one of the highlights of my trip, it’s technical, exposed, and stunningly pretty, especially if you get a good weather window.  Sadly, our weather on summit day was awful, and we had to turn around 30M from the actual summit, however in terms of experience this was much more technically and mentally challenging than the others.

The Altar was at one point a huge volcano, however the caldera collapsed, creating a horse shoe shaped ridge, with Obispo (The bishop) being the highest point. Access is via a small village behind Tungaragua (Which recently has been exceptionally active.) and Banos.  From the village its about an hour up a small track to the trailhead.  From the trailhead, its an easy days trek to Italian camp, its possible to arrange mules at the trailhead to carry equipment.  I had two guides on this trip, Rafael, and Ivan, who spent a day fixing ropes on the more exposed sections, before the three of us attempted the summit on day 3.

We set off at around 2am, with clear sky and little moonlight, the stars were wonderful, and the temperature surprisingly warm for the altitude.  There is a small climb, then steep descent down onto the lower glacier, which is traversed, and followed by a small mixed section, and steeper gulley onto the second glacier.  From here we ascended via what appeared to be a ridge and traversed to the final gulley which is a steep mixed section, with exceptionally loose rock.

The final rock wall
The final rock wall

From the top of this, there is a 10M rock wall, approx 90 degrees, by this time the wind had picked up, visibility dropped to a few meters, and it was snowing.  Whilst Ivan and I tied in on top of the gulley, Rafael attempted the rock wall, however the fixed lines had frozen, and now had a small build up of ice, and it wasn’t possible to lock off the jumars so we decided to turn around.  It was mildly frustrating as this was my main objective, but at the same time, a very wise decision.

The descent was just as tough as the ascent, the upper gulley was pretty much a bowling ally, I got clipped on the noggin by a small rock when i was unclipping which was a stark reminder to get the hell out of the way, whilst Rafael and I waited on Ivan rapping down, large boulders were hurtling down at terminal velocity which was quite nerve racking.

The traverse of the snow fields was pretty easy, but time consuming as we had to remove the fixed lines, and rap off snow bollards, it was nearly 4pm before we got back to camp.  Its a testament to the strength of Ivan and Rafael just how strong they were when we arrived back in camp considering they basically climbed the mountain twice by this point.

Oh dear...
Oh dear…

The next day we set off back to the car, with lovely weather and good clear visibility of the lakes and glaciers.  We arrived back at the car late afternoon ready for a hot shower and clean sheets, rounded the first bend, when I glanced up and saw a fantastic eruption form Tungaragua, “Oh look, an eruption, how nice” I said cheerfully to groans from Rafael and Ivan – little did I know that we were not cut off from Banos, where our clean clothes and hotel were, so we spent the night in another town.  Despite the inconvenience, the views of the ash cloud were stunning.

Cyclemeter Link

[flexiblemap src=”http://www.clusterfsck.io/static/kml/el_altar.kml” width=”100%”]

Chimborazo

P1020634

Chimborazo: The highest peak in Ecuador, and probably the most mentally challenging of the six peaks I climbed there.  We set off to clear skies and no wind, but this quickly turned into a slog, Rafael had warned me this would happen, and I had lined up a bunch of my favorite songs to compensate.  From the refuge you ascend to the ridge, and follow this all the way to 20000ft summit, and from there descend into the crater, and waltz around the penitents until you attain the true (Whymper) summit.

The ascent on the ridge was exceptionally cold, with a fierce wind developing across our path which was mentally very tiring and required goggles and balaclava.  I also felt exceptionally tired for some reason, probably a combination of a 20 day climbing trip and not enough sleep.  Rafael must have also been suffering as we stopped for a 5 minute ‘cat nap’ half way up.  That seemed to do the trick and I started to wake up a little, I was resigned to enjoying just the 20000ft summit, but by that point it was light, warm, and I was back on my game – despite taking over an hour, the slog to Whymper and back felt like only a few minutes.

Cyclemeter Link

[flexiblemap src=”http://www.clusterfsck.io/static/kml/chimborazo.kml” width=”100%”]

Cotopaxi

Sunrise on the summit of Cotopaxi
Sunrise on the summit of Cotopaxi

Cotopaxi: Our fourth 5000M peak in Ecuador, and another perfect weather window.  By this point in the trip, Rafael and I have developed a good feel for each others pace, and a mutual respect.  We ascended most of the route unroped, with a good pace.  We started out about an hour after most groups, and were first to the summit by quite a margin, arriving just before sunrise to a spectacular view.

Cotopaxi is located almost in the center of the avenue of volcanoes and the view form the summit is second to none.  Beautiful colors, combined with the caldera of the volcano itself made for a most enjoyable summit, especially as we had it all for ourself to begin with.

Cyclemeter Link

[flexiblemap src=”http://www.clusterfsck.io/static/kml/cotopaxi.kml” width=”100%”]

Cayambe

The summit of Cayambe
The summit of Cayambe

Cayambe lies to the north of the avenue of volcanoes, the final few hundred meters involves some of the most spectacular crevasses and ice formations I’ve seen yet, and tops out to wonderful views over Ecuador.  Rafael and I enjoyed perfect weather yet again, and by this point we were getting pretty comfortable with each other and it was like climbing with an old friend rather than with a guide.

At this point I started to get the feeling that Rafael wasn’t your typical guide, everybody knows him, and refer to him respectfully as Don Rafael, it turns out, in addition to being a super-guide, Rafael trains guides in Ecuador, and subsequently has taught most of the guides on the mountain at some point in their career.  Our pace was excellent, and we arrived on the summit just in time for sun rise.  I spent a bit of time gaffing with my GoPro which I still haven’t found much of a knack for, its great in the car, but I don’t really have the patience for it when it’s attached to my helmet.

Cyclemeter Link

[flexiblemap src=”http://www.clusterfsck.io/static/kml/cayambe.kml” width=”100%”]

The Illinizas

Illiniza Norte
Illiniza Norte

This was my first climb with Rafael, climbing with somebody new is always a little hard for me at first.  I hire a guide primarily as a climbing partner, whilst I usually learn an enormous amount from my guides, I don’t believe in offloading responsibility, to me climbing is about taking responsibility for not just your own safety, but for those around you too.  The guide of course has the last word, as they bring experience, local knowledge, and usually a bit of perspective to the table, but I don’t expect them to wipe my ass, carry my backpack or winch me to the summit – If I can’t get there on my own, I don’t have a right to get there at all.

Rafael on the summit of Illiniza Norte
Rafael on the summit of Illiniza Norte

I had a good feeling about Rafael from the moment we met, he is extremely experienced, and in fact I had no idea just how experienced and respected he was until well into our climbing trip, but from our first meeting, I could tell he was going to be a great guide. From my side, the key now was making sure he had the confidence in me as a client.  Illiniza Norte is a fairly easy scramble, and in good weather there are multiple obvious routes to the summit, however add cold temperatures, sleight and poor visibility and it becomes quite challenging to find the correct route, and with a layer of slush the surface becomes quite slippy.  Rafael dropped me off at the trail head and I hiked up for a couple of hours the previous day before getting a lift back down to the refuge, and the next day I felt in pretty good shape for the summit.  The climb was enjoyable, but the view was pretty minimal.  We picked up another tourist who was a little bit lost, and descended back to the refuge for dinner and an early night.

The next day it was time for Illiniza Sur, this is a more technical climb, and was really the opportunity for me to prove myself to Rafael, if I wasn’t up to snuff, I wouldn’t be climbing on El Altar, so I felt a bit of pressure not to screw up, healthy pressure.  We set off from the saddle, the climb is a delight, with great views down onto Illiniza Norte, on a reasonably exposed snow slope.  We used a 30M rope, either using a running belay, or Rafael leading for a pitch before dropping in a picket and belaying me up.  I’m pretty comfortable on this type of terrain now, and it was a real pleasure taking in the views.

Me on the summit of Illiniza Sur
Me on the summit of Illiniza Sur

From the summit we had perfect visibility over the avenue of Volcanoes and Rafael pointed out the other peaks we could see, before our descent back to the refuge.  On the way down we had a perfect view of Cotopaxi, and lovely snow conditions.  I didn’t screw anything up, and so far things were going well.  It took me a while to get used to group rope travel, but felt very secure and pretty strong considering the altitude.

Cyclemeter Link

[flexiblemap src=”http://www.clusterfsck.io/static/kml/illiniza_norte.kml” width=”100%”]

PNN El Cocuy

Laguna de la plaza
Laguna de la plaza

There is a classic circuit in El Cocuy, sadly it is currently closed as there are some tension between the indigenous people who live in the area, and the administration of the park. The result of this is that a large section is closed for anything other than day use. What this is translated into when obtaining your permit is that it is off limits, however, the reality is that if you can get the miles in you can still have a great time in El Cocuy.

In addition to some very accessible and enjoyable peaks such as Pan de Azucar, there are a number of nice day and multi-day treks. Again the administration will not give you much information/help going anywhere, but it is still possible. I did a nice lightweight hike arriving late afternoon and hiking up to the Laguna Grande for a couple of hours before resting overnight. The next day I scrambled up to El Toti before heading over the pass, this was a steep descent down very loose scree, but resulted in a wonderful view over laguna grande de la plaza before hotfooting it around the backside and out again before nightfall.

Cyclemeter Link

[flexiblemap src=”http://www.clusterfsck.io/static/kml/cocuy.kml” width=”100%”]

Nevado del Tolima

Me on the summit
Me on the summit

Manizales is the de-facto stopping off point for the Nevados range, whilst most backpackers skip Manizales and head straight to Salento or one of the other mountain towns, most of the guides, gear rental companies, and tour operators are based here.  The city itself is nice enough, but ultimately I was determined to get out into some countryside as quickly as possible.  I inquired at Kumunday about a guide for Nevado del Tolima, my main objective for PNN Los Nevados.  Generally they only operate tours, but were able to hook me up with Felipe, a local guide.  We met the next morning, along with Guillaume another backpacker, Guillaume was interested in the traverse, and the three of us discussed our objectives, the cost, and came up with an itinerary.

Guillaume enjoying a therapeutic mud walking session.
Guillaume enjoying a therapeutic mud walking session.

The next morning we met up in Salento, a lovely mountain town in the heart of Colombia’s coffee growing region.  It had been raining through the night, and despite a little respite in the morning, the weather continued.  This meant the trail was pretty much a mud bath, and the rivers were pretty swollen, most of them have some kind of suspension bridge, but a few involved some log hopping.  After the PCT I’m pretty comfortable with river crossings, however Felipe tried to be helpful and suggested I throw my bag across to him, this backfired and I ended up stepping into water up to my thighs in order to avoid dropping my bag. Thankfully as I was already saturated it didn’t really make any difference.

The first night in the Finca was a delightful reprive from the elements, and allowed us to dry off
The first night in the Finca was a delightful reprieve from the elements, and allowed us to dry off

That evening we stayed at a Finca, and encountered a group of Colombians who had been waiting out the weather for a few days – dinner was great, and we strung out every item of clothing we had around the kitchen to dry out over the range.  The next morning, we breakfasted and set off to the lake, the weather was pretty much the same as the day before, but with a few dry spells, and we reached the lake early afternoon and had an enjoyable dinner before turning in early.

Above the clouds on the ascent of Tolima
Above the clouds on the ascent of Tolima

Christmas day, and a breakfast of hot cereal, canela, more canela, and some power bars, before Felipe and I set off at 3am towards the summit.  I could see stars, which was a welcome hint of some good weather.  We continued up to Heliport camp, which was under several inches of snow, further vindicating our choice of a lower camping spot (at the expensive of a slightly longer summit day) from there we ascended the crag via a short scramble, and continued up to the base of the glacier, from there we put on crampons and roped up for the summit ridge.  The crux of which is a small exposed section with a large cornice on one side, and a crevasse on the other.

The summit ridge
The summit ridge

We topped out to a perfect panorama of the entire range, with good visibility but moderate winds, and enjoyed the view for a few minutes before heading down to camp.  After a short nap in the sunlight, we set off towards the hot springs, and arrived late afternoon.  Christmas dinner of Pasta A La Guillaume,  nice company and a great view down the valley was followed by an early night.

Enjoying the hot springs
Enjoying the hot springs

The next day we walked back into town, via a pretty but very steep downhill section before arriving in El Silencio and getting the bus back to Salento.

Cyclemeter Link

[flexiblemap src=”http://www.clusterfsck.io/static/kml/tolima.kml” width=”100%”]

Santa Isabel

Our merry group on the glacier
Our merry group on the glacier

I arrived in Manizales with the hope of climbing the three nevados in the range, this sadly wasn’t to be the case, as Ruiz has been extremely active of late. This also skippered any chance of traversing the park from north to south, as the North of the park is essentially off limits due to volcanic activity. It was however possible to do a day hike up to the Glacier on Santa Isabella. This was a fun day hike, and with no technical components made for a fun walk. There were 6 of us all told, from Canada, the UK, and 3 Colombians, which made for great company. The weather was mostly overcast with occasional bright spells, which added quite some atmosphere to the hike.

Cyclemeter Log

[flexiblemap src=”http://www.clusterfsck.io/static/kml/sta_isabel.kml” width=”100%”]

Job Submit Templates

I modified the job submit template on OpenLava Web to enable custom job submission forms, it is simple to implement, simply subclass OLWSubmit and include the fields you actually need.

Job Submission Template for Consume Resources
Job Submission Template for Consume Resources

If you want to have custom fields, then you can create them, but you must override _get_args() and return a dictionary of arguments to pass to Submit. You may want to do this generally if you need to build a complex command to pass to Submit from the various fields.

The form will automatically show up in the Submit drop down list, you can defined friendly_name as a class attribute, this will be the text displayed in the drop down. The form’s submit() method is passed any JSON data that was posted, and can be overidden if you need to manipulate it. If you don’t the default for a json request is to pass it directly to the submit function.