You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.1 KiB

package seng302.Model;
/**
* Created by f123 on 10-May-17.
*/
/**
* 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;
}
}