![]() |
VR-Vantage 3.1 API Documentation
|
This class reads in ship dynamics/motion performance data from a configuration file. More...
Public Member Functions | |
| ssShipPerformance () | |
| Default Constructor. | |
| ~ssShipPerformance () | |
| Default Destructor. | |
| void | loadShipPerformanceData (const char *xmlFile) |
| Load the data that describes how all ships of all sizes respond to all sea states. | |
| void | getData (int natoSeaState, float beamLength, float lengthBetweenPerpendiculars, float &rollAmplitude, float &rollPeriod, float &pitchAmplitude, float &pitchPeriod) |
| Get the performance data for a ship of the passed in size under the passed in NATO sea state. | |
| void | writeSeaStateDatFile (const char *seaAndShip_output_file) |
| Dumps a flat file for plotting purposes, based on the XML input. | |
Private Attributes | |
| ssShipPerformanceImpl * | m_impl |
This class reads in ship dynamics/motion performance data from a configuration file.
This data contains unique data for different ship sizes under for different sea states. This class should be use to quarry ship performance data for the desired ships size under the desired sea state.
Note: This class does not currently do an interpolation and simply returns the data for the next larger ship size in its data for the specified sea state. This class could do linear interpolation between the two nearest sized ships based on specified ship size.
| ssShipPerformance::ssShipPerformance | ( | ) |
Default Constructor.
| ssShipPerformance::~ssShipPerformance | ( | ) |
Default Destructor.
| void ssShipPerformance::loadShipPerformanceData | ( | const char * | xmlFile | ) |
Load the data that describes how all ships of all sizes respond to all sea states.
| xmlFile | - relative path and name of the config xml file |
| void ssShipPerformance::getData | ( | int | natoSeaState, |
| float | beamLength, | ||
| float | lengthBetweenPerpendiculars, | ||
| float & | rollAmplitude, | ||
| float & | rollPeriod, | ||
| float & | pitchAmplitude, | ||
| float & | pitchPeriod | ||
| ) |
Get the performance data for a ship of the passed in size under the passed in NATO sea state.
NOTE: This get method could be improved by doing linear interpolation between the data elements that it has. Currently, it simply returns the data for the next larger ship it has data for.
| void ssShipPerformance::writeSeaStateDatFile | ( | const char * | seaAndShip_output_file | ) |
Dumps a flat file for plotting purposes, based on the XML input.
Assumes that the Sea State tags are ordered in ascending value. Note that loadDate must be called first.
| seaAndShip_output_file | - Output file name |
|
private |