Detailed Description

This is the base class for submarines defined in python. Submarines are the main actors in the world. Specialized submarines are defined in python. Therefore its behavior is very different. All submarines have the same equipment and the same types of weapons on bord. They are identically except its length. The length must be given in the constructor and must be in range [30, 110] m. The power of engines and the capacity of the weapon batteries is depend on the submarine length. Larger submarines have more powerful engines and a higher capacity of the weapon batteries. But larger submarines can be better hit and detected by sonar than smaller ones. Smaller ones are a bit faster in controlling rotation and position.
Submarines are equipped with:

Engines:

MainEngine: This engine is mounted at the back and is directed toward the front. Its function to let the submarin move forward or backward. Its direction can be changed within a range. The power is (depend on length ):

BuoyancyTank: This "engine" is mounted in the center and is directed up. Its function to let the submarin move up or down. The power is (depend on length ):

BowJetOar: This engine is mounted at the front and is directed to the right. Its function to let the submarin rotate leftside or rightside. The power is (depend on length ):

InclinationJetOar: This engine is mounted at the front and is directed up. Its function to let the submarin rotate upward or downward. The power is (depend on length ):

AxialInclinationJetOar: This engine is mounted at the middle top and is directed to the right. Its function to let the submarin rotate about his main axis. The power is (depend on length ):

Sensors:

ActiveSonar: This specialized active sonar is mounted in the center. The default scanning behavior is rotate horizontally. It scanning behavior can be defined.

PassiveSonar: This specialized passive sonar is mounted in the center. The default scanning behavior is rotate horizontally. It scanning behavior can be defined.

This method must be overriden in the specialized class. This methode is called periodically about every 10ms. The main function should be checking sensors, seting up commands or something like that. The specialized class can implement everything here, but the execution time must not exceed 6ms in average. If it does the object will be kicked from the world!

This method must be overriden in the specialized class. This methode is called if an event has been received by the object that should be processed. Returning true reports the eventmanager that the event passed to the object has successfully processed and delete it. When returning false the event will be delivered the next time again until it expires or processed successfully. The main function should be reacting to events e.g. seting up commands or something like that. The specialized class can implement everything here, but the execution time must not exceed 6ms in average. If it does the object will be kicked from the world!

Parameters:

pEvent

The incoming event that should be processed.

Returns:

True if the incoming event has been successfully processed. When returning false the event will be delivered next time again.

Returns the command processor. The behavior is like in real life your 1st commander. You (the captain) makes a list of commands that must be done. This list is given to the commander. He cares about the correct execution. Ones you give him the list of commands you are able to do other things while your commander do the execution.