def readGust(self, data, n): """ GUST(1005,10,174) - the marker for Record 1 """ #print("reading GUST") nEntries = (len(data) - n) // 20 # 5*4 for i in range(nEntries): eData = data[n:n + 20] out = unpack('ii3f', eData) (sid, dload, wg, x0, V) = out gust = GUST(None, out) self.add_GUST(gust) n += 20 return n
def test_gust(self): """checks the GUST card""" sid = 100 dload = 200 wg = 50. x0 = 3. V = 42. gust = GUST(sid, dload, wg, x0, V, comment='gust load') gust.validate() gust.write_card() gust2 = GUST.add_card(BDFCard(['GUST', sid, dload, wg, x0, V]), comment='gust load') gust2.validate() gust2.write_card()
def readGust(self, data): """ GUST(1005,10,174) - the marker for Record 1 """ #print "reading GUST" n = 0 nEntries = len(data) // 20 # 5*4 for i in xrange(nEntries): eData = data[n:n + 20] out = unpack('iifff', eData) (sid, dload, wg, x0, V) = out gust = GUST(None, out) self.addGUST(gust) n += 20 ### data = data[n:]