com.tractrac.ResultAPI
Class LiveResultItem

java.lang.Object
  extended by com.tractrac.ResultAPI.LiveResultItem

public class LiveResultItem
extends java.lang.Object

Class representing a competitor at any given point in time, including information about rank etc.


Constructor Summary
LiveResultItem()
           
 
Method Summary
 long getAfterAtFinish()
          Get the time after at finish.
 java.lang.String getDescription()
          Get the description of the competitor
 double getDistanceBehind()
          Get the distance to the leader.
 double getDistNextMark()
          Get the distance to the next mark.
 double getDistToFinish()
          Get the distance to the finish: On current leg: Using either distance projected onto straigh line between previous and next mark or The distance projected onto the wind vector passing through the next mark On the following legs: The direct distance between the marks
 double getHeading()
          Get the heading of the competitor
 double getLatitude()
          Get the latitude of the competitor
 double getLongitude()
          Get the longitude of the competitor
 java.lang.String getName()
          Get the name of the competitor
 java.lang.String getNationality()
          Get the nationality of the competitor.
 int getRank()
          Get the rank of the competitor
 java.lang.String getShortName()
          Get the sail-number (short name) of the competitor
 double getSpeed()
          Get the speed of the boat
 java.lang.String getTeam()
          Get the name of the competitors team
 java.util.UUID getUuid()
          Get the UUID of the competitor
 double getVmg()
          Get VMG in knots measured at a point
 double getVmgAverage30s()
          Get the in knots VMG averaged over 30 seconds
 boolean isHasFinished()
          Check whether the competitor has finished the course
 void setAfterAtFinish(long afterAtFinish)
          Set the time after at finish.
 void setDescription(java.lang.String description)
          Set the description of the competitor
 void setDistanceBehind(double distanceBehind)
          Set the distance behind the leader
 void setDistNextMark(double distNextMark)
          Set the distance to the next mark
 void setDistToFinish(double distToFinish)
          Set the distance to the finish
 void setHasFinished(boolean hasFinished)
          Set whether the competitor has finished the course
 void setHeading(double heading)
          Set the heading of the competitor
 void setLatitude(double latitude)
          Set the latutide of the competitor
 void setLongitude(double longitude)
          Set the longitude of the competitor
 void setName(java.lang.String name)
          ' Set the name of the competitor
 void setNationality(java.lang.String nationality)
          Set the nationality of the competitor
 void setRank(int rank)
          Set the rank of the competitor
 void setShortName(java.lang.String shortName)
          Set the short name of the competitor
 void setSpeed(double speed)
          Set the speed of the boat
 void setTeam(java.lang.String team)
          Set the name of the competitors team
 void setUuid(java.util.UUID uuid)
          Set the UUID of the competitor
 void setVmg(double vmg)
          Set VMG in knots measured at a point
 void setVmgAverage30s(double vmgAverage30s)
          Set the VMG in knots averaged over 30 seconds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiveResultItem

public LiveResultItem()
Method Detail

getRank

public int getRank()
Get the rank of the competitor

Returns:
Get the rank of the competitor from 1 to n.

setRank

public void setRank(int rank)
Set the rank of the competitor

Parameters:
rank - Set the rank from 1 to n

getUuid

public java.util.UUID getUuid()
Get the UUID of the competitor

Returns:
the uuid of the competitor

setUuid

public void setUuid(java.util.UUID uuid)
Set the UUID of the competitor

Parameters:
uuid - the uuid of the competitor to set

getName

public java.lang.String getName()
Get the name of the competitor

Returns:
the name of the competitor

setName

public void setName(java.lang.String name)
' Set the name of the competitor

Parameters:
name - the name of the competitor to set

getShortName

public java.lang.String getShortName()
Get the sail-number (short name) of the competitor

Returns:
the short name or sail number of the competitor

setShortName

public void setShortName(java.lang.String shortName)
Set the short name of the competitor

Parameters:
shortName - the short name or sail number of the competitor to set

getNationality

public java.lang.String getNationality()
Get the nationality of the competitor. Nationality is a three-letter code using IOC naming standard.

Returns:
the nationality of the competitor

setNationality

public void setNationality(java.lang.String nationality)
Set the nationality of the competitor

Parameters:
nationality - the nationality of the competitor to set

getTeam

public java.lang.String getTeam()
Get the name of the competitors team

Returns:
the competitor's team

setTeam

public void setTeam(java.lang.String team)
Set the name of the competitors team

Parameters:
team - the competitor's team to set

getDescription

public java.lang.String getDescription()
Get the description of the competitor

Returns:
the description of the competitor

setDescription

public void setDescription(java.lang.String description)
Set the description of the competitor

Parameters:
description - the description if the competitor to set

isHasFinished

public boolean isHasFinished()
Check whether the competitor has finished the course

Returns:
true if competitor has finished the course - false otherwise

setHasFinished

public void setHasFinished(boolean hasFinished)
Set whether the competitor has finished the course

Parameters:
hasFinished - set whether competitor has finished

getAfterAtFinish

public long getAfterAtFinish()
Get the time after at finish.

Returns:
the time after at finish in milliseconds. Return Long.MAX_VALUE of competitor has not finished.

setAfterAtFinish

public void setAfterAtFinish(long afterAtFinish)
Set the time after at finish.

Parameters:
afterAtFinish - set the time in milliseconds the competitor is after at finish

getDistanceBehind

public double getDistanceBehind()
Get the distance to the leader. This distance is depinding on whether wind is used for calculations.

Returns:
get the distance after in meters. Does not make sense after both competitors have finished.

setDistanceBehind

public void setDistanceBehind(double distanceBehind)
Set the distance behind the leader

Parameters:
distanceBehind - set the distance behind the leader

getSpeed

public double getSpeed()
Get the speed of the boat

Returns:
get the speed in knot's as measured by the GPS device

setSpeed

public void setSpeed(double speed)
Set the speed of the boat

Parameters:
speed - the speed of the competitor in knots

getDistToFinish

public double getDistToFinish()
Get the distance to the finish:

Returns:
the distance to the finish, projected straight onto the wind-direction

setDistToFinish

public void setDistToFinish(double distToFinish)
Set the distance to the finish

Parameters:
distToFinish - set the distance to the finish

getDistNextMark

public double getDistNextMark()
Get the distance to the next mark.

Returns:
the distance to the next mark

setDistNextMark

public void setDistNextMark(double distNextMark)
Set the distance to the next mark

Parameters:
distNextMark - set the distance to the next mark

getHeading

public double getHeading()
Get the heading of the competitor

Returns:
the heading of the competitor in degrees (true north)

setHeading

public void setHeading(double heading)
Set the heading of the competitor

Parameters:
heading - set the heading of the competitor

getLatitude

public double getLatitude()
Get the latitude of the competitor

Returns:
the latitude of the competitor in (degrees).(decimal degrees)

setLatitude

public void setLatitude(double latitude)
Set the latutide of the competitor

Parameters:
latitude - set of the competitor in (degrees).(decimal degrees)

getLongitude

public double getLongitude()
Get the longitude of the competitor

Returns:
the longitude of the competitor in (degrees).(decimal degrees)

setLongitude

public void setLongitude(double longitude)
Set the longitude of the competitor

Parameters:
longitude - set the longitude of the competitor in (degrees).(decimal degrees)

getVmg

public double getVmg()
Get VMG in knots measured at a point

Returns:
the vmg

setVmg

public void setVmg(double vmg)
Set VMG in knots measured at a point

Parameters:
vmg - the vmg to set

getVmgAverage30s

public double getVmgAverage30s()
Get the in knots VMG averaged over 30 seconds

Returns:
the vmgAverage30s

setVmgAverage30s

public void setVmgAverage30s(double vmgAverage30s)
Set the VMG in knots averaged over 30 seconds

Parameters:
vmgAverage30s - the vmgAverage30s to set