RiverRat  - An MIT iCampus project http://web.mit.edu/riverrat/

Main Page | Software Documentation | Hardware Documentation | People | Contact | Wiki

Main Page | Class Hierarchy | Class List | File List | Class Members

riverrat.Fix Class Reference

Finished prototype - Provides a data type for position data, and is designed to fit all the data provided by a GPS reciever in a single update. More...

List of all members.

Public Member Functions

 Fix ()
 Default Constructor.

 Fix (float latitude, float longitude)
 Constructor.

 Fix (float latitude, float longitude, long time)
 Constructor.

 Fix (float latitude, float longitude, long time, float velocity, float heading, float heel_angle)
 Constructor.

synchronized String fixToString ()
 Returns a String with the target's latitude and longitude in decimal degrees, like (40.842, 78.024).

synchronized float getLat ()
 Returns a float with the target's latitude in decimal degrees.

synchronized float getLon ()
 Returns a float with the target's longitude in decimal degrees.

synchronized long getTime ()
 Returns a long with the target's timestamp, in System.time format.

synchronized float getHeel ()
 Returns a float with the target's heel angle in radians, from -Pi to Pi.

synchronized float getHeading ()
 Returns a float with the target's heading in radians, from 0 to 2Pi.

synchronized float getVelocity ()
 Returns a float with the target's velocity in meters/second.

synchronized void setLat (float latitude)
 Sets the target's latitude in decimal degrees.

synchronized void setLon (float longitude)
 Sets the target's longitude in decimal degrees.

synchronized void setTime (long time)
 Set's the target's timestamp in System.time format.

synchronized void setHeading (float heading)
 Set's the target's heading in radians, from 0 to 2Pi, where 0 corresponds to north.

synchronized void setVelocity (float velocity)
 Set's the target's velocity in meters/second.

synchronized void setHeel (float heel_angle)
 Set's the target's heel angle in radians, from -Pi to Pi.


Package Attributes

float lat
float lon
long t
float heel
float hdg
float vel


Detailed Description

Finished prototype - Provides a data type for position data, and is designed to fit all the data provided by a GPS reciever in a single update.

The first version of this class is complete.

Definition at line 10 of file Fix.java.


Constructor & Destructor Documentation

riverrat.Fix.Fix  ) 
 

Default Constructor.

Fills in latitude and longitude as 0.0 degrees, which could cause problems using the system in Northern Africa. Heel is defined as 0.0. Timestamp is defined as -1, velocity as -1.0, and heading as -1.0. These three are acceptable, because time, velocity, and heading are all positive definite.

Definition at line 26 of file Fix.java.

riverrat.Fix.Fix float  latitude,
float  longitude
 

Constructor.

Takes latitude and longitude as decimal degrees, and defines heel as 0.0, velocity as -1.0, heading as -1.0, and timestamp as -1.

Parameters:
latitude float with the latitude of the new Fix longitude float with the longitude of the new Fix

Definition at line 38 of file Fix.java.

riverrat.Fix.Fix float  latitude,
float  longitude,
long  time
 

Constructor.

Takes latitude, longitude, and time. Heel is defined as 0.0, velocity as -1.0, and heading as -1.0. Time is specified as a (long), probably produced by the call System.time.currentTimeMillis();

Parameters:
latitude float with the latitude of the new Fix longitude float with the longitude of the new Fix time long with the timestamp of the new Fix.

Definition at line 54 of file Fix.java.

riverrat.Fix.Fix float  latitude,
float  longitude,
long  time,
float  velocity,
float  heading,
float  heel_angle
 

Constructor.

All of the Boat's attributes are defined. Latitude and longitude are defined as decimal degrees, time with the System.time.currentTimeMillis() call, velocity in meters/second, heading in radians from 0 to 2Pi where 0 is north, and heel_angle in radians from -Pi to Pi.

Parameters:
latitude float with the latitude of the new Fix longtiude float with the longitude of the new Fix time long with the timestamp of the new Fix velocity float with the velocity of the new Fix heading float with the heading of the new Fix heel_angle float with the heel angle of the new Fix

Definition at line 75 of file Fix.java.


Member Function Documentation

synchronized String riverrat.Fix.fixToString  ) 
 

Returns a String with the target's latitude and longitude in decimal degrees, like (40.842, 78.024).

Returns:
String with latitude and longitude in a human-readable format

Definition at line 90 of file Fix.java.

Referenced by riverrat.Boat.boatToString(), riverrat.RiverRatDemo.drawBoat(), riverrat.Mark.markToString(), and riverrat.RaceObject.objectToString().

synchronized float riverrat.Fix.getHeading  ) 
 

Returns a float with the target's heading in radians, from 0 to 2Pi.

Returns:
float with the target's heading

Definition at line 140 of file Fix.java.

Referenced by riverrat.Boat.boatToString(), riverrat.RaceObject.getHeading(), riverrat.RaceObject.objectToString(), and riverrat.RaceObject.update().

synchronized float riverrat.Fix.getHeel  ) 
 

Returns a float with the target's heel angle in radians, from -Pi to Pi.

Returns:
float with the target's heel angle

Definition at line 130 of file Fix.java.

synchronized float riverrat.Fix.getLat  ) 
 

Returns a float with the target's latitude in decimal degrees.

Returns:
float with target's latitude

Definition at line 100 of file Fix.java.

Referenced by riverrat.RiverRatDemo.drawBoat(), riverrat.Map.getHeight(), riverrat.RaceObject.getLat(), riverrat.Map.getNorthLat(), riverrat.Map.getSouthLat(), riverrat.Map.Map(), and riverrat.RaceObject.update().

synchronized float riverrat.Fix.getLon  ) 
 

Returns a float with the target's longitude in decimal degrees.

Returns:
float with the target's longitude

Definition at line 110 of file Fix.java.

Referenced by riverrat.RiverRatDemo.drawBoat(), riverrat.Map.getEastLon(), riverrat.RaceObject.getLon(), riverrat.Map.getWestLon(), riverrat.Map.getWidth(), riverrat.Map.Map(), and riverrat.RaceObject.update().

synchronized long riverrat.Fix.getTime  ) 
 

Returns a long with the target's timestamp, in System.time format.

Returns:
long with the target's timestamp

Definition at line 120 of file Fix.java.

synchronized float riverrat.Fix.getVelocity  ) 
 

Returns a float with the target's velocity in meters/second.

Returns:
float with the target's velocity

Definition at line 150 of file Fix.java.

synchronized void riverrat.Fix.setHeading float  heading  ) 
 

Set's the target's heading in radians, from 0 to 2Pi, where 0 corresponds to north.

Parameters:
heading float with the target's new heading

Definition at line 187 of file Fix.java.

Referenced by riverrat.RaceObject.update(), and riverrat.DynamicMark.update().

synchronized void riverrat.Fix.setHeel float  heel_angle  ) 
 

Set's the target's heel angle in radians, from -Pi to Pi.

Parameters:
heel_angle float with the target's new heel angle

Definition at line 205 of file Fix.java.

synchronized void riverrat.Fix.setLat float  latitude  ) 
 

Sets the target's latitude in decimal degrees.

Parameters:
latitude float with the target's new latitude

Definition at line 159 of file Fix.java.

synchronized void riverrat.Fix.setLon float  longitude  ) 
 

Sets the target's longitude in decimal degrees.

Parameters:
longitude float with the target's new longitude

Definition at line 168 of file Fix.java.

synchronized void riverrat.Fix.setTime long  time  ) 
 

Set's the target's timestamp in System.time format.

Parameters:
time long with the target's new time

Definition at line 177 of file Fix.java.

synchronized void riverrat.Fix.setVelocity float  velocity  ) 
 

Set's the target's velocity in meters/second.

Parameters:
velocity float with the target's new velocity

Definition at line 196 of file Fix.java.


The documentation for this class was generated from the following file:  

Brought to you by the RiverRat team.