Thread: Cell Phone Tracking Code in C

  1. #1
    Registered User
    Join Date
    Nov 2013
    Posts
    3

    Cell Phone Tracking Code in C

    Hello,
    I really need help on how to approach the problem, any insight will be appreciated.

    The problem: cellphone tracking

    You are to develop a simulated cellphone tracking system which uses information from a number of celltowers to provide the path and current location of cellphone users in range of the towers. The customer is interested in seeing an end-to-end system demonstration and would like to get an idea of where the problems will lie for the real system, but is not too concerned that the system exactly mirrors reality, so you may make some simplifying assumptions on your design.

    The model:
    A number (10-20?) of celltowers are scattered in an irregular pattern with distances between them ranging from 400m to 3km. Our model of their placement is a number of disks of various sizes with the tower at the center, with no tower lying under the disk of another tower, but almost every spot covered by three or more disks.
    Each tower has the MEID (Mobile equipment identifier) for each cellphone which is within its range (disk). The distance to each phone from the tower is continuously monitored by measuring the flight-time in nanoseconds of the signal between the phone and the tower. These measurements are made every 7 seconds for every phone, and are then timestamped, identified as to source (which tower), and then either (a) stored locally at the tower, or (b) sent over the internet to a central data collection facility for storage and processing.
    A location query consists of finding the tracking data for a particular MEID and calculating its most recent position. A tracking query continuously calculates and reports location data for an MEID as it is received.


    Prelab due Friday 11/15: computational math models of --
    - regular array of towers with circular reception regions extending (just) to neighboring towers
    - cellphones traveling through tower regions on straight lines at fixed velocity
    - timestamps accurate to 1 nsec; flight time measurement error up to +/-3 nsec.
    - individual MEID sampling every 7 sec but at different times at different towers.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Based on the assignment you posted, why do you believe any programming is required (let alone in C)?

    (EDIT: Unless computational math is supposed to lead to some sort of probabilistic model that you want to simulate.)
    Last edited by tabstop; 11-27-2013 at 08:33 PM.

  3. #3
    Registered User
    Join Date
    Nov 2013
    Posts
    3
    The assignment is to write a c program but I am struggling on how to come up with the mathematical model (algorithm). Any ideas are welcome. Thanks

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by mcn20031 View Post
    The assignment is to write a c program but I am struggling on how to come up with the mathematical model (algorithm). Any ideas are welcome. Thanks
    You posted the mathematical model in the first post: grid of towers with reception regions a circular disk equal to the distance between towers; cellphones moving through space (well, on the ground) with constant velocity. (You'll have to check with your instructor whether you are randomly generating these or coming from an outside source.) Each tower sends/receives a position signal every 7 sec (but not all at the same time, so presumably you can choose how you want to stagger them). I'm assuming you know how to calculate the distance between two points in space, which you'll need to calculate the flight times (for the simulation part) and also (going the other way) for the tracking. The model suggests that you should usually have three towers in range of a phone and therefore three distances (based on those three flight times). You will then use those three distances to triangulate the position of the phone.

  5. #5
    Registered User
    Join Date
    Nov 2013
    Posts
    3
    Here is the rest to the assignment maybe it will shade some light. We are using trilateration and multilateration to measure the distance.
    You are being very helpful and appreciate it very much.
    Problem 1) network simulation program mockups of data collection/query methods --
    a) for central data repository;
    b) for distributed data repository.

    You will be running a number of copies of the 'tower' program mockup and a single copy of the 'central' program.
    For part a) each tower program is continuously sending location information for every phone it sees to the central
    program.
    For part b) the central program is broadcasting the MEID of interest to all towers, and those towers with information on that MEID are sending that data back to central.

    For both a) and b) : Measure network congestion as a function of increasing the number of towers, phones, and phones being tracked.
    For b) : Measure the delay for all data to be collected at central as a function of the above factors.

    Problem 2) data generation/transmission/storage
    Write a central data generator which creates timestamped (x,y) histories for all phones which is accessible to all tower programs. Use your computational models of the prelab and generate appropriate messages from each tower to central under part a)'s assumptions. Store all received data at central.

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    So start with something simple, like 1 tower and 1 mobile.

    Tower is at 100,100
    Mobile is at 500,700

    Can you work out the signal return time (do you know the velocity of radio waves in air?)

    X towers and Y mobiles is just arrays and loops after that.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Cell phone plans
    By jrahhali in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 03-31-2009, 08:18 PM
  2. new cell phone
    By lruc in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 12-11-2008, 02:34 PM
  3. Tic tac toe in cell phone HW prob
    By FerrariF12000 in forum C Programming
    Replies: 2
    Last Post: 11-27-2003, 10:42 AM
  4. Cell phone network.
    By Me in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 02-07-2002, 08:18 PM
  5. stealing cell phone=kid in big trouble
    By stupid_mutt in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 11-03-2001, 12:58 PM