org.mars_sim.msp.simulation.vehicle
Class GroundVehicle

java.lang.Object
  extended by org.mars_sim.msp.simulation.Unit
      extended by org.mars_sim.msp.simulation.vehicle.Vehicle
          extended by org.mars_sim.msp.simulation.vehicle.GroundVehicle
All Implemented Interfaces:
java.io.Serializable, Malfunctionable
Direct Known Subclasses:
LightUtilityVehicle, Rover

public abstract class GroundVehicle
extends Vehicle
implements java.io.Serializable

The GroundVehicle class represents a ground-type vehicle. It is abstract and should be extended to a particular type of ground vehicle.

See Also:
Serialized Form

Field Summary
static java.lang.String STUCK
           
 
Fields inherited from class org.mars_sim.msp.simulation.vehicle.Vehicle
EMERGENCY_BEACON_EVENT, MAINTENANCE, MALFUNCTION, malfunctionManager, MOVING, OPERATOR_EVENT, PARKED, RANGE_ERROR_MARGIN, RESERVED_EVENT, SPEED_EVENT, STATUS_EVENT, TOWED
 
Fields inherited from class org.mars_sim.msp.simulation.Unit
CONTAINER_UNIT_EVENT, DESCRIPTION_EVENT, LOCATION_EVENT, MASS_EVENT, NAME_EVENT
 
Method Summary
 VehicleOperator getDriver()
          Gets the driver of the ground vehicle.
 double getElevation()
          Returns the elevation of the vehicle in km.
 java.lang.String getStatus()
          Returns vehicle's current status
 double getTerrainGrade()
          Gets the average angle of terrain over next 7.4km distance in direction vehicle is traveling.
 double getTerrainHandlingCapability()
          Returns the vehicle's terrain capability
 boolean isStuck()
          Returns true if ground vehicle is stuck
 void setDriver(VehicleOperator operator)
          Sets the driver of the ground vehicle.
 void setElevation(double elevation)
          Sets the elevation of the vehicle (in km.)
 void setStuck(boolean stuck)
          Sets the ground vehicle's stuck value
 void setTerrainHandlingCapability(double c)
          Sets the vehicle's terrain capability
 
Methods inherited from class org.mars_sim.msp.simulation.vehicle.Vehicle
addDistanceLastMaintenance, addTotalDistanceTraveled, addToTrail, clearDistanceLastMaintenance, getAffectedPeople, getBaseSpeed, getDirection, getDistanceLastMaintenance, getEstimatedTravelDistancePerSol, getFuelEfficiency, getFuelType, getMalfunctionManager, getOperator, getRange, getSettlement, getSpeed, getTotalDistanceTraveled, getTowingVehicle, getTrail, isAppropriateOperator, isEmergencyBeacon, isReserved, isReservedForMaintenance, isReservedForMission, setBaseSpeed, setDirection, setEmergencyBeacon, setOperator, setReservedForMaintenance, setReservedForMission, setSpeed, setTowingVehicle, timePassing
 
Methods inherited from class org.mars_sim.msp.simulation.Unit
addUnitListener, fireUnitUpdate, fireUnitUpdate, getBaseMass, getContainerUnit, getCoordinates, getDescription, getInventory, getMass, getName, getTopContainerUnit, getUnitManager, removeUnitListener, setBaseMass, setContainerUnit, setCoordinates, setDescription, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mars_sim.msp.simulation.malfunction.Malfunctionable
getInventory, getName
 

Field Detail

STUCK

public static final java.lang.String STUCK
See Also:
Constant Field Values
Method Detail

getStatus

public java.lang.String getStatus()
Returns vehicle's current status

Overrides:
getStatus in class Vehicle
Returns:
the vehicle's current status

getElevation

public double getElevation()
Returns the elevation of the vehicle in km.

Returns:
elevation of the ground vehicle (in km)

setElevation

public void setElevation(double elevation)
Sets the elevation of the vehicle (in km.)

Parameters:
elevation - new elevation for ground vehicle

getTerrainHandlingCapability

public double getTerrainHandlingCapability()
Returns the vehicle's terrain capability

Returns:
terrain handling capability of the ground vehicle

setTerrainHandlingCapability

public void setTerrainHandlingCapability(double c)
Sets the vehicle's terrain capability

Parameters:
c - sets the ground vehicle's terrain handling capability

getTerrainGrade

public double getTerrainGrade()
Gets the average angle of terrain over next 7.4km distance in direction vehicle is traveling.

Returns:
ground vehicle's current terrain grade angle from horizontal (radians)

isStuck

public boolean isStuck()
Returns true if ground vehicle is stuck

Returns:
true if vehicle is currently stuck, false otherwise

setStuck

public void setStuck(boolean stuck)
Sets the ground vehicle's stuck value

Parameters:
stuck - true if vehicle is currently stuck, false otherwise

getDriver

public VehicleOperator getDriver()
Gets the driver of the ground vehicle.

Returns:
the vehicle driver.

setDriver

public void setDriver(VehicleOperator operator)
Sets the driver of the ground vehicle.

Parameters:
operator - the driver