Commit 62f2b7a6 authored by marco-buttu's avatar marco-buttu
Browse files

All tests pass

parent a2a82c6d
Loading
Loading
Loading
Loading
+23 −3
Original line number Diff line number Diff line
*******************
Containers to start
*******************
- acsStartContainer -py AntennaBossSimContainer
- acsStartContainer -py DerotatorContainer
- acsStartContainer -py DerotatorPositionerContainer
Modify SRT/CDB/MACI/Components/ANTENNA/Boss/Boss.xml in the following way::

    <?xml version='1.0' encoding='ISO-8859-1'?>
    <Component xmlns="urn:schemas-cosylab-com:Component:1.0" 
               xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"
               xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  
        Name="Boss"
        Code="AntennaBossSim.AntennaBossSimImpl"
        Type="IDL:alma/Antenna/AntennaBoss:1.0"
        Container="AntennaBossSimContainer"
        Default="true"
        KeepAliveTime="-1"
        ImplLang="py"
    />

Run ACS and the three containers:: 

$ acsStart
$ acsStartContainer -py AntennaBossSimContainer
$ acsStartContainer -py DerotatorContainer
$ acsStartContainer -py DerotatorPositionerContainer

*****************************
Content of the test directory
+2 −1
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ class StartUpdatingTest(unittest.TestCase):
        # after prepare_negative_oor(), startUpdating() will cause oor
        self.positioner.startUpdating(MNG_TRACK, ANT_SOUTH, az, el, 0, 0)
        time.sleep(0.5)
        self.assertTrue(self.positioner.isRewindingRequired())
        steps = 2
        self.positioner.rewind(steps) 
        self.assertTrue(self.positioner.isUpdating())
@@ -309,7 +310,7 @@ class StartUpdatingTest(unittest.TestCase):
        #    -7.7330295207687838
        az = math.radians(170)
        el = math.radians(45)
        parallactic = PosGenerator.getParallacticAngle(self.lat, az, el) # -0.77
        parallactic = PosGenerator.getParallacticAngle(self.lat, az, el) # -7.7
        min_limit = self.device.getMinLimit() # -85.77 degrees for the K Band
        self.antenna.setOffsets(az, el, ANT_HORIZONTAL)
        target = Pis + parallactic 
+2 −3
Original line number Diff line number Diff line
@@ -62,8 +62,8 @@ class AntennaBossSimImpl(AntennaBoss, CI, Subsystem, CC, Services, Lcycle):
        
    def getApparentCoordinates(self, t):
        """Return (az, el, ra, dec) + (jepoch, lon, lat)"""
        coordinates = self.history.get(t) + (0, 0, 0)
        return tuple(coordinates)
        coordinates = tuple(self.history.get(t)) + (0, 0, 0)
        return coordinates

    def getRawCoordinates(self, t):
        """Return (az, el)"""
@@ -100,7 +100,6 @@ class History(object):
            self.history.append(data)
            self.history.sort(key=operator.itemgetter(0))
            self.history = self.history[-2**15:] # Last 2**15 positions
        # print 'position inserted in the history: ', position

    def clean(self, since=0):
        target_time = since if since else getTimeStamp().value