jat.cm
Class FiniteBurnList

java.lang.Object
  extended by jat.cm.FiniteBurnList
All Implemented Interfaces:
java.io.Serializable

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

The FiniteBurnList.java Class provides a way to deal with a list of finite burns read from a file.

Version:
1.0
Author:
Dave Gaylor
See Also:
Serialized Form

Constructor Summary
FiniteBurnList()
          Constructor
FiniteBurnList(java.lang.String filename)
          Constructor
 
Method Summary
 double accel(int index)
          Returns the acceleration of the burn
 void add(FiniteBurn burn)
          Add a burn to the collection
 FiniteBurn get(int index)
          Get a FiniteBurn out of the collection
 boolean hasNext(int index)
          Returns whether there is more data
static void main(java.lang.String[] args)
           
 void readFromFile(java.lang.String file)
          Read the burn data from a tab-delimited ASCII text file.
static FiniteBurnList recover(java.lang.String filename)
          Recover a serialized FiniteBurnList File
 void sendToFile(java.lang.String file)
          Write the burn data out to tab-delimited ASCII text file.
 void serialize(java.lang.String filename)
          Write the burn data out to a FiniteBurn File
 int size()
          Return the size of the list
 double startTime(int index)
          Returns the start time of the burn
 double stopTime(int index)
          Returns the stop time of the burn
 VectorN unitVector(int index)
          Returns the thrust direction unit vector
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FiniteBurnList

public FiniteBurnList()
Constructor


FiniteBurnList

public FiniteBurnList(java.lang.String filename)
Constructor

Parameters:
filename - String containing directory and filename where the data resides
Method Detail

add

public void add(FiniteBurn burn)
Add a burn to the collection

Parameters:
burn - FiniteBurn object

get

public FiniteBurn get(int index)
Get a FiniteBurn out of the collection

Parameters:
index - Index of the measurement
Returns:
the FiniteBurn

size

public int size()
Return the size of the list

Returns:
the number of burns in the list

unitVector

public VectorN unitVector(int index)
Returns the thrust direction unit vector

Parameters:
index - int containing the burn index
Returns:
VectorN containing the thrust direction unit vector.

startTime

public double startTime(int index)
Returns the start time of the burn

Parameters:
index - int containing the burn index
Returns:
double containing the start time.

stopTime

public double stopTime(int index)
Returns the stop time of the burn

Parameters:
index - int containing the burn index
Returns:
double containing the stop time.

accel

public double accel(int index)
Returns the acceleration of the burn

Parameters:
index - int containing the burn index
Returns:
double containing time of the acceleration.

hasNext

public boolean hasNext(int index)
Returns whether there is more data

Parameters:
index - measurement index
Returns:
true if there is more data to be read

readFromFile

public void readFromFile(java.lang.String file)
Read the burn data from a tab-delimited ASCII text file.

Parameters:
file - filename and directory

sendToFile

public void sendToFile(java.lang.String file)
Write the burn data out to tab-delimited ASCII text file.

Parameters:
file - filename and directory

recover

public static FiniteBurnList recover(java.lang.String filename)
Recover a serialized FiniteBurnList File

Parameters:
filename - string containing the directory and filename.
Returns:
the trajectory

serialize

public void serialize(java.lang.String filename)
Write the burn data out to a FiniteBurn File

Parameters:
filename - string containing the directory and filename.

main

public static void main(java.lang.String[] args)