Orientation

Riders and their boards flip in all directions out on the mountain and in the air.  Whether through X, Y or Z axes, the Nokia N8’s gyroscopes and our sensors on the board can detect the speed of riders’ turns, rotations and movements.

Why Measure Orientation?

X, Y and Z, we’re capturing the turns and rotations of the board to map its position in space. Combine with pressure to recreate the rider’s movements down the piste, or use the tri-axis data to inspire something unique.

#ifndef PUSHN8IMUDEVICE_H
#define PUSHN8IMUDEVICE_H

#include <QString>
#include <QObject>
#include “pushn8btdevice.h”

#include “npushimutick.h”

class PushN8IMUDevice : public PushN8BtDevice
{
Q_OBJECT
public:
PushN8IMUDevice(QBtDevice a_device, QObject *parent = 0);

~PushN8IMUDevice();

public slots:
void gotDataReceived(QString);

};

#endif // PUSHN8IMUDEVICE_H

#include “pushn8imudevice.h”

PushN8IMUDevice::PushN8IMUDevice(QBtDevice a_device, QObject *parent) :
PushN8BtDevice(a_device, parent)
{
timerId = 0;
timerPeriod = 50;

//Assumes messages are like: “IMU,231,23,43,54,454,645,54,23,54,END;”
packetLen = 11;
packetStart = “IMU”;
packetEnd = “END”;
}

PushN8IMUDevice::~PushN8IMUDevice()
{

}

void PushN8IMUDevice::gotDataReceived(QString data)
{

QStringList params;
if(getPackage(data, params))
{

NPushIMUTick * newIMUTick = new NPushIMUTick(params);

// qDebug() << “Parms: ” << params[1] << “,” << params[2] << “,” << params[3];

if(receivers(SIGNAL(reading_ready(NPushLogTick*))) > 0)
{
//anyone listening to us
emit reading_ready(newIMUTick);
} else {
delete newIMUTick;
}
}

}

/*
* Copyright (c) 2011 Nokia Corporation
*
* This file is part of the Push Snowboarding Project, More info at:
* http://pushsnowboarding.com/tech/developer-centre/
*
* This file is under the GPLv3 License, more details at:
* http://www.gnu.org/licenses/
*
*/