|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.core.Unit
org.mars_sim.msp.core.vehicle.Vehicle
org.mars_sim.msp.core.vehicle.GroundVehicle
org.mars_sim.msp.core.vehicle.Rover
public class Rover
The Rover class represents the rover type of ground vehicle. It contains information about the rover.
| Field Summary | |
|---|---|
static double |
LIFE_SUPPORT_RANGE_ERROR_MARGIN
|
| Fields inherited from class org.mars_sim.msp.core.vehicle.GroundVehicle |
|---|
STUCK |
| Fields inherited from class org.mars_sim.msp.core.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.core.Unit |
|---|
CONTAINER_UNIT_EVENT, DESCRIPTION_EVENT, LOCATION_EVENT, MASS_EVENT, NAME_EVENT |
| Fields inherited from interface org.mars_sim.msp.core.vehicle.Crewable |
|---|
CREW_CAPACITY_EVENT |
| Constructor Summary | |
|---|---|
Rover(String name,
String description,
Settlement settlement)
Constructs a Rover object at a given settlement |
|
| Method Summary | |
|---|---|
void |
destroy()
Prepare object for garbage collection. |
Collection<Person> |
getAffectedPeople()
Gets a collection of people affected by this entity. |
Airlock |
getAirlock()
Gets the rover's airlock. |
double |
getAirPressure()
Gets the air pressure of the life support system. |
Collection<Person> |
getCrew()
Gets a collection of the crewmembers. |
int |
getCrewCapacity()
Gets the number of crewmembers the vehicle can carry. |
int |
getCrewNum()
Gets the current number of crewmembers. |
AmountResource |
getFuelType()
Gets the resource type that this vehicle uses for fuel. |
Lab |
getLab()
Gets the rover's laboratory |
int |
getLifeSupportCapacity()
Gets the number of people the life support can provide for. |
double |
getRange()
Gets the range of the vehicle |
SickBay |
getSickBay()
Gets the rover's sickbay. |
double |
getTemperature()
Gets the temperature of the life support system. |
Vehicle |
getTowedVehicle()
Gets the vehicle this rover is currently towing. |
boolean |
hasLab()
Checks if the rover has a laboratory. |
boolean |
hasSickBay()
Checks if the rover has a sickbay. |
boolean |
isAppropriateOperator(VehicleOperator operator)
Checks if a particular operator is appropriate for a vehicle. |
boolean |
isCrewmember(Person person)
Checks if person is a crewmember. |
boolean |
lifeSupportCheck()
Returns true if life support is working properly and is not out of oxygen or water. |
double |
provideOxygen(double amountRequested)
Gets oxygen from system. |
double |
provideWater(double amountRequested)
Gets water from system. |
void |
setCoordinates(Coordinates newLocation)
Sets unit's location coordinates |
void |
setParkedLocation(double xLocation,
double yLocation,
double facing)
Sets the location and facing of the vehicle when parked at a settlement. |
void |
setTowedVehicle(Vehicle towedVehicle)
Sets the vehicle this rover is currently towing. |
void |
timePassing(double time)
Perform time-related processes |
| Methods inherited from class org.mars_sim.msp.core.vehicle.GroundVehicle |
|---|
determinedSettlementParkedLocationAndFacing, getDriver, getElevation, getStatus, getTerrainGrade, getTerrainGrade, getTerrainHandlingCapability, isStuck, setDriver, setElevation, setStuck, setTerrainHandlingCapability |
| Methods inherited from class org.mars_sim.msp.core.Unit |
|---|
addUnitListener, compareTo, fireUnitUpdate, fireUnitUpdate, getBaseMass, getContainerUnit, getCoordinates, getDescription, getInventory, getMass, getName, getTopContainerUnit, getUnitManager, hasUnitListener, removeUnitListener, setBaseMass, setContainerUnit, 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.core.malfunction.Malfunctionable |
|---|
getInventory, getName |
| Field Detail |
|---|
public static final double LIFE_SUPPORT_RANGE_ERROR_MARGIN
| Constructor Detail |
|---|
public Rover(String name,
String description,
Settlement settlement)
name - the name of the roverdescription - the configuration description of the vehicle.settlement - the settlement the rover is parked at
Exception - if rover could not be constructed.| Method Detail |
|---|
public void setTowedVehicle(Vehicle towedVehicle)
setTowedVehicle in interface TowingtowedVehicle - the vehicle being towed.public Vehicle getTowedVehicle()
getTowedVehicle in interface Towingpublic int getCrewCapacity()
getCrewCapacity in interface Crewablepublic int getCrewNum()
getCrewNum in interface Crewablepublic Collection<Person> getCrew()
getCrew in interface Crewablepublic boolean isCrewmember(Person person)
isCrewmember in interface Crewableperson - the person to check
public boolean lifeSupportCheck()
lifeSupportCheck in interface LifeSupportException - if error checking life support.public int getLifeSupportCapacity()
getLifeSupportCapacity in interface LifeSupportpublic double provideOxygen(double amountRequested)
provideOxygen in interface LifeSupportamountRequested - the amount of oxygen requested from system (kg)
Exception - if error providing oxygen.public double provideWater(double amountRequested)
provideWater in interface LifeSupportamountRequested - the amount of water requested from system (kg)
Exception - if error providing water.public double getAirPressure()
getAirPressure in interface LifeSupportpublic double getTemperature()
getTemperature in interface LifeSupportpublic Airlock getAirlock()
getAirlock in interface Airlockablepublic void timePassing(double time)
timePassing in class Vehicletime - the amount of time passing (in millisols)
exception - if error during time.public Collection<Person> getAffectedPeople()
getAffectedPeople in interface MalfunctionablegetAffectedPeople in class Vehiclepublic boolean hasLab()
public Lab getLab()
public boolean hasSickBay()
public SickBay getSickBay()
getSickBay in interface Medicalpublic boolean isAppropriateOperator(VehicleOperator operator)
isAppropriateOperator in class Vehicleoperator - the operator to check
public AmountResource getFuelType()
getFuelType in class Vehiclepublic void setCoordinates(Coordinates newLocation)
setCoordinates in class UnitnewLocation - the new location of the unitpublic double getRange()
getRange in class VehicleException - if error getting range.
public void setParkedLocation(double xLocation,
double yLocation,
double facing)
Vehicle
setParkedLocation in class VehiclexLocation - the x location (meters from settlement center - West: positive, East: negative).yLocation - the y location (meters from settlement center - North: positive, South: negative).facing - (degrees from North clockwise).public void destroy()
Unit
destroy in class Vehicle
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||