Embedding Maps Within LabVIEW

Many years ago when I was young, naive, and just starting off my career as a software engineer I was under the impression that whilst as a graduate I could expect to be on a steep learning curve, I would reach a point where although I would have to continually refresh my skills to keep pace with the latest technologies, my knowledge would be such that the learning curves wouldn’t be so steep. Fast forward 13 years and I can confirm that I was utterly wrong in this and I’ve hardly been off a learning curve for any of that time (and when I have I’ve been bored stiff!), and the learning curves don’t diminish either – which is not a problem as I still love acquiring new skills and improving the ones I have and hope I always will.

One of my latest learning curves has been to get mapping technology embedded in LabVIEW for a GPS application I am developing, and have found that there are a number ways of doing this.

The simplest way appears to be use an embedded web page and then build up a static url to generate a map and markers etc. If all you want on your GUI is a static map image then this is probably the best way to go, but it does have the drawback that if you want to alter any of the data then you will have to alter the url and reload the webpage which even for a mega fast connection is going to seem too slow so for any kind of dynamic applications this will not be appropritate but if you’re interested in doing this then the link below will take you to the Google Static Maps API, and I have also provided a link to a LabVIEW implementation using the API.

Google Maps API Developers Guide

Google Maps API – LabVIEW example

A second possibility was the dynamic generation of JavaScript. I had a play around with this, but very quickly felt that my lack of experience or knowledge of JavaScript was playing against me, and I still didn’t feel that it was the most elegant way to go in terms of getting maps into LabVIEW, but please find link below to get started with this method if you think it’s for you.

Google Maps JavaScript API

Another possibility I looked at was to use Google Earth instead as there is a very comprehensive API and by doing a search it appears a number of people have done this in LabVIEW and an API has been created, but it was a bit more in depth than I was looking for but is probably the way to go if you really want to unleash the power of Google Earth and use all of it’s many fantastic features. Please see link below as a starting point but also do a search as there are a number of articles and discussion forum posts on this.

Google Earth API

Google Earth and LabVIEW

The option I eventually went with was to use an absolutely fantastic free 3rd party .NET assembly called GMap.NET which I have found to be incredibly robust, very easy to interface to, and also very easy to learn how to use with a major caveat: I have been bitten a few times now using 3rd party .NET assemblies directly from LabVIEW – I’m not sure if it is because I am making a mistake in the way I am using a particular assembly, or whether there are some incompatibilities between LabVIEW and the specific assembly but I’ve generally learnt to be wary.

Another issue that I’ve found is that code where I’ve interfaced directly to a 3rd party .NET assembly not designed in a LabVIEW friendly manner it can get incredibly messy and almost unmanageable very quickly where you are always having to construct .NET specific objects such as Lists etc – although I wouldn’t call this a deal breaker.

Luckily I have about 3 years of .NET C# development experience under my belt (although this assembly should only require basic knowledge to understand), so my approach almost always to using .NET assemblies these days is to embed the 3rd party assembly within my own assembly that I have tailored for my application context and to play nicely with LabVIEW  i.e.native strings, arrays etc.

This has been my approach here which has meant that with very little pain I have successfully embedded Google Maps within my application with most of the functionality I require within a couple of days of work and has so far had total robustness and is very fast and responsive too.

Google Maps Embedded Within LabVIEW

Google Maps Embedded Within LabVIEW using GMap.NET

As you may be able to deduce from the screen dump, I have been using Actor Framework for this application and the map itself is an Actor which should make it good for reuse too.

Please find links to the GMap.NET software itself as well as the tutorials that I have used to develop my application below, and thank you for reading.

GMap.NET Software Download

GMAP.NET Tutorial (C# but easy to transpose into LabVIEW)

 

 

European CLA Summit Review

This time a week ago I was on a very bumpy National Express coach ride from Gatwick airport to Southampton. The subsequent train journey home marked the end of an incredible 4 days hanging out with just under 100 of the brightest people I have had the pleasure of meeting in the iconic surroundings of CERN in Switzerland for the 3rd European Certified LabVIEW Architect Summit (ECLA).

The ECLA began life 3 years ago in Newbury, England at NI’s UK and Ireland headquarters, and brought together CLA’s from across Europe as well as an impressive contingent of NI employees to spend 3 days presenting, discussing, and sometimes arguing on a plethora of subjects related to LabVIEW past present and future. The event was a huge success and was followed up with a summit in Paris chaired by my colleague Chris Roebuck which I was unable to attend due to the imminent birth of my son Isaac – so I responded with great cheer when I received my confirmation of attendance for this years.

My ECLA week began painfully with a phone call at 3:15 on Monday morning informing me that the taxi I had booked was waiting outside of my house to take me to the coach station in Southampton. From there I took a coach to Gatwick, and  boarded a plane to Geneva landing at approximately 10:30 to clear blue skies, warm air, and melting ice caps on the surrounding mountains.

Having found my way to the hotel just over the border in France near the town of Saint-Genis-Pouilly I made my way back to Geneva to do the briefest bit of sight-seeing. It’s a lovely city in a fantastic location with the Jet d’eau being the main attraction, and true to sterotypes there are Banks and Watch shops everywhere!

Holiday Inn

Holiday Inn, Saint-Genis-Pouilly

The Jet D'eau and Geneva Lakefront

The Jet D’eau and Geneva Lakefront

 

 

Returning to the hotel I met up with a colleague who’d recently arrived and an American CLA friend of his and we found a decent pizzeria in Saint-Genis-Pouilly for a meal, retiring to the hotel bar where we met up with more CLA’s for a few drinks before bedtime.

Tuesday started with a short bus trip from the hotel to CERN. The first thing that strikes you about the place is the sheer number and variety of buildings on site – there is everything from what looks like 50’s saw tooth roofed aircraft factories to brand new state of the art structures and many in progress and as far as I could see all the buildings were in use by the some 15,000 employees and visiting scientists and engineers on site. Interestingly though, there is absolutely no evidence of the huge 27km Large Hadron Collider ring that sits deep underground and for which the site is most famous for.

Our home on site for the next 3 days was to be a state of the art conference room in the main computing building and as is tradition, the first day of the summit was dominated by presentations and debate driven by the CLA community rather than National Instruments and included some excellent presentations including from Odd Andreassen on how LabVIEW is used at CERN and many other top of the tree LabVIEW developers.

An evening meal was paid for by National Instruments in Geneva which consisted of plates of raw beef being served on silver platters and vats of boiling oil in which we cooked the beef ourselves – there’s probably a name for it but think of a fondue if you’re struggling to visualize it – and of course, copious amounts of red wine! It was another great opportunity to rub shoulders with some of the megastars of the LabVIEW world and as ever with this summit, in the end there was only one subject being heatedly discussed…..

Wednesday morning was almost entirely National Instruments presenters, and was an opportunity to hear from the horses mouth about the current state of the art of LabVIEW and of updates to things such as the certification program.

Lunch was provided in the main restaurant which served the most incredible food and would put some high class UK restaurants to shame! Another thing that struck me whilst having lunch, and something I felt I had to do a FB status as it is something I have never seen or heard of  in any UK company was the sight of a number of scientists, engineers and workers having lunch with their children who I assume were attending one of the onsite nurseries. It was something very heart warming to see and although I’m not sure if it was a CERN/Swiss or European thing I think it is a fantastic way to go.

The afternoon was to all intents and purposes the climax of the summit, and I’d imagine one of the reasons why the entire allocation of places for the summit was taken and why there was a waiting list if anyone dropped out – we were going to finally get to see what all the fuss was about and have a proper tour around some of the CERN facilities.

We were broken into groups to see one of 3 experiments being undertaken around the LHC ring. This is quite a big mis-conception of CERN – the LHC isn’t a single particle collider, it is a number of experiments spaced around the ring namely ATLAS, LHCb, and CMS. ATLAS is probably the most famous, and if you do an image search for CERN then one of the first images that comes up is a face of look at the ATLAS experiment with 8 pipes around it’s circumference with what looks like orange tape on them – this is ATLAS, but only partially built as it was constructed like a Russian doll with additional components being slid into the core.

The tour started with a look around the CERN museum. This is a collection of obviously child-centric interactive exibits (although it didn’t stop us adults having a go!), as well as some rather understated exibits from CERNs History including  a section of one of the previous colliders to the LHC, and a mockup of the part of the LHC ring as it is now and some of the historical computer systems – all in all, most of us were drooling all the way around!

We were then taken around the control centre for the ATLAS experiment and given an explanation by a lovely French lady (called Claire (Dr)) who had obviously been involved with CERN for a long time. She also shared with us a number of highly amusing anecdotes about the competitive nature that exists between the various experiments around the ring as essentially the reason for having more than one collider is so that results can be corroborated using slightly different methods. This caused a bit of friction a number of years ago when one of the experiments finished and delivered their results, whilst the other one was late. The other one finally delivered their results which corroborated the first and the second team made the announcement, taking the credit – the result being lots of grumpy physicists on the other team!

With a limit on the number of people able to view the experiment at one time we were left to look around the wooden globe that sits opposite the reception at CERN. It was a gift from the Swiss government and contains a number of artifacts and more interactive displays the highlights of which (for me personally) were the cosmic ray detector, and also in a sealed bubble the very first World Wide Web server as used by Tim Berners-Lee.

The first World Wide Web Server

The first World Wide Web Server

Finally our moment came, and once again we were met by Claire and guided through a series of electronic key operated doorways, each picked up a hard hat, and got into an enormous lift to take us the 100 metres down to the ATLAS experiment. Getting out at the lift at the other end a walk through a few tunnels and we were within the ATLAS chamber looking at this absolute monster of a machine.

It truly is difficult to find superlatives to describe this thing. On the website it is described as being “about half as big as the Notre Dame Cathedral in Paris and weighs the same as the Eiffel Tower or a hundred 747 jets (empty)” and at first you are left totally startled by it’s size – including the massive (now covered) hole at the top of the chamber through which every last piece of the machine was lowered. As you look closer though and spot more details it is this which really catches your eye – the data acquisition chassis’, the endless wires, the walkways and ladders and the people working on them, the construction vehicles on the floor. Then you start to wonder at the difficulties that must have been involved in putting the thing together and making sure all the systems work and the amount of data produced by the machine every second it is running – everything about it is mind boggling!

Tunnels to ATLAS Chamber

Tunnels to ATLAS Chamber

ATLAS Looking Left

ATLAS Looking Left

ATLAS Looking Left

ATLAS Looking Right

With the tour over we returned to the surface – all of us as slightly different people I would guess after what we had just seen! There was nothing concrete organised for the evening so a number of us ended up meeting in a Pizzeria in central Geneva to enjoy (for most of us) our final night of comradeship before we all headed our separate ways the following day. As with the previous night, the discussion ended at a familiar place! Read on!

Thursday morning was discussion time – we had all previously voted on what we wanted to discuss or debate – my suggestion was ‘preventing software development duplication’ which with hindsight was a bit of a lame topic, but surprisingly it got a reasonable number of votes but not enough. Sadly possibly due to drinking my entire yearly intake of alcohol in the previous 3 nights (I’m virtually tee total) I cannot actually remember what the topics were that were discussed apart from a very interesting presentation by Jack Dunaway of Wirebird Labs in which he had interfaced LabVIEW to a Java library to create a very impressive representation of a VI hierachy, Sadly I had to leave early before we got onto ‘that’ topic to catch a plane home.

Conclusions

I’d have to rate the four days I spent at the CLA summit as some of the best I can remember – the saying “if you’re the smartest person in the room, you’re in the wrong room” I feel is particularly apt in this context –  I am lucky enough working at SSBV to be surrounded by lots of very smart people most of who are certainly a lot more clever than I’ll ever be (which is good). At the CLA Summit there’s just a lot more very smart people all of who are at the top of their game in terms of LabVIEW and all of whom you have something to learn off – and in terms of ideas and things to tease the mind this CLA summit was excellent.

It would be wrong though to cast the CLA Summit as simply a grand show and tell session, as software engineers we are all used to being out with friends and the moment the word software is mentioned everyone glazes over – it is virtually a taboo subject! Here though, all everyone wanted to talk about was software and obviously in particular, LabVIEW – we are all bound together by a common love and passion for what we do on a day to day basis and it is amazing to hear what other people are working on – and it is this aspect which I would say makes the CLA summits truly special – and although I wouldn’t say I made any new friends – that would be a bit creepy after 3 days, I certainly met lots of people who I look forward to seeing again possibly at the next summit likely to be held in Munich next year.

That Subject

Now, I’ve intimated a number of times throughout this blog that there was one subject that was guaranteed throughout the summit to cause heated discussion and completely polarize a room of CLA’s. Iif you hadn’t already of guessed it I’m of course talking about Actor Framework, so just to finish up and place my cards on the table – I personally am in the ‘love Actor Framework’ camp – it took me a while to get it but feel it truly has revolutionized the way I develop certain use cases. Will be interesting to see if the sands have shifted by the next summit as it still felt like about 50/50 in favour this time.

Finally Done It!

I have been talking about doing a blog for many years now mainly related to my chosen career in software development and in particular National Instruments LabVIEW, so finally here it is, my little space on the web to put my take on things across.

So, a little about myself.

My name is David (Dave to my friends) and I live in a small market town just outside Southampton in Hampshire in the UK and work at a company called SSBV Space and Ground Systems UK Ltd where I am a senior software engineer designing software primarily in LabVIEW for which I have now been certified for 10 years (2 as developer, 8 as architect). We do a wide range of things such as consultancy, in house production of spacecraft components (Sun Sensors, Reaction Wheels, Torque Rods etc), and of course software development.

My interests outside of work include cycling in the New Forest which I’m lucky to have on my doorstep, having a keen interest in all things technical and geeky, playing guitar and bass (both in a band until very recently), and of course my family and friends.

In terms of my career, I started off in 2001 at a small branch of a well known services Behemoth. As a graduate it was a fantastic company to work in as there was plenty of opportunities for training, lots of interesting projects to work on, and it was overall a very friendly and supportive place to work but in 2006 I felt it was time for a change and began working at a large multinational space company on testing satellite payloads and designing software to be used in ground stations – again mainly in LabVIEW, but with some significant TestStand, C++ and C# work thrown in.

This was a very contrasting environment going from a relatively small test house to a major blue chip manufacturer. On the one hand it was incredible working on things that were actually going to go into space and the technical challenges they posed, but on the other hand incredibly tight and rigid deadlines, always being on massive learning curves due to the cutting edge nature of the technologies, and as a result doing ridiculous hours meant that it could be an incredibly difficult and stressful environment for everyone to work in, but usually in the end when a project was complete, very rewarding with the icing on the cake being to see a satellite that you worked on blast into orbit.

In 2011 I tentatively interviewed for a role with a small specialist fish guidance and underwater acoustics firm for which if I’m honest I had no expectation of getting and prior to the interview I wasn’t all that bothered about getting it or not, but after an incredibly engaging interview, and feeling it was time for a new challenge I made the decision to accept a job offer from them.  The work was almost entirely C# based but also utilitising National Instruments Measurement Studio. It was a great place to work with many interesting projects but it became clear to me that the space industry was really where my heart was and in the spring of 2012 I was lucky enough to be approached by a friend and previous colleague looking to put together a specialist LabVIEW and TestStand software team at SSBV Space and Ground Systems where I am to this day.

Hopefully I’ll think up some interesting things to put on this blog, and thank you for your time in reading this.
Dave