RiverRat - An MIT iCampus project | http://web.mit.edu/riverrat/ |
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 |
The first version of this class is complete.
Definition at line 10 of file Fix.java.
|
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. |
|
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.
|
|
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();
|
|
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.
|
|
Returns a String with the target's latitude and longitude in decimal degrees, like (40.842, 78.024).
Definition at line 90 of file Fix.java. Referenced by riverrat.Boat.boatToString(), riverrat.RiverRatDemo.drawBoat(), riverrat.Mark.markToString(), and riverrat.RaceObject.objectToString(). |
|
Returns a float with the target's heading in radians, from 0 to 2Pi.
Definition at line 140 of file Fix.java. Referenced by riverrat.Boat.boatToString(), riverrat.RaceObject.getHeading(), riverrat.RaceObject.objectToString(), and riverrat.RaceObject.update(). |
|
Returns a float with the target's heel angle in radians, from -Pi to Pi.
|
|
Returns a float with the target's latitude in decimal degrees.
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(). |
|
Returns a float with the target's longitude in decimal degrees.
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(). |
|
Returns a long with the target's timestamp, in System.time format.
|
|
Returns a float with the target's velocity in meters/second.
|
|
Set's the target's heading in radians, from 0 to 2Pi, where 0 corresponds to north.
Definition at line 187 of file Fix.java. Referenced by riverrat.RaceObject.update(), and riverrat.DynamicMark.update(). |
|
Set's the target's heel angle in radians, from -Pi to Pi.
|
|
Sets the target's latitude in decimal degrees.
|
|
Sets the target's longitude in decimal degrees.
|
|
Set's the target's timestamp in System.time format.
|
|
Set's the target's velocity in meters/second.
|