uk.co.silentsoftware.ui.views
Class SatellitesView

java.lang.Object
  extended by javax.microedition.lcdui.Displayable
      extended by javax.microedition.lcdui.Canvas
          extended by uk.co.silentsoftware.ui.views.AbstractCanvasView
              extended by uk.co.silentsoftware.ui.views.SatellitesView
All Implemented Interfaces:
javax.microedition.lcdui.CommandListener, GPSDataView

public class SatellitesView
extends AbstractCanvasView
implements GPSDataView

Shows all the satellites by azimuth and elevation using a "radar" type display (center is 90 degrees elevation, edge is 0 degrees). North is top of screen and 0 degrees elevation.


Field Summary
 
Fields inherited from class javax.microedition.lcdui.Canvas
DOWN, FIRE, GAME_A, GAME_B, GAME_C, GAME_D, KEY_NUM0, KEY_NUM1, KEY_NUM2, KEY_NUM3, KEY_NUM4, KEY_NUM5, KEY_NUM6, KEY_NUM7, KEY_NUM8, KEY_NUM9, KEY_POUND, KEY_STAR, LEFT, RIGHT, UP
 
Constructor Summary
SatellitesView(javax.microedition.midlet.MIDlet parent)
          Default constructor, uses midlet parent for command callbacks (e.g.
 
Method Summary
 void process(javax.microedition.location.Location loc)
          Integrated GPS usually can't provide this data but we'll try anyway....
 void process(java.lang.String data)
          Processes the raw GPS data - only uses the sat in view message This method Creates a satellite object from the GPS data Grabs a sync lock whilst it processes the currently visible satellites list Removes sats from the list that can no longer be seen - i.e.
 
Methods inherited from class uk.co.silentsoftware.ui.views.AbstractCanvasView
commandAction
 
Methods inherited from class javax.microedition.lcdui.Canvas
getGameAction, getKeyCode, getKeyName, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, isDoubleBuffered, repaint, repaint, serviceRepaints, setCommandListener, setFullScreenMode
 
Methods inherited from class javax.microedition.lcdui.Displayable
addCommand, getHeight, getTicker, getTitle, getWidth, isShown, removeCommand, setTicker, setTitle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SatellitesView

public SatellitesView(javax.microedition.midlet.MIDlet parent)
Default constructor, uses midlet parent for command callbacks (e.g. shutdown) Method also inits elevations, max radius, center etc and loads the satellite icon for use on the radar

Parameters:
parent -
Method Detail

process

public void process(java.lang.String data)
Processes the raw GPS data - only uses the sat in view message This method
  1. Creates a satellite object from the GPS data
  2. Grabs a sync lock whilst it processes the currently visible satellites list
  3. Removes sats from the list that can no longer be seen - i.e. have exceeded TIME_TO_LIVE
  4. Adds or updates the new satellites found in the list
  5. Releases lock, calls repaint

Specified by:
process in interface GPSDataView

process

public void process(javax.microedition.location.Location loc)
Integrated GPS usually can't provide this data but we'll try anyway....

Specified by:
process in interface GPSDataView