<s> def TestSalinity ( ) : <EOL> """<STR_LIT:U+0020>""" <EOL> storing . Store . Clear ( ) <EOL> doing . Doer . Clear ( ) <EOL> store = storing . Store ( name = '<STR_LIT>' ) <EOL> print ( "<STR_LIT>" ) <EOL> sim = SalinitySensorSimulator ( name = '<STR_LIT>' , store = store , <EOL> group = '<STR_LIT>' , output = '<STR_LIT>' , <EOL> input = '<STR_LIT>' , <EOL> parms = dict ( track = <NUM_LIT> , north = <NUM_LIT:0.0> , east = <NUM_LIT:0.0> , <EOL> middle = <NUM_LIT> , spread = <NUM_LIT> , rising = True , width = <NUM_LIT> ) ) <EOL> output = store . fetch ( '<STR_LIT>' ) . update ( salinity = <NUM_LIT> ) <EOL> store . expose ( ) <EOL> sim . _expose ( ) <EOL> for k in range ( <NUM_LIT:1> , <NUM_LIT:100> ) : <EOL> print ( "<STR_LIT>" ) <EOL> store . advanceStamp ( <NUM_LIT> ) <EOL> input = store . fetch ( '<STR_LIT>' ) . update ( north = k * - <NUM_LIT> , east = <NUM_LIT:0.0> ) <EOL> sim . update ( ) <EOL> sim . _expose ( ) <EOL> def TestMotion ( ) : <EOL> """<STR_LIT:U+0020>""" <EOL> storing . Store . Clear ( ) <EOL> doing . Doer . Clear ( ) <EOL> store = storing . Store ( name = '<STR_LIT>' ) <EOL> print ( "<STR_LIT>" ) <EOL> simulator = SimulatorMotionUuv ( name = '<STR_LIT>' , store = store , <EOL> group = '<STR_LIT>' , <EOL> speed = '<STR_LIT>' , speedRate = '<STR_LIT>' , <EOL> depth = '<STR_LIT>' , depthRate = '<STR_LIT>' , <EOL> pitch = '<STR_LIT>' , pitchRate = '<STR_LIT>' , <EOL> altitude = '<STR_LIT>' , <EOL> heading = '<STR_LIT>' , headingRate = '<STR_LIT>' , <EOL> position = '<STR_LIT>' , <EOL> rpm = '<STR_LIT>' , stern = '<STR_LIT>' , rudder = '<STR_LIT>' , <EOL> current = '<STR_LIT>' , bottom = '<STR_LIT>' , <EOL> prevPosition = '<STR_LIT>' , <EOL> parms = dict ( rpmLimit = <NUM_LIT> , sternLimit = <NUM_LIT> , rudderLimit = <NUM_LIT> , <EOL> gs = <NUM_LIT> , gpr = - <NUM_LIT:0.5> , ghr = - <NUM_LIT:0.5> ) ) <EOL> store . expose ( ) <EOL> rpm = store . fetch ( '<STR_LIT>' ) . update ( value = <NUM_LIT> ) <EOL> stern = store . fetch ( '<STR_LIT>' ) . update ( value = <NUM_LIT:0.0> ) <EOL> rudder = store . fetch ( '<STR_LIT>' ) . update ( value = <NUM_LIT:0.0> ) <EOL> current = store . fetch ( '<STR_LIT>' ) . update ( north = <NUM_LIT:0.0> , east = <NUM_LIT:0.0> ) <EOL> bottom = store . fetch ( '<STR_LIT>' ) . update ( value = <NUM_LIT> ) <EOL> prevPosition = store . fetch ( '<STR_LIT>' ) . update ( north = <NUM_LIT:0.0> , east = <NUM_LIT:0.0> ) <EOL> simulator . restart ( ) <EOL> simulator . _expose ( ) <EOL> store . advanceStamp ( <NUM_LIT> ) <EOL> simulator . update ( ) <EOL> simulator . _expose ( ) <EOL> def Test ( ) : <EOL> """<STR_LIT>""" <EOL> print ( "<STR_LIT>" ) <EOL> storing . Store . Clear ( ) <EOL> doing . Doer . Clear ( ) <EOL> store = storing . Store ( name = '<STR_LIT>' ) <EOL> store . expose ( ) <EOL> current = store . fetch ( '<STR_LIT>' ) . update ( north = <NUM_LIT:0.0> , east = <NUM_LIT:0.0> ) <EOL> bottom = store . fetch ( '<STR_LIT>' ) . update ( value = <NUM_LIT> ) <EOL> prevPosition = store . fetch ( '<STR_LIT>' ) . update ( north = <NUM_LIT:0.0> , east = <NUM_LIT:0.0> ) <EOL> headinggoal = store . fetch ( '<STR_LIT>' ) . update ( value = <NUM_LIT> ) <EOL> depthgoal = store . fetch ( '<STR_LIT>' ) . update ( value = <NUM_LIT> ) <EOL> speedgoal = store . fetch ( '<STR_LIT>' ) . update ( value = <NUM_LIT> ) <EOL> duration = <NUM_LIT> <EOL> simulatorMotionUuv . restart ( ) <EOL> controllerPidSpeed . _expose ( ) <EOL> controllerPidHeading . _expose ( ) <EOL> controllerPidDepth . _expose ( ) <EOL> controllerPidPitch . _expose ( ) <EOL> simulatorMotionUuv . _expose ( ) <EOL> while ( store . stamp <= duration ) : <EOL> print ( "<STR_LIT>" ) <EOL> controllerPidSpeed . action ( ) <EOL> controllerPidHeading . action ( ) <EOL> controllerPidDepth . action ( ) <EOL> controllerPidPitch . action ( ) <EOL> simulatorMotionUuv . action ( ) <EOL> simulatorMotionUuv . _expose ( ) <EOL> store . advanceStamp ( <NUM_LIT> ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> Test ( ) </s>
