org.mars_sim.msp.simulation.mars
Class SurfaceFeatures

java.lang.Object
  extended by org.mars_sim.msp.simulation.mars.SurfaceFeatures
All Implemented Interfaces:
java.io.Serializable

public class SurfaceFeatures
extends java.lang.Object
implements java.io.Serializable

SurfaceFeatures represents the surface terrain and landmarks of the virtual Mars.

See Also:
Serialized Form

Constructor Summary
SurfaceFeatures()
          Constructor
 
Method Summary
 ExploredLocation addExploredLocation(Coordinates location, java.util.Map<java.lang.String,java.lang.Double> estimatedMineralConcentrations, Settlement settlement)
          Adds an explored location.
 java.util.List<ExploredLocation> getExploredLocations()
          Gets a list of all explored locations on Mars.
 java.util.List getLandmarks()
          Gets a list of landmarks on Mars.
 MineralMap getMineralMap()
          Gets the mineral map.
 double getSurfaceSunlight(Coordinates location)
          Returns a float value representing the current sunlight conditions at a particular location.
 TerrainElevation getSurfaceTerrain()
          Returns the surface terrain
 boolean inDarkPolarRegion(Coordinates location)
          Returns true if location is in a dark polar region.
 void initializeTransientData()
          Initialize transient data in the simulation.
 boolean inPolarRegion(Coordinates location)
          Checks if location is within a polar region of Mars.
 void timePassing(double time)
          Time passing in the simulation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SurfaceFeatures

public SurfaceFeatures()
                throws java.lang.Exception
Constructor

Throws:
java.lang.Exception - when error in creating surface features.
Method Detail

initializeTransientData

public void initializeTransientData()
                             throws java.lang.Exception
Initialize transient data in the simulation.

Throws:
java.lang.Exception - if transient data could not be constructed.

getSurfaceTerrain

public TerrainElevation getSurfaceTerrain()
Returns the surface terrain

Returns:
surface terrain

getSurfaceSunlight

public double getSurfaceSunlight(Coordinates location)
Returns a float value representing the current sunlight conditions at a particular location.

Returns:
value from 0.0 - 1.0 0.0 represents night time darkness. 1.0 represents daylight. Values in between 0.0 and 1.0 represent twilight conditions.

inDarkPolarRegion

public boolean inDarkPolarRegion(Coordinates location)
Returns true if location is in a dark polar region. A dark polar region is where the sun doesn't rise in the current sol.

Returns:
true if location is in dark polar region

inPolarRegion

public boolean inPolarRegion(Coordinates location)
Checks if location is within a polar region of Mars.

Parameters:
location - the location to check.
Returns:
true if in polar region.

getLandmarks

public java.util.List getLandmarks()
Gets a list of landmarks on Mars.

Returns:
list of landmarks.

getMineralMap

public MineralMap getMineralMap()
Gets the mineral map.

Returns:
mineral map.

addExploredLocation

public ExploredLocation addExploredLocation(Coordinates location,
                                            java.util.Map<java.lang.String,java.lang.Double> estimatedMineralConcentrations,
                                            Settlement settlement)
Adds an explored location.

Parameters:
location - the location coordinates.
estimatedMineralConcentrations - a map of all mineral types and their estimated concentrations (0% -100%)
settlement - the settlement the exploring mission is from.
Returns:
the explored location

getExploredLocations

public java.util.List<ExploredLocation> getExploredLocations()
Gets a list of all explored locations on Mars.

Returns:
list of explored locations.

timePassing

public void timePassing(double time)
                 throws java.lang.Exception
Time passing in the simulation.

Parameters:
time - time in millisols
Throws:
java.lang.Exception - if error during time.