Example #1
0
    def get_PathSegment(self):
        '''
        Forms the calculates Straight path and Turn path into an ordered list of points
        If WPsEnded == 1 the only SWP is the starting point
        '''

        try:
            LS = OL.O_PosData(self.Straight.SubWP[0, 0],
                              self.Straight.SubWP[1, 0], float('NaN'),
                              float('NaN'))
            LF = OL.O_PosData(
                self.Straight.SubWP[0, len(self.Straight.SubWP) - 1],
                self.Straight.SubWP[1, len(self.Straight.SubWP) - 1],
                float('NaN'), float('NaN'))
            CS = OL.O_PosData(self.Path.TurnSWP[0, 0], self.Path.TurnSWP[1, 0],
                              float('NaN'), float('NaN'))
            CF = OL.O_PosData(
                self.Path.TurnSWP[0, len(self.Path.TurnSWP) - 1],
                self.Straight.SubWP[1,
                                    len(self.Path.TurnSWP) - 1], float('NaN'),
                float('NaN'))
            '''
            The Turn and Straight is received as a list of points.
            The method checks, whether the start or end point of the Straight is closer to the
            position of the Ship. If required, the order of the Straight is mirrored.
            '''
            if FL.Distance(self.Pos, LS) > FL.Distance(self.Pos, LF):
                line = numpy.fliplr(self.Straight.SubWP)
                LF = LS
            else:
                line = self.Straight.SubWP
            '''
            Then the method checks the relation of the Turn path Start and End points
            to the (new) End point of the Straight. If required, the Turn is mirrored as well.
            '''
            if FL.Distance(LF, CS) > FL.Distance(LF, CF):
                curve = numpy.fliplr(self.Path.TurnSWP)
            else:
                curve = self.Path.TurnSWP
        except:
            line = self.Straight.SubWP
            curve = self.Path.TurnSWP
        '''
        Last, the method joins the two ordered array of points to a single list of points
        '''
        self.SegmentCoords = numpy.append(line, curve, 1)
Example #2
0
    def Plan_LocalPath(self, PrevRange):
        '''
        Plans the local course over the next waypoint
        Contains a straight path and the required turn
        Outputs a list of SWP-s
        '''

        self.Current_SWP = self.SegmentCoords

        self.NextSWP_No = 0
        self.NextSWP_validity = 0

        gamma = 0
        i = 0

        while gamma <= 0 or gamma >= math.pi:

            i = i + 1
            '''Turning waypoint'''
            n = self.LastWP + 1 + i

            wpnum = len(self.Waypoints.get_WayPoints()[0])
            print(wpnum, n)

            try:

                if n + 1 >= wpnum:

                    Nm = self.Waypoints.get_SingleWayPoint(n - i)
                    Nt = self.Waypoints.get_SingleWayPoint(n)
                    Np = self.retpos

                else:

                    Nm = self.Waypoints.get_SingleWayPoint(n - i)
                    Nt = self.Waypoints.get_SingleWayPoint(n)
                    Np = self.Waypoints.get_SingleWayPoint(n + 1)

            except IndexError:

                return (-1)

            gamma = FL.CosLaw(Nm, Nt, Np)

        self.Path = OL.O_LocalPath(gamma, self.Sigma_max, self.Kappa_max)

        definition = 20
        self.Path.FitPath(definition / 4)
        self.Path.PositionPoly(Nm, Nt, Np)
        '''fitline'''
        Range = self.Path.get_Range()
        self.Straight = OL.O_StraightPath(Nt, Nm, Range, PrevRange)
        self.Straight.FitLine(0.07)

        return i
Example #3
0
 def get_Thera_r(self):
     '''
     Calculates the required heading
     '''
     Theta_r = FL.CosLaw(self.Pos.Extend_Zero(), self.Pos, self.NextSWP)
     '''
     The CosLaw function returns a positive angle
     If the ship must turn left, the X coordinate of the Next SWP < X coordinate of Ship
     In that case, Theta_r is in the negative angle-space, therefore must be negated
     '''
     if self.NextSWP.get_Pos_X() < self.Pos.get_Pos_X():
         Theta_r *= -1
     return Theta_r
Example #4
0
    def Control_Step(self):
        '''
        Outputs the calculated motor speeds based on the sensor inputs
        '''

        while 1:
            '''
            Gets the current destination point
            '''
            if self.WPsEnded == 0:

                if len(self.SegmentCoords) > 0 and self.NextSWP_No < len(
                        self.SegmentCoords[0]):
                    self.NextSWP = OL.O_PosData(
                        self.SegmentCoords[0, self.NextSWP_No],
                        self.SegmentCoords[1, self.NextSWP_No], float('NaN'),
                        float('NaN'))
                    if self.mark == 0:
                        plt.plot(self.NextSWP.get_Pos_X(),
                                 self.NextSWP.get_Pos_Y(),
                                 marker='o')
                        self.mark = 1

                else:
                    '''
                    If there is no current destination point, the method requests a new path
                    '''
                    self.LastWP = self.LastWP + 1

                    ret = self.Plan_LocalPath(self.Path.Range)
                    if ret == -1:
                        self.WPsEnded = 1
                        self.NextSWP_No = 100000

                        #self.NextSWP = self.Waypoints.get_SingleWayPoint(self.LastWP + 1)
                        self.NextSWP = self.retpos
                    self.get_PathSegment()

            else:
                self.NextSWP = self.retpos
            '''
            Calculation of the required heading
            and the current deviation from required heading
            '''

            Theta_r = self.get_Thera_r()
            delta = self.get_Delta(Theta_r)
            '''
            Checks the validity of the current destination point.
            If the Distance < FollowDistance the
            navigation procedure jumps to the next Sub-Waypoint
            '''
            valid = (FL.Distance(self.Pos, self.NextSWP) > self.FollowDistance)

            if valid == 0 and self.WPsEnded == 1:
                self.EndPath = 1
                break

            if valid == 1:
                break
            if self.WPsEnded == 0:
                self.NextSWP_No = self.NextSWP_No + 1
                self.mark = 0
        '''
        #############################################
        # RUN CONTROL ALGORITHM HERE
        '''

        Ref = numpy.matrix([[1], [self.x[1] - delta]])

        N = -self.F * self.x + self.N * Ref
        '''
        #############################################
        '''
        '''
        Results of the control step in the following format:
        Vertical(!) numpy Matrix(!)
        '''

        if self.EndPath == 0:
            return N
        else:
            return numpy.matrix([[0], [0]])
Example #5
0
import FunctionLibrary as fl
EC = 'Rs.{:.2f}'.format(400000)
ECT = '(Four lakh only)'
NW = '''Construction of C.C. Bath Ghat including changing room at BADABANDHA of KAUDIAMUNDA
'''
HA = 'out of 14 th C.F.C. (2016-17) head of account'
text = '''\n\tThis Estimate consists of two nos bath ghats with C.C.(1:3:6) metal concrete and C.C.(1:2:4) chips concrete wearing coat on the treads of the steps. The tank is full of water . It is to be dewatered by using a 10 HP diesel driven PUMP. The bed is filled up with slushy soil which is to be removed by manual labour
  '''
middle = '''\n\tThis estimate has been prepared based on Analysis of Rates 2006. Schedule of Rates - 2014 has been taken into Account.Prevailing Labour rateshave been taken into account at framing of the estimate.'''
conclusion = '''\n\tAll works will be executed as per guidance of engineer-in-charge.'''

if __name__ == "__main__":

    print('\n\tThis estimate amounting to', EC + ECT,
          'has been framed to meet the probable expenditure towards',
          NW + HA + text)

    print(middle)
    print(conclusion)
    print(fl.signature(0, '', 0, ''))
Example #6
0
    print('\n\t\t\t\t SECTION-B (Concrete Road)')
    print(it.items['efhs'])
    foundation = cl.Quantity([['cut-off walls', 2, l, 0.2, 0.2]])
    foundation.rate = 103.2
    foundation.volume()
    print(it.items['sand_fill'])
    sand_fill = cl.Quantity([['road subgrade', 1, l, 3.65 - .4, .05]])
    sand_fill.rate = 313.52
    sand_fill.volume()
    print(it.items['CC(1:3:6)'])
    metal_concrete = cl.Quantity([['cut-off walls', 2, l, 0.2, 0.25],
                                  ['sub-base concrete', 1, l, 3.65, 0.1]])
    metal_concrete.rate = 3700.47
    metal_concrete.volume()
    print(it.items['CC(1:2:4)'])
    chips_concrete = cl.Quantity([['crust of the road', 1, l, 3.65, 0.1]])
    chips_concrete.rate = 4814.96
    chips_concrete.volume()
    print(it.items['rscs_plinth'])
    cut_off = cl.Quantity([['outside cut-off', 2, l, 0.05 + .2],
                           ['inside cut-off', 2, l, 0.05]])
    cut_off.rate = 82.08
    cut_off.vArea()
    print('\nCost towards hire and running of plate vibrator')
    print('\n\t\t\t3.65 hour @ \u20B9 106.00/ hour = \u20B9 387.00')
    print('\n\t\t\tCess for welfare of labourers = \u20B9 3200.00')
    print('\n\t\t\tDepartmental contingency \u20B9 3200.00')
    print('\n\t\t\tDisplay board and photograph = \u20B9 1500.00')
    print('-' * 80)
    fl.signature(320000, 'three lakh twenty thousand only', 2, 'Baunsuni G.P.')
Example #7
0
import items as it
import ClassLibrary as cl
import FunctionLibrary as fl









if __name__ == "__main__":
    print ('Name of the Work:- Construction of cement concrete roadat Sankara Bartal Gully' )
    print('Estimated Cost:-Rs.1,00,000.00','\t\t','Head of Account:T.F.C.(15-16)' )
    print('-'*85)
    print(it.items['CC(1:2:4)'])
    road =cl.Quantity([['road',1,41.76,2.5,0.19]])
    road.rate=4760.71
    road.volume()
    print('Cess for labour welfare = Rs. 1,000.00\n')
    print('Work contingency = Rs. 1,000.00\n')
    print('Display Board and photograph = Rs.500.00\n')
    print('_'*85)
    print('Total estimated cost is limited to Rs.1,00,000.00\n')
    fl.signature(100000, 'Rupees one lakh only', 3, 'Sankara G.P.')
    
    
    
Example #8
0
 sand_fill.volume()
 print(it.items['CC(1:3:6)'])
 metal_concrete = cl.Quantity([['cut-off walls',2,82.5,0.2,0.25],
                               ['sub-base concrete',1,82.5,3.65,0.1]
                               ])
 metal_concrete.rate = 3647.57
 metal_concrete.volume()
 print(it.items['CC(1:2:4)'])
 chips_concrete = cl.Quantity([['crust of the road',1,82.5,3.65,0.1]])
 chips_concrete.rate =4760.71
 chips_concrete.volume()
 print(it.items['rscs_plinth'])
 cut_off = cl.Quantity([['outside cut-off',2,82.5,0.05+.2],
                        ['inside cut-off',2,82.5,0.05]])
 cut_off.rate = 82.08
 cut_off.vArea()
 print('\nCost towards hire and running of plate vibrator')
 print('\n\t\t\t12.04 hour @ \u20B9 106.00/ hour = \u20B9 1276.00')
 print('\n\t\t\tCess for welfare of labourers = \u20B9 3000.00')
 print('\n\t\t\tDepartmental contingency \u20B9 3000.00')
 print('\n\t\t\tDisplay board and photograph = \u20B9 2000.00')
 print('-'*80)
 fl.signature(3000,'Rupees three lakh only', 1, '')
 
 
 
 
 
 
 
  
Example #9
0
9  # coding=utf-8
# coding=utf-8
import FunctionLibrary as fl

print('''Excavation of foundation trench in hard soil including dressing
of sides and levelling of bed etc. complete.''')
print(fl.foundation(1), '\n')
#===============================================================================
# print ('''\nEarth work in hard soil including breaking of clods from 5 to 7cm
# in size and laying in layers not exceeding 30cm in height''')
# print (fl.foundation(2))
#===============================================================================

#===============================================================================
# print (fl.gradedconcrete(2))
#===============================================================================
print(fl.brickmasonry(2))
#===============================================================================
# print (fl.concrete(1))
# print (fl.concrete(2))
# print (fl.reinforcement())
# print (fl.rscs(3))
# print (fl.rscs(2))
# print (fl.rscs(4))
# print (fl.rscs(1))
#===============================================================================
#===============================================================================
# print(fl.rscs(6))
#===============================================================================
print(fl.plaster(6))
#===============================================================================
Example #10
0
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 22 11:57:30 2019

@author: 007
"""
import FunctionLibrary as fl
#from selenium import webdriver

print("Test Case 1:")
ResPath = fl.setup("TC1")
url = "http://www.facebook.com"
driver = fl.open_url("1", url, ResPath)
fl.click(driver, "2", "//*[@id='u_0_11']", ResPath)
fl.validateText(
    driver, "3", "Create an accout",
    "//*[@id='content']/div/div/div/div/div[2]/div[1]/div[1]/span", ResPath)
fl.wait("4", ResPath, 20)
#driver.get("http://www.facebook.com")
                         ['verandah side walls',2,2.1,0.25,1.5],
                         ['back side walls',4,2.35,0.25,1.5]])
 brick_ss.rate = 3274.35
 brick_ss.volume()
 print(it.items['bmfp'])
 brick_fp = cl.Quantity([['front verandah',1,3.65-0.5,0.25,1.10],
                         ['verandah sides',2,2.35,0.25,1.0],
                         ['hall entrnce',2,1.2,0.38,0.6]])
 brick_fp.rate=3241.35
 brick_fp.volume()
 print(it.items['20cp(1:4)'])
 grading = cl.Quantity([['roof slab top',1,11.3,3.95]])
 grading.rate = 140.20
 grading.hArea()
 print('\nCess for welfare of labourers = \u20B92,000.00')
 print('\nWork contingency = \u20B92,000.00')
 print('\nDisplay board and photograph = \u20B91,000.00')
 print('-'*80)
 print('Total estimated cost = \u20B92,14,063.00 limited to \u20B9 2,00,000.00')
 print('-'*80)
 fl.signature(200000, 'Two lakh rupees only', 1, '')
 
       
 
                           
 
 
 
 
 
           
Example #12
0
    print('-' * 80)
    print(it.items['efhs'])
    foundation = cl.Quantity([['cut-off walls', 2, l, 0.2, 0.2]])
    foundation.rate = 103.2
    foundation.volume()
    print(it.items['sand_fill'])
    sand_fill = cl.Quantity([['road subgrade', 1, l, 3.65 - .4, .05]])
    sand_fill.rate = 313.52
    sand_fill.volume()
    print(it.items['CC(1:3:6)'])
    metal_concrete = cl.Quantity([['cut-off walls', 2, l, 0.2, 0.25],
                                  ['sub-base concrete', 1, l, 3.65, 0.1]])
    metal_concrete.rate = 3700.47
    metal_concrete.volume()
    print(it.items['CC(1:2:4)'])
    chips_concrete = cl.Quantity([['crust of the road', 1, l, 3.65, 0.1]])
    chips_concrete.rate = 4814.96
    chips_concrete.volume()
    print(it.items['rscs_plinth'])
    cut_off = cl.Quantity([['outside cut-off', 2, l, 0.05 + .2],
                           ['inside cut-off', 2, l, 0.05]])
    cut_off.rate = 82.08
    cut_off.vArea()
    print('\nCost towards hire and running of plate vibrator')
    print('\n\t\t\t3.94 hour @ \u20B9 106.00/ hour = \u20B9 418.00')
    print('\n\t\t\tCess for welfare of labourers = \u20B9 1000.00')
    print('\n\t\t\tDepartmental contingency \u20B9 1000.00')
    print('\n\t\t\tDisplay board and photograph = \u20B9 1500.00')
    print('-' * 80)
    fl.signature(100000, 'one lakh  only', 1, '')
Example #13
0
 sand_fill.volume()
 print(it.items['CC(1:3:6)'])
 metal_concrete = cl.Quantity([['cut-off walls',2,37.5,0.2,0.25],
                               ['sub-base concrete',1,37.5,3.65,0.1]
                               ])
 metal_concrete.rate = 3700.47
 metal_concrete.volume()
 print(it.items['CC(1:2:4)'])
 chips_concrete = cl.Quantity([['crust of the road',1,37.5,3.65,0.1]])
 chips_concrete.rate =4814.96
 chips_concrete.volume()
 print(it.items['rscs_plinth'])
 cut_off = cl.Quantity([['outside cut-off',2,37.5,0.05+.2],
                        ['inside cut-off',2,37.5,0.05]])
 cut_off.rate = 82.08
 cut_off.vArea()
 print('\nCost towards hire and running of plate vibrator')
 print('\n\t\t\t5.48 hour @ \u20B9 106.00/ hour = \u20B9 581.00')
 print('\n\t\t\tCess for welfare of labourers = \u20B9 1390.00')
 print('\n\t\t\tDepartmental contingency \u20B9 1390.00')
 print('\n\t\t\tDisplay board and photograph = \u20B9 1500.00')
 print('-'*80)
 fl.signature(139000,'One lakh thirty nine thousand only', 3, 'Baunsuni G.P.')
 
 
 
 
 
 
 
  
Example #14
0
9# coding=utf-8
# coding=utf-8
import FunctionLibrary as fl
print ('''Excavation of foundation trench in hard soil including dressing
of sides and levelling of bed etc. complete.''')
print (fl.foundation(1),'\n')
#===============================================================================
# print ('''\nEarth work in hard soil including breaking of clods from 5 to 7cm
# in size and laying in layers not exceeding 30cm in height''')
# print (fl.foundation(2))
#===============================================================================

print (fl.gradedconcrete(2))
print(fl.brickmasonry(2))
print (fl.concrete(1))
#===============================================================================
# print (fl.concrete(2))
#===============================================================================
print (fl.reinforcement())
print (fl.rscs(3))
print (fl.rscs(2))
#===============================================================================
# print (fl.rscs(4))
#===============================================================================
print (fl.rscs(1))
#===============================================================================
# print(fl.rscs(6))
#===============================================================================
print (fl.plaster(5))
#===============================================================================
# print (fl.plaster(2))
    print(it.items['vitrified'])
    floor = cl.Quantity([['room',1,5.03,3.4],
                         ['verandah',1,5.03,2.01]])
    floor.rate=839.55
    floor.hArea()
    print(it.items['walltile'])
    dado = cl.Quantity([['total length',1,28-4*.25-3*.25,0.2]])
    dado.rate = 252.21
    dado.vArea()
    print('\nCost and conveyance of HYSD bar = 3.65q @ Rs. 4000.00 = Rs.14600.00\n')
    print('''Cost and conveyance glazed ceramic precast wall tile = 5.25sqm
    @ Rs. 387.00/sqm =Rs.2032.00 ''')
    print('Cost and conveyance of water proofing cement paint 43.5kg @ Rs.35.00 /kg = Rs.1523.00 ' )
    print('\nCost and conveyance of paint = 3.14l @ Rs. 193.00/l = Rs.606.00 ')
    print('\nCost and conveyance of primer = 1.35kg @ Rs. 116.00/kg = Rs.117.00')
    print('Provisional cost for Electrification = Rs.5000.00')
    print('\nProvisional cost for display board and photograph = Rs. 1000.00')
    print('\nCess for welfare of ;labourers= Rs.1600.00')
    print('='*85)
    print('\nTotal Estimated cost limited to Rs. 1,60,000.00\n')
    print(fl.signature(160000,'Rupees one lakh sixty thousand only',1,''))
    
    
    
    
    
    
    


Example #16
0
    )
    print('-' * 80)
    tcl = cl.Quantity([['long wall', 2, 8.55], ['short walls', 3, 3.65]])
    tcl.tcl()
    print(it.items['bmsscb'])
    brickmasonry = cl.Quantity([['alround wall', 1, 28.05, .38, 1.3],
                                ['columns   ', -8, 0.38, 0.38, 1.3]])
    brickmasonry.rate = 2967.79
    brickmasonry.volume()
    print(it.items['m20'])
    rcc = cl.Quantity([['R.C.C. plinth bend', 1, 28.05 - .38, 0.25, 0.25],
                       ['R.C.C. columns', 8, 0.38, 0.38, 0.25]])
    rcc.rate = 4308.24
    rcc.volume()
    print(it.items['hysd'])
    reinf = cl.Quantity([['column bars', 4 * 4, 3.65, .89],
                         ['plinth bend long', 2 * 4, 8.55 + .3, 0.89],
                         ['plinth bend short', 3 * 4, 3.95, 0.89],
                         ['stirrups', 150, 0.87, 0.395]])
    print(reinf.reinforcement()['y0'])
    print('\n\t\t\t\t\t1.75q @ \u20B9 4534.46 = \u20B9 7,935.00\n')
    print(it.items['rscs_plinth'])
    plinth_centering = cl.Quantity([['plinth bend', 2, 28.05 - .25, .25]])
    plinth_centering.rate = 82.08
    plinth_centering.vArea()
    print('Cess for welfare of labourers = \u20B9500.00')
    print('Display board and photograph = \u20B9500.00')
    print('Work contingency = \u20B9 500.00')
    print('-' * 80)
    fl.signature(50000, 'Fifty thousand only', 1, '')
                                
                                ['window chajjas',3,1.2,0.45]])
 slab_centering.rate = 305.67
 slab_centering.vArea()
 beam_centering = cl.Quantity([['columns',11*4,0.25,3.0+1.0],
                               ['beam',1,5.0,.75]])
 beam_centering.rate=463.09
 beam_centering.vArea()
 print(it.items['rscs_lintel'])
 lintel_centering = cl.Quantity([['sides of lintel bend',1,45.35-0.25,0.15],
                                 ['extra thickness in lintel beam',2,10.5+1.8*2+.5,0.1],
                                 ['bottoms of door1',2,1.2,0.25],
                                
                                 ['windows',4,0.9,0.25]
                                 ])
 lintel_centering.rate =195.11
 lintel_centering.vArea()
 print('\n\tProvisional cost towards Display Board and photograph = ','\u20B9{:.2f}'.format(5000),'\n')
 print('\t\t\t\tCess for welfare of labourers','= \u20B9{:.2f}'.format(5000),'\n')
 print('-'*80)
 print('Total estimated cost = \u20B9618168.00\nLimited to \u20B9500000.00')
 
 print('-'*80)
 fl.signature(500000, 'Five lakh only ', 2, '')
 
 
 
 
 
 
 
Example #18
0
    column = cl.Quantity([['columns', 4 * 4, 0.25, 4.2]])
    column.rate = 463.09
    column.vArea()
    print(it.items['bmss'])
    brick_ss = cl.Quantity([['hall walls long wall', 2, 6.1, 0.38, 1.5],
                            ['hall walls short walls', 2, 2.89, 0.38, 1.5],
                            ['verandah front wall', 2, 3.65 - .5, 1.5],
                            ['verandah side walls', 2, 2.1, 0.25, 1.5],
                            ['back side walls', 4, 2.35, 0.25, 1.5]])
    brick_ss.rate = 3274.35
    brick_ss.volume()
    print(it.items['bmfp'])
    brick_fp = cl.Quantity([['front verandah', 1, 3.65 - 0.5, 0.25, 1.10],
                            ['verandah sides', 2, 2.35, 0.25, 1.0],
                            ['hall entrnce', 2, 1.2, 0.38, 0.6]])
    brick_fp.rate = 3241.35
    brick_fp.volume()
    print(it.items['20cp(1:4)'])
    grading = cl.Quantity([['roof slab top', 1, 11.3, 3.95]])
    grading.rate = 140.20
    grading.hArea()
    print('\nCess for welfare of labourers = \u20B92,000.00')
    print('\nWork contingency = \u20B92,000.00')
    print('\nDisplay board and photograph = \u20B91,000.00')
    print('-' * 80)
    print(
        'Total estimated cost = \u20B92,14,063.00 limited to \u20B9 2,00,000.00'
    )
    print('-' * 80)
    fl.signature(200000, 'Two lakh rupees only', 1, '')
Example #19
0
                       ['kerbs',2,17.00,0.3,0.45],
                       ])
 concrete.rate=3700.47
 concrete.volume()
 chips_concrete= cl.Quantity([['smaller steps',18,4.5-0.75,0.6,0.1],
                              ['larger step 1',1,4.5,2.6,0.1],
                              ['larger step2',1,4.5-2*0.38,3.05,0.1]])
 chips_concrete.rate=4814.96
 chips_concrete.volume()
 sand_filling =cl.Quantity([['bottom of the steps',1,17.00-.76,4.5-0.76,0.45]])
 sand_filling.rate=313.52
 sand_filling.volume()
 print(it.items['rscs_walls'])
 centering=cl.Quantity([['walls both sides',2*2,17,0.45],
                        ['steps risers',20*2,4.5,0.15],
                        ['wearing coats',20,4.5,0.1],
                        ['kerbs',2*2,17.0,0.45]])
 centering.rate = 387.08
 centering.vArea()
 print(it.items['12cp(1:6)'])
 plaster=cl.Quantity([['risers of steps',20,4.5-.6,0.15],
                      ['kerb walls',4,17,0.45]])
 plaster.rate=85.22
 plaster.vArea()
 
 print('\t\t\tCess for welfare of labourers = \u20B92000.00')
 print('\t\t\tWork contiongency = \u20B92000.00')
 print('\t\t\tDisplay Board and photograph = \u20B92000.00')
 print('-'*80)
 fl.signature(200000, 'Two lakhs only',3 , 'Sankara G.P.')
 
Example #20
0
 print(it.items['rscs_slab'])
 slab_centering = cl.Quantity([['slab',1,9.55,9.25],
                                ['roof bend',1,54.0-3*0.25-4.25,.05],
                                ['chajjas',1,9.25,0.45],
                                ['store room shelves',3,4.25,0.45],
                                ['window chajjas',2,1.2,0.45]])
 slab_centering.rate = 305.67
 slab_centering.vArea()
 beam_centering = cl.Quantity([['columns',9*4,0.25,3.0+1.0],
                               ['beam',1,4.25,.55]])
 beam_centering.rate=463.09
 beam_centering.vArea()
 print(it.items['rscs_lintel'])
 lintel_centering = cl.Quantity([['sides of lintel bend',1,(9.25*2+4*4.25),0.15],
                                 ['bottoms of door1',1,1.2,0.25],
                                 ['bottoms of door2',2,0.9,0.25],
                                 ['windows',2,0.9,0.25],
                                 ['lintel beam',1*9+4.25*2,0.75]])
 lintel_centering.rate =195.11
 lintel_centering.vArea()
 print('\n\tProvisional cost towards Display Board and photograph = ','\u20B9{:.2f}'.format(5000),'\n')
 print('\t\t\t\tCess for welfare of labourers','= \u20B9{:.2f}'.format(5000),'\n')
 print('-'*80)
 fl.signature(500000, 'Five lakh only ', 2, '')
 
 
 
 
 
 
 
Example #21
0
    plaster20.rate = 121.98
    plaster20.vArea()
    print(it.items['20cp(1:4)'])
    grading = cl.Quantity([['roof part1', 1, 11.29, 4.23],
                           ['roof part2', 1, 9.06, 2.13]])
    grading.rate = 133.10
    grading.hArea()
    print(it.items['6cp(1:4)'])
    plaster6 = cl.Quantity([['chajjas1', 1, 6.1,
                             0.5], ['chajja2', 1, 3.93, 0.5],
                            ['chajja3', 3, 1.2, .5], ['chajja4', 1, 1.05, 0.5],
                            ['chajja5', 1, 2.01, 0.5],
                            ['beams', 2, 3.43, 0.75]])
    plaster6.rate = 88.88
    plaster6.vArea()
    print(
        '\nCost and conveyance of M.S. Doors and windows = 5.05q @\u20B96300.00/q = \u20B931815.00\n'
    )
    print('\t\t\tCess for welfare of labourers = 2250.00')
    #===========================================================================
    # print(it.items['paint'])
    # paint=cl.Quantity([['windows',4*2.75,0.9,1.33],
    #                            ['Door-1',1*2.25,1.2,2.1],
    #                            ['Door-2',2*2.25,0.9,2.1],
    #                            ['Door-3',3*2.25,0.75,2.1]])
    # paint.rate=78.86
    # paint.vArea()
    #===========================================================================
    print('-' * 80)
    fl.signature(225000, 'Two lakh twenty five thousands only', 1, '')
Example #22
0
    Theta = numpy.sum(states[1])
    Omega = numpy.sum(states[2])
    Alpha = numpy.sum(states[2] - prevstates[2]) / 0.1
    GPS_X = pos[0] + numpy.sum(2 * scipy.randn(1))
    GPS_Y = pos[1] + numpy.sum(2 * scipy.randn(1))
    Speed_X = math.sin(numpy.sum(states[1])) * numpy.sum(
        states[0]) + numpy.sum(0.01 * scipy.randn(1))
    Speed_Y = math.cos(numpy.sum(states[1])) * numpy.sum(
        states[0]) + numpy.sum(0.01 * scipy.randn(1))
    Acc_X = math.sin(numpy.sum(
        states[1])) * (numpy.sum(states[0]) - numpy.sum(prevstates[0])) / 0.1
    Acc_Y = math.cos(numpy.sum(
        states[1])) * (numpy.sum(states[0]) - numpy.sum(prevstates[0])) / 0.1

    Measured_Acc = OL.O_PosData(Acc_X, Acc_Y, 1, 1)
    BodyAcc = FL.NEDtoBody(Measured_Acc, OL.O_PosData(0, 0, 1, 1), Theta)
    measurement_matrix = numpy.transpose(
        numpy.matrix(
            numpy.array([[
                GPS_X,
                numpy.sum(states[0]), BodyAcc[0], GPS_Y, 0, BodyAcc[1], Theta,
                Omega, Alpha
            ], [1, 1, 0, 1, 1, 0, 1, 1, 1]])))
    AAUSHIP.ReadStates(measurement_matrix, motor)

    AAUSHIP.FtoM(motor)

    #print AAUSHIP.FtoM(motor)
    '''Logging'''
    thoughtpos = AAUSHIP.Pos.get_Pos()
    x3[i] = thoughtpos[0]
Example #23
0
    def ReadStates(self, input_m, input_f):
        '''
        Reads systems states from sensors (processed data)
        '''

        y = input_m[0, 0]
        xd = input_m[1, 0]
        xdd = input_m[2, 0]
        x = input_m[3, 0]
        yd = input_m[4, 0]
        ydd = input_m[5, 0]
        theta = input_m[6, 0]
        omega = input_m[7, 0]
        angacc = input_m[8, 0]

        Measured_Pos = OL.O_PosData(x, y, 1, 1)
        BodyXY = FL.NEDtoBody(Measured_Pos, self.Pos, theta)

        PathFrameXY = list([
            BodyXY[0] + numpy.sum(self.states[0]),
            BodyXY[1] + numpy.sum(self.states[1])
        ])

        Measured_Speed = OL.O_PosData(xd, yd, 1, 1)
        BodySpeed = FL.NEDtoBody(Measured_Speed, OL.O_PosData(0, 0, 1, 1),
                                 theta)
        '''
        Wn = numpy.matrix([[PathFrameXY[0]], [BodySpeed[0]], [BodyAcc[0]], [PathFrameXY[1]], [BodySpeed[1]], [BodyAcc[1]], [theta], [omega], [angacc]])
        '''
        Wn = numpy.matrix([[PathFrameXY[0]], [xd], [xdd], [BodyXY[1]], [0],
                           [ydd], [theta], [omega], [angacc]])
        # print numpy.transpose(Wn)
        #	print self.Pos

        prev_fx = numpy.sum(self.states[0])
        prev_fy = numpy.sum(self.states[1])
        '''Kalman'''

        Validity_matrix = input_m[:, 1]

        if input_m[0, 1] == 1:
            self.flip = -self.flip
            self.MP = [input_m[0][0], input_m[3][0], self.flip]

        self.states = self.Filter.FilterStep(input_f, Wn, Validity_matrix)
        # print self.states[0]
        # print self.states[1]
        self.Ts = 0.1
        self.v = numpy.sum(self.states[2])
        self.omega = numpy.sum(self.states[4])
        self.Theta = math.atan2(math.sin(numpy.sum(self.states[3])),
                                math.cos(numpy.sum(self.states[3])))

        self.x = numpy.matrix([[self.v], [self.Theta], [omega]])

        curpos = self.Pos.get_Pos()
        '''
        x_next = numpy.sum(self.Ts * self.v * math.sin(self.Theta) + curpos[0])
        y_next = numpy.sum(self.Ts * self.v * math.cos(self.Theta) + curpos[1])
        self.Pos = OL.O_PosData(x_next, y_next, math.cos(self.x[1]), math.sin(self.x[1]))
        
        0 Yd 1 Y 2 V 3 Th 4 Om
        '''

        V = numpy.sum(self.states[2])
        X = numpy.sum(self.states[0])
        Y = numpy.sum(self.states[1])
        Th = numpy.sum(self.states[3])
        self.Theta = math.atan2(math.sin(numpy.sum(self.states[3])),
                                math.cos(numpy.sum(self.states[3])))
        #self.Theta = theta
        Th = theta
        #self.states[1] = PathFrameXY[1]

        if numpy.sum(Validity_matrix[0]):
            self.correction = BodyXY[1]

            x_next = (
                (X - prev_fx) *
                math.sin(Th)) + curpos[0] + self.correction * math.cos(Th)
            y_next = (
                (X - prev_fx) *
                math.cos(Th)) + curpos[1] - self.correction * math.sin(Th)

        else:
            self.correction = 0

            x_next = ((X - prev_fx) * math.sin(Th)) + curpos[0]
            y_next = ((X - prev_fx) * math.cos(Th)) + curpos[1]
        #self.filterlog.write(str(float(self.Pos.get_Pos_X())) + ", " + str(float(self.Pos.get_Pos_Y())) + "\r\n")
        #print x_next, y_next
        #x_next = ((V * self.Ts) * math.sin(Th)) + curpos[0] + self.correction * 0.1* math.cos(Th)
        #y_next = ((V * self.Ts) * math.cos(Th)) + curpos[1] - self.correction * 0.1* math.sin(Th)
        #print('FX', x_next, 'FY', y_next, 'FV', numpy.sum(self.states[2]), 'FT', numpy.sum(self.states[3]), 'FO', numpy.sum(self.states[4]))
        self.log.write(
            str(x_next) + ', ' + str(y_next) + ', ' +
            str(numpy.sum(self.states[2])) + ', ' +
            str(numpy.sum(self.states[3])) + ', ' +
            str(numpy.sum(self.states[4])) + ", " + str(time.time()) + "\r\n")
        self.Pos = OL.O_PosData(x_next, y_next, math.cos(self.x[1]),
                                math.sin(self.x[1]))
Example #24
0
 print(it.items['rscs_beam'])
 slab = cl.Quantity([['beam', 1, 2.2, 0.55]])
 slab.rate = 462.1
 slab.hArea()
 print(it.items['paint'])
 paint = cl.Quantity([['grills 1', 2, 2.69, 2.5], ['grills 2', 1, 2.2,
                                                   2.5]])
 paint.rate = 106.74
 paint.vArea()
 print('\nProvisional cost for Electrification = ',
       '\u20B9{:.2f}'.format(11500))
 print('\nCess for welfare of labourers  = \u20B9 1000.00')
 print('\nDepartmental contingency  = \u20B9 1000.00')
 print('\nDisplay board and photograph  = \u20B9 1000.00')
 print('-' * 80)
 fl.signature(100000, 'Rupees one lakh only', 1, '')
 print('-' * 80)
 slab = cl.Quantity([['beam main', 5, 2.2 + .5 - .08, 0.89],
                     ['beam extra at top', 2, 1.5, 0.89],
                     ['beam stirrups', 18, 0.87, 0.395],
                     ['roof bend long', 2 * 4, 5.9 + .25 - .08, 0.62],
                     ['roof bend short', 2 * 4, 2.2 + .5 - .08, 0.62],
                     [
                         'roof bend stirrups ',
                         5.9 / 0.15 * 2 - 6 + 2.2 / .15 * 2, 0.87, 0.395
                     ], ['slab main1', 6, 2.7 + .5 + .3, 0.395],
                     ['slab main2', 6, 2.7 + 0.5 + .15 + 2.7 / 4, .395],
                     ['slab main3', 6, 2.7 + .5 + .45 + 2.7 / 4, 0.395],
                     ['slab main4', 6, 2.7 + .5 + .15 + 0.9, 0.395],
                     ['slab main top', 24, 2.2 + .5 + .15, .395],
                     ['distribution long', 12, 7.2, 0.395],
Example #25
0
                            ['room door', 2.25, 1.08, 1.98],
                            ['room windows', 2 * 2.75, 0.69, 1.08],
                            ['room window 2', 2.75, 0.8, 0.85]])
    openings.rate = 83.33
    openings.vArea()
    print(it.items['vitrified'])
    floor = cl.Quantity([['room', 1, 5.03, 3.4], ['verandah', 1, 5.03, 2.01]])
    floor.rate = 839.55
    floor.hArea()
    print(it.items['walltile'])
    dado = cl.Quantity([['total length', 1, 28 - 4 * .25 - 3 * .25, 0.2]])
    dado.rate = 252.21
    dado.vArea()
    print(
        '\nCost and conveyance of HYSD bar = 3.65q @ Rs. 4000.00 = Rs.14600.00\n'
    )
    print('''Cost and conveyance glazed ceramic precast wall tile = 5.25sqm
    @ Rs. 387.00/sqm =Rs.2032.00 ''')
    print(
        'Cost and conveyance of water proofing cement paint 43.5kg @ Rs.35.00 /kg = Rs.1523.00 '
    )
    print('\nCost and conveyance of paint = 3.14l @ Rs. 193.00/l = Rs.606.00 ')
    print(
        '\nCost and conveyance of primer = 1.35kg @ Rs. 116.00/kg = Rs.117.00')
    print('Provisional cost for Electrification = Rs.5000.00')
    print('\nProvisional cost for display board and photograph = Rs. 1000.00')
    print('\nCess for welfare of ;labourers= Rs.1600.00')
    print('=' * 85)
    print('\nTotal Estimated cost limited to Rs. 1,60,000.00\n')
    print(fl.signature(160000, 'Rupees one lakh sixty thousand only', 1, ''))
Example #26
0
    cut_off = cl.Quantity([['outside cut-off', 1, 58, 0.05 + .14],
                           ['inside cut-off', 1, 58, 0.05]])
    cut_off.rate = 82.08
    cut_off.vArea()
    #===========================================================================
    # print(it.items['Earth_work_mechanical'])
    #===========================================================================
    #===========================================================================
    # reinforcement=cl.Quantity([['short bars',24,1.12,0.395],
    #                            ['long bars',8,3.58,.395]])
    # print(reinforcement.reinforcement()['y0'],reinforcement.reinforcement()['y1'])
    #===========================================================================
    #===========================================================================
    # ew=cl.Quantity([['both side of road',1,53.58,1.5,0.6]])
    # ew.rate=129.8
    # ew.volume()
    #===========================================================================
    #===========================================================================
    # print('Supplying and fixing of NP-3 type 0.30m dia R.C.C. hume pipe ')
    # print('\n\t\tCost =2.50m @ Rs.387.00/m Rs. 968.00')
    # print('\n\t\tConveyance=                    Rs. 500.00')
    # print('\n\t\tLabour charges for laying = Rs. 300.00')
    #===========================================================================
    print('\nCost towards hire and running of plate vibrator')
    print('\n\t\t\t3.47 hour @ \u20B9 106.00/ hour = \u20B9 368.00')
    print('\n\t\t\tCess for welfare of labourers = \u20B9 1000.00')
    print('\n\t\t\tDepartmental contingency \u20B9 1000.00')
    print('\n\t\t\tDisplay board and photograph = \u20B9 1500.00')
    print('-' * 80)
    fl.signature(100000, 'two lakh only', 2, 'Baunsuni G.P.')
Example #27
0
    def Plan_LocalPath(self, PrevRange):
        
        '''
        Plans the local course over the next waypoint
        Contains a straight path and the required turn
        Outputs a list of SWP-s
        '''
        
        self.Current_SWP = self.SegmentCoords;
            
        self.NextSWP_No = 0;
        self.NextSWP_validity = 0;
        
        gamma = 0;
        i = 0;
        
        while gamma <= 0 or gamma >= math.pi:
        
            i = i + 1;
            
            '''Turning waypoint''' 
            n = self.LastWP + 1 + i; 
            
            wpnum = len(self.Waypoints.get_WayPoints()[0])
            print (wpnum,n)
            
            try:
                
                if n+1 >= wpnum:
                    
                    Nm = self.Waypoints.get_SingleWayPoint(n - i);
                    Nt = self.Waypoints.get_SingleWayPoint(n);
                    Np = self.retpos;
                    
                elif n-i < 0:
                    
                    Nm = self.Pos
                    Nt = self.Waypoints.get_SingleWayPoint(n);
                    Np = self.Waypoints.get_SingleWayPoint(n + 1);
                    
                else:
                    
                    Nm = self.Waypoints.get_SingleWayPoint(n - i);
                    Nt = self.Waypoints.get_SingleWayPoint(n);
                    Np = self.Waypoints.get_SingleWayPoint(n + 1);
                
            except IndexError:
                #print 'szopo'
                return(-1);

            
            
            gamma = FL.CosLaw(Nm, Nt, Np);
            
        
        
        self.Path = OL.O_LocalPath(gamma, self.Sigma_max, self.Kappa_max);
        
        definition = 30;
        self.Path.FitPath(definition/8);
        self.Path.PositionPoly(Nm, Nt, Np);

        '''fitline'''
        Range = self.Path.get_Range();
        self.Straight = OL.O_StraightPath(Nt, Nm, Range, PrevRange);
        self.Straight.FitLine(definition);
        
        return i;
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 22 11:57:30 2019

@author: 007
"""
import FunctionLibrary as fl
import data
#from selenium import webdriver

print("Test Case 1:")
ResPath = fl.setup("TC1")
url = "http://www.facebook.com"
driver = fl.open_url("1", url, ResPath)
fl.click(driver, "2", "//*[@id='u_0_11']", ResPath)
fl.validateText(
    driver, "3", "Create an account",
    "//*[@id='content']/div/div/div/div/div[2]/div[1]/div[1]/span", ResPath)
fl.Dropdown(driver, "4", "Mar", "birthday_month", ResPath)
fl.ValDropdown(driver, "5", data.ls, "//*[@name='birthday_month']/option",
               ResPath)
fl.ValDropdown(driver, "6", data.date, "//*[@name='birthday_day']/option",
               ResPath)
fl.Dropdown(driver, "7", "4", "birthday_day", ResPath)
fl.wait(5, "8", ResPath)
fl.quit(driver, "9", ResPath)
print("End")
#driver.get("http://www.facebook.com")
Example #29
0
9  # coding=utf-8
# coding=utf-8
import FunctionLibrary as fl
import items as it
print('''Excavation of foundation trench in hard soil including dressing
of sides and levelling of bed etc. complete.''')
print(fl.foundation(1), '\n')
print(it.items['ewss'])
print(fl.foundation(2), '\n')
print('''\nEarth work in hard soil including breaking of clods from 5 to 7cm
in size and laying in layers not exceeding 30cm in height''')
print(fl.foundation(3))

#===============================================================================
# print (fl.gradedrcc(3))
# print(fl.gradedpcc(2))
# print(fl.brickmasonry(1))
#===============================================================================
print(fl.concrete(3))
print(fl.concrete(2))
# print (fl.reinforcement())
#===============================================================================
#===============================================================================
print(fl.rscs(6))
#===============================================================================
print(fl.rscs(3))
#===============================================================================
# print (fl.rscs(4))
# print (fl.rscs(1))
#===============================================================================
#===============================================================================
Example #30
0
    print('\t\t\t\t\t   2.60q @ \u20B94534.45.00/qtl = \u20B9 11790')
    print(it.items['rscs_plinth'])
    footing = cl.Quantity([
        ['footings', 2 * 4, 1.2, 0.3],
    ])
    footing.rate = 82.08
    footing.vArea()
    print(it.items['rscs_beam'])
    column = cl.Quantity([['columns', 2 * 4, 0.25, 4.5],
                          ['beam', 1, l - 0.25, 0.75],
                          ['short beams', 2, 2.0, 0.65]])
    column.rate = 462.1
    column.vArea()
    print(it.items['20cp(1:4)'])
    grading = cl.Quantity([['roof slab top', 1, l + 0.25 + .3, 2.25]])
    grading.rate = 140.56
    grading.hArea()
    print(it.items['asfloor'])
    floor = cl.Quantity([['floor of verandah', 1, 4.5, 2.18]])
    floor.rate = 202.39
    floor.hArea()
    print(it.items['12cp(1:6)'])
    wallplaster = cl.Quantity([['long wall', 1, 4.5, 0.6],
                               ['short walls', 2, 1.8, 0.6]])
    wallplaster.rate = 85.05
    wallplaster.vArea()
    print('\nCess for welfare of labourers = \u20B9500.00')
    print('\nDisplay board and photograph = \u20B9500.00')
    print('-' * 80)
    fl.signature(50000, 'fifty thousan only', 1, '')
Example #31
0
width and height has to be raised.An R.C.C. hume pipe culvert has to be
constructed as c.d. work.'''
middle = '''\n\tThis estimate has been prepared based on Analysis of Rates 2006.
Schedule of Rates - 2014 has been taken into Account.Prevailing Labour rates
have been taken into account at framing of the estimate.'''
conclusion = '''\n\tAll works will be executed as per guidance of engineer-in-charge.'''











if __name__ == "__main__":
    

    print('\n\tThis estimate amounting to',EC,ECT)
    print('has been framed to meet the probable expenditure towards')
    print(NW,HA)
    print (text)
    print(middle)
    print(conclusion)
    print(fl.signature(0,'',0,''))
    print('bcde')


Example #32
0
 slab = cl.Quantity([['beam',1,2.2,0.55]
                     
                     ])
 slab.rate = 462.1
 slab.hArea()
 print(it.items['paint'])
 paint =cl.Quantity([['grills 1',2,2.69,2.5],
                     ['grills 2',1,2.2,2.5]])
 paint.rate = 106.74
 paint.vArea()
 print('\nProvisional cost for Electrification = ','\u20B9{:.2f}'.format(11500))
 print('\nCess for welfare of labourers  = \u20B9 1000.00')
 print('\nDepartmental contingency  = \u20B9 1000.00')
 print('\nDisplay board and photograph  = \u20B9 1000.00')
 print('-'*80)
 fl.signature(100000, 'Rupees one lakh only', 1, '')
 print('-'*80)
 slab = cl.Quantity([['beam main',5,2.2+.5-.08,0.89],
                     ['beam extra at top',2,1.5,0.89],
                     ['beam stirrups',18,0.87,0.395],
                     ['roof bend long',2*4,5.9+.25-.08,0.62],
                     ['roof bend short',2*4,2.2+.5-.08,0.62],
                     ['roof bend stirrups ',5.9/0.15*2-6+2.2/.15*2,0.87,0.395],
                     ['slab main1',6,2.7+.5+.3,0.395],
                     ['slab main2',6,2.7+0.5+.15+2.7/4,.395],
                     ['slab main3',6,2.7+.5+.45+2.7/4,0.395],
                     ['slab main4',6,2.7+.5+.15+0.9,0.395],
                     ['slab main top',24,2.2+.5+.15,.395],
                     ['distribution long',12,7.2,0.395],
                     ['distribution short',30
                      ,2.2+.5+.15,0.395],
Example #33
0
    def ReadStates(self, input_m, input_f):
        '''
        Reads systems states from sensors (processed data)
        '''

        x = input_m[0, 0]
        xd = input_m[1, 0]
        xdd = input_m[2, 0]
        y = input_m[3, 0]
        yd = input_m[4, 0]
        ydd = input_m[5, 0]
        theta = input_m[6, 0]
        omega = input_m[7, 0]
        angacc = input_m[8, 0]

        Measured_Pos = OL.O_PosData(x, y, 1, 1)

        BodyXY = FL.NEDtoBody(Measured_Pos, self.Pos, theta)

        PathFrameXY = list([
            BodyXY[0] + numpy.sum(self.states[0]),
            BodyXY[1] + numpy.sum(self.states[1])
        ])

        Measured_Speed = OL.O_PosData(xd, yd, 1, 1)
        BodySpeed = FL.NEDtoBody(Measured_Speed, OL.O_PosData(0, 0, 1, 1),
                                 theta)
        '''
        Wn = numpy.matrix([[PathFrameXY[0]], [BodySpeed[0]], [BodyAcc[0]], [PathFrameXY[1]], [BodySpeed[1]], [BodyAcc[1]], [theta], [omega], [angacc]])
        '''
        Wn = numpy.matrix([[PathFrameXY[0]], [xd], [xdd], [BodyXY[1]], [0],
                           [ydd], [theta], [omega], [angacc]])
        #print Wn

        prev_fx = numpy.sum(self.states[0])
        prev_fy = numpy.sum(self.states[1])
        '''Kalman'''

        Validity_matrix = input_m[:, 1]
        self.states = self.Filter.FilterStep(input_f, Wn, Validity_matrix)

        self.Ts = 0.1
        self.v = numpy.sum(self.states[2])
        self.omega = numpy.sum(self.states[4])
        self.Theta = math.atan2(math.sin(numpy.sum(self.states[3])),
                                math.cos(numpy.sum(self.states[3])))

        self.x = numpy.matrix([[self.v], [self.Theta], [omega]])

        curpos = self.Pos.get_Pos()
        '''
        x_next = numpy.sum(self.Ts * self.v * math.sin(self.Theta) + curpos[0])
        y_next = numpy.sum(self.Ts * self.v * math.cos(self.Theta) + curpos[1])
        self.Pos = OL.O_PosData(x_next, y_next, math.cos(self.x[1]), math.sin(self.x[1]))
        
        0 Yd 1 Y 2 V 3 Th 4 Om
        '''

        V = numpy.sum(self.states[2])
        X = numpy.sum(self.states[0])
        Y = numpy.sum(self.states[1])
        Th = numpy.sum(self.states[3])
        self.Theta = math.atan2(math.sin(numpy.sum(self.states[3])),
                                math.cos(numpy.sum(self.states[3])))
        #self.Theta = theta
        Th = theta
        #self.states[1] = PathFrameXY[1]

        self.correction = Y

        x_next = (
            (X - prev_fx) *
            math.sin(Th)) + curpos[0] + self.correction * 0.005 * math.cos(Th)
        y_next = (
            (X - prev_fx) *
            math.cos(Th)) + curpos[1] - self.correction * 0.005 * math.sin(Th)
        #print x_next, y_next
        #x_next = ((V * self.Ts) * math.sin(Th)) + curpos[0] + self.correction * 0.1* math.cos(Th)
        #y_next = ((V * self.Ts) * math.cos(Th)) + curpos[1] - self.correction * 0.1* math.sin(Th)
        print('FX', x_next, 'FY', y_next, 'FV', numpy.sum(self.states[2]),
              'FT', numpy.sum(self.states[3]), 'FO', numpy.sum(self.states[4]))
        self.Pos = OL.O_PosData(x_next, y_next, math.cos(self.x[1]),
                                math.sin(self.x[1]))
Example #34
0
                       ['short beams',2,2.0,0.65]])
 column.rate=462.1
 column.vArea()
 print(it.items['20cp(1:4)'])
 grading=cl.Quantity([['roof slab top',1,l+0.25+.3,2.25]])
 grading.rate=140.56
 grading.hArea()
 print(it.items['asfloor'])
 floor = cl.Quantity([['floor of verandah',1,4.5,2.18]])
 floor.rate=202.39
 floor.hArea()
 print(it.items['12cp(1:6)'])
 wallplaster=cl.Quantity([['long wall',1,4.5,0.6],
                          ['short walls',2,1.8,0.6]])
 wallplaster.rate=85.05
 wallplaster.vArea()
 print('\nCess for welfare of labourers = \u20B9500.00')
 print('\nDisplay board and photograph = \u20B9500.00')
 print('-'*80)
 fl.signature(50000, 'fifty thousan only', 1, '')
 
 
 
 
 
 
 
 
 
 
 
Example #35
0

if __name__ == "__main__":
    print('Name of the Woprk:- Grade I metalling of the road from Bhikabahali to Sakma')
    print('Estimated Cost:-\u20B94,00,000.00\tHead of Account:- Biju K.B.K.(2014-15)')
    print('-'*80)
    print(it.items['subbase'])
    subbasemoorum = cl.Quantity([['sub-base of the road',1,l,3.65,0.1]])
    subbasemoorum.rate = 183.06
    subbasemoorum.volume()
    print(it.items['gradeI'])
    gradeImetalling = cl.Quantity([['GradeI metalling',1,l,3.65,0.1]])
    gradeImetalling.rate =347.26
    gradeImetalling.volume()
    print(it.items['moorumcollection'])
    subbasemoorum = cl.Quantity([['sub-base of the road',1,l,3.65,0.1],
                                 ['for filling of tnterstices in metalling',0.25,l,3.65,0.1]])
    subbasemoorum.rate = 233.9
    subbasemoorum.volume()
    print(it.items['metalcollection'])
    gradeImetalling = cl.Quantity([['GradeI metalling',1,l,3.65,0.1]])
    gradeImetalling.rate =936.3
    gradeImetalling.volume()
    
    print('Cess for welfare of labourers = \u20B94,000.00')
    #-------------------------------- print('Work contingency= \u20B9 4,000.00')
    print('Display Board and photograph = \u20B91,500.00')
    
    print('-'*80)
    fl.signature(400000, 'Four lakh only', 2, '')
Example #36
0
# coding=utf-8
# coding=utf-8
import FunctionLibrary as fl
#===============================================================================
print ('''Excavation of foundation trench in hard soil including dressing
of sides and levelling of bed etc. complete.''')
print (fl.foundation(1),'\n')
print ('''\nEarth work in hard soil including breaking of clods from 5 to 7cm
in size and laying in layers not exceeding 30cm in height''')
print (fl.foundation(2))

#===============================================================================
# print (fl.gradedconcrete(2))
#===============================================================================
print (fl.concrete(2))
print (fl.concrete(3))
#===============================================================================
# print (fl.reinforcement())
#===============================================================================
#===============================================================================
# print (fl.rscs(3))
# print (fl.rscs(2))
# print (fl.rscs(4))
# print (fl.rscs(1))
#===============================================================================
print(fl.rscs(6))
#===============================================================================
# print (fl.plaster(1))
#===============================================================================
#===============================================================================
# print (fl.plaster(2))