Sunday, 21 October 2007

Sensor Noise (I)


Sensory data is usually noisy unless the sensor itself has a decent built-in filter. However, we can write simple filters to filter out noise. Matlab provides decent filter function, for instance, "filtfilt" for this purpose. I have written a simple filtfilt function working with C or C++ applications, shown in the figure.

Order is the order of the filter function, i.e. zero, first, second, etc. Based on the order coefficients, "a" and "b" are calculated. The simplest way to calculate them is using Matlab "butter" function
, e.g., [b,a]=butter(order, length); For a third order filter coefficients, "a" and "b" are calculated as: [b,a] = butter(3,1/10);

b[0]= 0.0007; b[1]= 0.0021; b[2]=0.0021;
b[3]=0.0007; a[0]= 1.0000; a[1]= -2.6236;
a[2]= 2.3147; a[3]=-0.6855;

Tuesday, 2 October 2007

PDF Reader/Viewer and Handhelds (I)

FoxitReader Core Engine has been proven to be one of the best performed PDF Rendering Engines. The code base is probably the smallest in the market. Comparing with Adobe, it loads much faster and needs far less memory. Foxit Reader has recently been ranked as one of the top 100 free software by PC World magazine.

"Foxit Reader Named to PC World's "101 Fabulous Freebies' List

http://www.pcworld.com/article/id,124883-page,2-c,freeware/article.html

in Tune Up (Utilities and System Tools)

Foxit PDF Rendering customers include IBM, NEC, Panasonic, Siemens, Microsoft, Xerox, Access, Nero and Lawrence Livermore National Lab etc. Foxit supports all major desktop OSs and the mobile platforms including WinCE, Linux, Brew and Symbian. The embedded WinCE SDK is available in

http://www.foxitsoftware.com/pdf/sdk/embedded/

However, the one time licene cost for research will be $4500.00 and the royalty fee for each application sold will be $5.00.

Saturday, 1 September 2007

Python and phones II

For writing Python Scripts for your phone you need to write the script in a text editor. Useful editors are Pywin or ConTEXT, but also notepad works. To learn how to download and install Python editors on your PC see

  1. Python .
  2. DiveIntoPython and its first chapter
  3. An illustrative article to install Python in here
After installing Python and writing the script you need to save it as *.py. The final stage is testing the code, which I found this link very helpful.

Python and phones I

If your phone is Nokia S60 series then you can simply implement simple applications on your phone using script based programming language, call Python. To start you need to download

1) PythonForS60_1_3_23_3rdEd_selfsigned.SIS

2) PythonScriptShell_1_3_23_3rdEd_selfsigned.SIS

from SourceForge (or their latest edition) to your PC. Then connect your phone either via Nokia PC suite or via Bluetooth to your PC or laptop and transfer these two files to the phone and run these files from the phone. Just make sure you install PythonForS60 before PythonScriptShell. For more information about PyS60 see PyS60 wiki.

A helpful link to learn how to uninstall PyS60 or upgrade it can be found here. Or you can simply join Nokia forum.

Thursday, 23 August 2007

Peter Cochrane and GPS

I received this article from a friend today about GPS and road map in the UK. I thought this might be an answer to my early complain about poor GPS service close to London on a N95 mobile. See here for more information.

9G Sony-Ericsson Mobile Walkman

Sony Ericsson Mobile Communications will launch late Thursday in Berlin six new phones, including a high-end Walkman-branded handset with around 9G bytes of internal Flash memory, according to a company spokeswoman. More….

In the other hand IPHONE disappoints mobile developers. To hear more about this click here
third-party software developers to create Web 2.0 applications to run on Apple’s forthcoming iPhone. To read more click here
This disappointment gets worse when it comes to programming on real mobile phones, i.e., iPhone is planning to provide facilities to

Wait and see which one will win: Apple or Mobile companies?

Mobile Office

In 2000, Fishkin et. al for the first time introduced the notion of “mobile office”. They argued that for a mobile device, such as a 3Com Palm Pilot, users need to be able to produce new data and view and browse the information space via peripheral devices. However current interface design techniques in handheld devices have been copied from large screen design techniques, e.g., Windows Icon Menu Pointer (WIMP). Thanks to John who has forwarded this link to me Future of Smart Phones we see smart phone programmers have started rethinking about mobile application design to improve current bad interfaces. Then later we should wait for a revolution in mobile phones. Treating a mobile phone like N95 as a mobile office is just impossible now. See my early post.

Excited about N95

As someone recently had a nice! experience with GPS and map browsing on a N95 mobile I would like to share it with you. We were driving from Cardiff to Milton Keynes and on the way I switched on GPS unit and waited the unit to download the satellite data. After 5 minutes the communication was established and there was an almost clear map on the screen with a big red dot on it indicating car’s position. Getting closer to London I was expecting to see more details on the map but suddenly everything on the map disappeared and there only that big red dot on the screen. In summary there was no detailed satellite data for locations around London!

Also, connecting to GPS for about 4 hours killed the battery in less than 5 hours. I was looking in the internet about other people’s experience with N95 and I found this Gizmodo_N95. More review about this gadget: N95 in CNet.

If you have any bad/good experience with N95 why not sharing that with others.

Lets talk about Mobile phones

Not long time ago BBC news spoke to Jan Chipchase, principal researcher at Nokia Design about designing mobiles for the world.
Jan Chipchase’s most recent report was called Where’s The Phone?
Mobile phones have shaped global communications. But who shapes mobiles? You can find this interesting article in Designing mobile phones for the world.

OpenGL ES, A real OpenGL for mobile phones

The good news is there are a couple of freely avaiable implementations that you can downlaod and use to experiment OpenGL:
  • OpenGL ES extension for QUALCOMM’s BREW SDK: The SDK and its tools are available from www.brewdeveloper.com
  • Vincent: An open source OpenGL ES implementation administrated by Hans-Martin Will. It is available from www.ogl-es.sourceforge.net
Other OpenGL ES implementations are likely to become more available in the near future for free. The best option is checking the official OpenGL ES web site at www.opengles.org for more information.

Migrating from EVC++ to Visual Studio

I would simply recommend this link in microsoft website:

Step by Step: Migrating an eMbedded Visual C++ Application to Visual Studio 2005

Visual studio and Windows Mobile

Microsfot is trying to push designers to build a native Windows Mobile-based application by using Visual Studio 2005. To start you need to follow these steps as order:
I also found developer resource kit very useful.

EVC++ and Windows Mobile 5.0

Obviously if your PDA has been updated from WinCE 2.0 or 3.0 to 5.0 you need to take these steps to update your developing tools (please follow the order):

Downloading EVC++ executable applications or debugging them in winCE5.0 shows some warning messages, as shown in below, on the screen both on the desktop and PDA:

The ARM SA1100 CPU does not support Configuration myproject Win32 (WCE ARM4).

My experience shows it is just a warning message and nothing more and you can run your applications on winCE 5.0 systems without crashing the PDA. If you have a different experience please add your comment here.

EVC++ and FMOD sound library

FMOD is not only an easy to use API for Window32 applications but also widely used in Windows Mobile systems. You can simply find all suitable packages and APIs for your own application in fmod.

I found fmod forum very helpful. If you have got any problems just drop those guys a line and you’ll get a quick response.

EVC++ and 3D graphics programming interfaces

It is hard to believe but yes, now we can develop mobile 3D applications with OpenGL ES and M3G (see here as a reference).

All the OpenGL ES-related specifications are available for free download at here . According to OpenGL ES API developers:

The OpenGL ES 2.0 API enables floating-point programmability on next-generation handheld devices and our Bitboys G40 hardware graphics processor fully supports the new API.

said Petri Nordlund, CTO of Bitboys.

The combination is a perfect engine for amazing next-generation mobile graphics.

In the case of difficulty in importing or using OpenGL ES API in EVC++ you may find this page interesting.

Wednesday, 22 August 2007

EVC++ and 2D graphics programming interfaces


A nice toolkit to design graphics programming interfaces on handheld devices is GAPI Draw. Gapi Draw is an excellent 2D graphics library created by Johan Sanneblad. GapiDraw 3.6, which its evaluation version is available for free to download from here supports graphics design on not only Windows but also Symbian mobile devices.
After unzipping the package and running the exe file the GAPIDraw installs itself in the path you have specified. After installation you will find the “samples” folder in the directory you have installed it. The folder contains a few examples for win32 and symbian systems, which gives clear idea about graphics programming using GAPI.

Pocket PCs and Embedded Visual C++

Personnaly when I started my PhD I had no idea how will be the programming on Pocket PCs. As someone used to programming in C++ using Visual C++ and MFC I was looking for a platform not much different in programming. I came across with Palm and HP Pocket PC both running windows CE. For the personal taste I chose HP Pocket PC and eventually I started programming using Microsoft Embedded Visual C++ (EVC). It was exciting to develop applications on a handheld device without learning a new language. EVC is a powerful IDE and as it was mentioned similar to the VC++ and most of all it is free to download from Microsoft:
Download EVC++ from Microsoft Website

There is a nice powerpoint file illustrating the programming on mobile devices, EVC:
programming on mobile devices

PDAs and Windows CE

If you have answered the questions in the prevoius post and you are interested in Pocket PCs and the Windows based applications the next posts may introduce some concepts for you. This link may also gives some idea about PDAs: Variety of PDAs. Also Microsoft presents featured windows mobiles, smart phones and Pocket PC in the link click here.

As you have noticed there is a wide range of handheld devices working with Windows Mobile. Windows Mobile is developed by Microsoft and it is powered by Windows CE. To know more about different versions of windows mobile you may check wiki.

The link in below briefly introduces variety of programming languages, for instance, Embedded Visual programming and .Net on Windows Mobile.
Book about Windows CE

The following link introduces a nice blog about embedded programming:
Blog about embedded programming

How should I start programming?

That is the question everyone who decides to develop an application on small screen devices should ask from him/herself. To clear this out lets asnwer this questions:

  • What is my device? A real mobile phone? A Pocket PC?
  • What operating system the device is running?
  • What programming skills do I have?
  • What kind of applications do I like to design?
When you have answered these questions for yourself then it will be easier to move forward.

SHAKE


The SHAKE SK6 is a small electronic device that senses movement, magnetic fields and electric fields and communicates these as signals wirelessly using BluetoothTM technology. The SK6 also includes a programmable vibrating motor which can be used to simulate a range of vibrotactile effects. The SK6 was designed mainly as a research development platform for the Human Computer Interaction (HCI) community affording them the ability to try out new interaction paradigms involving movement and haptic feedback, particularly in the mobile computing domain (phones, PDAs etc) by Stephen Hughes.

However the SK6 is highly versatile due to its ease of connectivity to virtually any other computing device. For example it could be used in any of the following ways:

  • As a gesture input device for a computing device such as a PDA, a phone or a PC
  • As an interface for an electronic musical instrument
  • As an gate analysis tool for injury or neurological rehabilitation
  • As a head tracking device for virtual / augmented reality systems
  • As a gaming controller
  • MESH

    The MESH is an inertial navigation system (INS) backpack consisting of 3 Analog Devices (+/-) 2g dual-axis ADXL202JE accelerometers, 3 Analog Devices (+/-) 300deg/s Single chip gyroscopes, 3 Honeywell devices HMC1053 magnetometers and a vibrotactile device, used for feedback purposes.
    The accelerometers in this system have a 10-bit accuracy with a bandwidth of 30Hz over a 5g range (an accuracy of approximately 0.005g). The vibrotactile display within MESH consists of two main elements: a vibrotactile transducer, and a sample playback circuit.
    This device has been designed in MediaLab Europe, Dublin, Ireland, 2004 by Stephen Hughes.

    XSENS


    The XSENS P3C is a 3 degree of freedom linear acceleration sensor developed by XSENScompany. This sensor can be attached to the serial port of a Pocket PC. Its effect on the balance of the device is negligible (its weight is 10.35g). The accelerometer is used to detect tilt magnitude around the x, y and z axis of the mobile device, sampling at a rate of 35 samples per second.

    Tuesday, 21 August 2007

    Stylus, keyboard, or novel sensory techniques?

    Before I start writing about programming, I would like to introduce novel input devices suitable for mobile computing appliances. Palm series of handheld devices and Pocket PCs generally have a small keyboard not useful in mobile situation. Many of such devices have a hand writing recogniser and you can actually write on a certain part of the screen normally using a stylus but how much is the success rate of the recognition? not very high I am afraid! Now the question is are there other input devices? The answer is yes!
    There are a few novel sensors which allow people to communicate with mobile computing applicances. So in the coming posts I will introduce some of them in brief to give some idea how they are working.

    Hello from Admin

    It is about four years I have started programming on mobile devices particularly on HP Pocket PCs. My major programming language has been C++ developed in Micorsoft Embedded Visual C++. I have worked with GAPIdraw API to make graphics and FMOD API for audiofication on my applications. Recently I have switched to Python and I am extending myprogramming skills in this language too (to download Python, which is an open source software go to click here.).