Solar Panels 2 Years on

Recently I reached my 2 year anniversary of having my 6 KWh solar system installed at home so I thought it’d be nice to work out how much we’ve saved.

In 24 months we generated 18518, and in the last 12 months 9474 which is pretty good considering we’ve had 2 really wet and overcast years. We use about 12 KWh per day so it’s great that we’re generating about twice the power we need and it means the electricity company gets to send me a cheque at the end of each quarter. The good thing in the last few months is AGL now does Direct Deposit into bank accounts rather than cheques which means you get the money back so much faster but you still have to call up and ask for it.

Based on the Small Business Carbon Footprint Calculator – which only allows you to enter the number of KWh says 18518KWh is 20.68 tons of emissions and equivalent to having 124.1 trees.

So we’ve had 2 consistent years of output so I’ll keep monitoring it to see how we fair over coming years.

Technorati Tags: ,

Showing GPS position on Bing Maps with PhoneGap/Apache Cordova

30Yesterday I showed you how to display a bing map in an IPhone Application. The next thing I wanted to do was show, and keep showing the users GPS location on the map.

To do this, we use the watchPosition call to get and keep getting the user’s gps positing using the following script:

document.addEventListener("deviceready", onDeviceReady, false);

function onDeviceReady() {
    var options = { timeout: 30000 };
    watchID = navigator.geolocation.watchPosition(onSuccess, onError, options);
}

function onSuccess(position) {
    alert(position.coords.latitude + ‘,’ + position.coords.longitude);
}

// onError Callback receives a PositionError object
//
function onError(error) {
    alert(‘code: ‘    + error.code    + ‘\n’ +
          ‘message: ‘ + error.message + ‘\n’);
}

Now we want to display the position on the map, but we only want to show the current position. We can use the bing maps control to do this as follows:

var pushpin= null;

function onSuccess(position) {
    updatePushpinLocation(position.coords.latitude, position.coords.longitude);
}

function updatePushpinLocation(latitude, longitude)
{
    if (pushpin == null)
    {
        pushpin= new Microsoft.Maps.Pushpin(map.getCenter(), null);
        map.entities.push(pushpin);
    }
   
    var currenLocation = new Microsoft.Maps.Location(latitude, longitude);
 
    pushpin.setLocation(currenLocation);
    map.setView({center: new Microsoft.Maps.Location(latitude, longitude)});
}

When we run this up it should look like the picture above. For my application I need to test it in a few locations so need a way to simulate different positions. There’s a few ways to do this.

 

When running, choose the Debug, Location, Custom Locations Menu.

32

  Enter your custom location

32

The location will be updated on the map.

33

 

Alternatively, you can go to the debug panel, and choose Simulate Location, and choose from a list of pre-canned choices

34

 

Bing Maps on IPhone with Phone Gap/Apache Cordova

21

We’ve done a bunch of Bing Maps development before and we’ve done some work with Windows Phone, but we have a client who wants and IPhone application to show some spatial data as most of their internal users have either got an IPhone or IPad, closely followed by Android devices. They’re happy with Bing Maps that we’ve used with them before so are fine with sticking to what’s familiar to them. Only problem is I’m not an IPhone developer…

I did a bit of research and have had recommendations from a number of people that Phone Gap is quite good. So I’m going to try and build a good app for them using it and hopefully learn a few things along the way.

To start, I needed a Mac (which I’m borrowing to start with), with OSX Lion, XCode 4 and the other pre-requites that are set out in the really useful Getting Started with iOS guide for Phone Gap. So I’ve got all these and worked out how to install them on a Mac – you know, things like where’s the file explorer and how do i right click with the trackpad. Yes, all those things you want to do but don’t yet know how to do on this device.

I follow the instructions and helpful videos and get a hello world example running on the emulator (happy dance) and then it’s time for something more complex….lets put a map control on the page.

Simple..I grab the code snippet of a basic map from the Interactive SDK and run my app. All I get is a white screen Sad smile. I open the html file up in safari on the mac to check if i’ve failed cut and paste school but it works..hmmm. There must be a url list somewhere that I need to unblock or similar. So after a quick search on the internet I discover my assumption is correct.

  • I navigate to the Supporting Files folder under my solution
  • Open the Cordova.plist file.
  • Add a new item to the External Hosts section – first I try * just to be sure and it works .. yay.
  • All I really need to set it to is: *.virtualearth.net and it’s all happy.

20

As you can see in the first screenshot I’m using the no credentials example first. So now I should be fine to continue building out my map application.

To test my application on a device I need an apple developer subscription. It looked really easy but I couldn’t activate my account after I’d signed up and paid. So a tip for newbies like me, if you sign up, make sure you use a credit card with a name that matches your name. I made the mistake of using John’s credit card and now I’m going to have to go through a verification process which involves faxing a notarised copy of my passport to apple (sign…if only they flagged it when I entered the details on the site I could have used my own instead).

If any of you have used Phone Gap before with Bing Maps would love to hear about your favourite plugins, source code structure for easiest re-use between device code bases, how you handled internet dropouts etc. and any other tips and tricks.

 

Kinect Camp at Microsoft Innovation Centre Queensland

1

Last week we helped out at the first Kinect Bizspark Start-Up camp at the Microsoft Brisbane Office as part of the Queensland Microsoft Innovation Centre. The goal of the 3 days was for teams to build out an idea with Kinect and pitch it as a business opportunity.

We wanted to give the teams an option to have a bit of fun or use some different ideas in their projects so we built a Kinect sandpit using the depth camera , laser projector and 40 kg of sand.

2

The idea being the sand closer to the kinect we represented as the colour white, medium from the kinect green and far away blue which turns into icy peaks, green moutains/grass and blue water.

3

We also brought along our AR Drone and the windows toolkit for it in case any of the teams wanted to use the Kinect to control it.

4

The morning started with Emily opening the event.

5

Then some guidance about commercialising products etc.

6

Then we did a bunch of talking – showing off the Kinect features to the group. Then we split them into groups and helped them out for the rest of the day with the idea being we come by on saturday and sunday and help them as they got stuck.

7

8

9

Sunday evening all the teams pitched their ideas to the team of judges. It was awesome to see what they’d come up with and how different each team’s idea was.

10

Many thanks to Catherine and Emily for hosting such an awesome, free event for local startups!