|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mars_sim.msp.simulation.Unit
org.mars_sim.msp.simulation.vehicle.Vehicle
org.mars_sim.msp.simulation.vehicle.GroundVehicle
org.mars_sim.msp.simulation.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.simulation.vehicle.GroundVehicle |
---|
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 |
Fields inherited from interface org.mars_sim.msp.simulation.vehicle.Crewable |
---|
CREW_CAPACITY_EVENT |
Constructor Summary | |
---|---|
Rover(java.lang.String name,
java.lang.String description,
Settlement settlement)
Constructs a Rover object at a given settlement |
Method Summary | |
---|---|
java.util.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. |
java.util.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 |
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.simulation.vehicle.GroundVehicle |
---|
getDriver, getElevation, getStatus, getTerrainGrade, getTerrainHandlingCapability, isStuck, setDriver, setElevation, setStuck, setTerrainHandlingCapability |
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, 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 |
---|
public static final double LIFE_SUPPORT_RANGE_ERROR_MARGIN
Constructor Detail |
---|
public Rover(java.lang.String name, java.lang.String description, Settlement settlement) throws java.lang.Exception
name
- the name of the roverdescription
- the configuration description of the vehicle.settlement
- the settlement the rover is parked at
java.lang.Exception
- if rover could not be constructed.Method Detail |
---|
public void setTowedVehicle(Vehicle towedVehicle)
setTowedVehicle
in interface Towing
towedVehicle
- the vehicle being towed.public Vehicle getTowedVehicle()
getTowedVehicle
in interface Towing
public int getCrewCapacity()
getCrewCapacity
in interface Crewable
public int getCrewNum()
getCrewNum
in interface Crewable
public java.util.Collection<Person> getCrew()
getCrew
in interface Crewable
public boolean isCrewmember(Person person)
isCrewmember
in interface Crewable
person
- the person to check
public boolean lifeSupportCheck() throws java.lang.Exception
lifeSupportCheck
in interface LifeSupport
java.lang.Exception
- if error checking life support.public int getLifeSupportCapacity()
getLifeSupportCapacity
in interface LifeSupport
public double provideOxygen(double amountRequested) throws java.lang.Exception
provideOxygen
in interface LifeSupport
amountRequested
- the amount of oxygen requested from system (kg)
java.lang.Exception
- if error providing oxygen.public double provideWater(double amountRequested) throws java.lang.Exception
provideWater
in interface LifeSupport
amountRequested
- the amount of water requested from system (kg)
java.lang.Exception
- if error providing water.public double getAirPressure()
getAirPressure
in interface LifeSupport
public double getTemperature()
getTemperature
in interface LifeSupport
public Airlock getAirlock()
getAirlock
in interface Airlockable
public void timePassing(double time) throws java.lang.Exception
timePassing
in class Vehicle
time
- the amount of time passing (in millisols)
exception
- if error during time.
java.lang.Exception
- if error during time.public java.util.Collection<Person> getAffectedPeople()
getAffectedPeople
in interface Malfunctionable
getAffectedPeople
in class Vehicle
public boolean hasLab()
public Lab getLab()
public boolean hasSickBay()
public SickBay getSickBay()
getSickBay
in interface Medical
public boolean isAppropriateOperator(VehicleOperator operator)
isAppropriateOperator
in class Vehicle
operator
- the operator to check
public AmountResource getFuelType()
getFuelType
in class Vehicle
public void setCoordinates(Coordinates newLocation)
setCoordinates
in class Unit
newLocation
- the new location of the unitpublic double getRange() throws java.lang.Exception
getRange
in class Vehicle
java.lang.Exception
- if error getting range.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |