Renamed sharedModel module to racevisionGame - this is intended to be our single module program.
Moved Boat/MockBoat/VisualiserBoat into it. Moved Polars, polarParser, VMG, and polar exception. Moved the networking stuff into it. Moved angle, azimuth, bearing into it. Moved gpscoordinate into it. Moved mark/compoundMark into it. Moved leg into it. Moved trackpoint into it.
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
package mock.model;
|
||||
|
||||
import shared.model.Bearing;
|
||||
|
||||
/**
|
||||
* This class encapsulates VMG - that is, velocity made good. It has a speed component and a bearing component.
|
||||
*/
|
||||
public class VMG {
|
||||
|
||||
/**
|
||||
* Speed component of the VMG, in knots.
|
||||
*/
|
||||
private double speed;
|
||||
|
||||
/**
|
||||
* Bearing component of the VMG.
|
||||
*/
|
||||
private Bearing bearing;
|
||||
|
||||
|
||||
/**
|
||||
* Ctor. Creates a VMG object with a given speed and bearing (that is, a velocity).
|
||||
* @param speed Speed component of the VMG.
|
||||
* @param bearing Bearing component of the VMG.
|
||||
*/
|
||||
public VMG(double speed, Bearing bearing) {
|
||||
this.speed = speed;
|
||||
this.bearing = bearing;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the speed component of this VMG object, measured in knots.
|
||||
* @return Speed component of this VMG object.
|
||||
*/
|
||||
public double getSpeed() {
|
||||
return speed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the bearing component of this VMG object.
|
||||
* @return Bearing component of this VMG object.
|
||||
*/
|
||||
public Bearing getBearing() {
|
||||
return bearing;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user