Is GPS suitable for a future revision of iPhone?

First of all, the iPhone is not meant to be a feature-rich cellphone. I think Apple wants to provide an intuitive and enjoyable interface that would let all kinds of people use most/all of the features inside it.

Having said that, GPS is a cool feature. The important thing, of course, is to keep in mind the power requirements of a GPS chip. The Texas Instruments Navilink 5.0 chip is a GPS chip for GPS and “Assisted GPS”. I think the Navilink 4.0 is currently used inside N95 phones. Adding the GPS chip would not be too problematic(although the real estate inside a cell phone is awfully small and it depends on a UART of I2C bus to interface with the cellular modem). One has to look at the power requirements though. I have searched for a decent data sheet on the Navilink chip, but all I find are marketing materials that claim “low-power” without specifying how much power the chip consumes(which would affect battery life).

Aside: For those interested, GPS uses Phase Modulation, which is more resistant to additive noise compared to amplitude modulation.


Using LaTeX

It is no secret that I’m a fan of \LaTeX.

Here is a good (if not the best) tutorial:

Here are a few examples of math(I can only show inline math in this blog so this stuff won’t look right in the post, but LaTeX has other equation typesetting features. Check the above link for more info):

  1. Integrals $\int_{-\infty}^{\infty}f(x)dx = 2$ becomes \int_{-\infty}^{\infty}f(x)dx = 2
  2. Fractions $\frac{x+1}{x+2}$ becomes \frac{x+1}{x+2}
  3. Superscripts, subscripts, etc $\sum_{n=0}^{N}2n + 1$ becomes \sum_{n=0}^{N}2n + 1

As an example of other math formatting you would do:


\prod_{x = 2}^{10}2x+1


Note that when you don’t typeset math inline with text, you omit the $ symbol and instead wrap the equation inside a \begin{equation}..\end{equation} pair.

Using AMShellWrapper for Wrapping Command Line Tools

I have found that AMShellWrapper is very nice for wrapping Command Line Tools. For an example on how to use it, see Andreas Mayer’s code. You might also find my cocoagcalc source code useful.

The key part of using AMShellWrapper is to implement the protocol:

@protocol AMShellWrapperController
// implement this protocol to control your AMShellWrapper object:

- (void)appendOutput:(NSString *)output;
// output from stdout

- (void)appendError:(NSString *)error;
// output from stderr

- (void)processStarted:(id)sender;
// This method is a callback which your controller can use to do other initialization
// when a process is launched.

- (void)processFinished:(id)sender withTerminationStatus:(int)resultCode;
// This method is a callback which your controller can use to do other cleanup
// when a process is halted.

// AMShellWrapper posts a AMShellWrapperProcessFinishedNotification when a process finished.
// The userInfo of the notification contains the corresponding NSTask ((NSTask *), key @"task")
// and the result code ((NSNumber *), key @"resultCode")
// ! notification removed since it prevented the task from getting deallocated


Preview of upcoming articles

How to use AMShellWrapper, maybe some Gnuplot things, additional Ruby tutorials?


All my readers, thanks for tuning in. I am swamped with work this summer, so I don’t have a chance to post as frequently as before. I will post from time to time.

Apple Design Awards winners for 2007

Here is the list. After the hohum keynote, something positive.

Making Gantt charts on Mac OS X

Here is a Java application(freeware) for doing so.