I chose to work in ANSI C, because of its portability and ease of integration into other projects I am working on. The kalman filter code is embedded in an application which loads the simulated data from files (stored in ASCII format), performs the monte-carlo simulation, and outputs the results back in to text files.

This is code that is specific to the model used in this particular project :

**test.c**- "Wrapper" application**test.h**- Model initialization parameters**kalman_camera.c**- Model Specific Kalman Filter Routines**eval_camera.c**- Model Specific Lev.-Mar. Routines**Makefile**- DEC Alpha/OSF UNIX Makefile for app.

This code implements the basic algorithms used, and is model independent in nature :

**matmath.h**- Matrix math Declarations**matmath.c**- Matrix math Routines**kalman.h**- Kalman Filter Declarations**kalman.c**- Kalman Filtering Routines**mrqmin.c**- Levenberg-Marquardt Minimization Routines**random.c**- Random Number Generators

Instead of writing standalone utilities for generating the simulation data, or using a pre-packaged utility, I chose to use MatLab. It allowed me to play around with the data and get a feel for the measurement model before the simulations, and easily analyze and plot the results.

Here are the MatLab files I used. The top-level **worksheet** guides you through the process,
automatically doing some of the work and providing the rest in "commented out"
form.

**Worksheet**for preparing simulated data**synth.m**- Synthesizes a trajectory**traj_plot.m**- Plots a trajectory**project.txt**- Projects a single pt in 3D**do_proj.txt**- Peforms the imaging model**calc_e.txt**- Calculates the est. error**motbas.txt**- Motion params used by workpage**feature0.txt**- Synthetic Feature set #0**feature1.txt**- Synthetic Feature set #1