Tuesday, November 22, 2016

Recording Flights From MultiWii

We are using PyMultiwii to record data as we fly:

while(True):
    self.board.getData(MultiWii.RC) s = str(self.board.rcChannels['roll']) + ", " + str(self.board.rcChannels['pitch']) + ", " + str(self.board.rcChannels['yaw']) + ", " + str(self.board.rcChannels['throttle'])
    with open("data.txt", "a") as myfile:
        myfile.write(s + "\n")
    time.sleep(0.05)


We now have some data from a take-off at a frequency of 20Hz:

    [roll],[pitch],[yaw],[throttle]
  1501, 1503, 1511, 1331
  1501, 1503, 1511, 1339
  1501, 1503, 1511, 1347
  1501, 1503, 1511, 1359
  1501, 1503, 1511, 1367
  1501, 1503, 1511, 1371
  1501, 1503, 1511, 1384
  1501, 1503, 1511, 1390
  1501, 1503, 1511, 1397
  1501, 1503, 1511, 1411
  1501, 1503, 1511, 1431
  1501, 1503, 1511, 1439
  1501, 1503, 1511, 1447
  1501, 1503, 1511, 1456
  1501, 1503, 1511, 1462
  1501, 1503, 1511, 1465
  1501, 1503, 1511, 1468
  1501, 1503, 1511, 1478
  1501, 1503, 1511, 1478
  1501, 1503, 1511, 1478
  1501, 1503, 1511, 1481
  1501, 1503, 1511, 1487
  1501, 1503, 1511, 1490
  1501, 1503, 1511, 1490
  1501, 1503, 1511, 1490
  1501, 1503, 1511, 1490
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1511, 1492
  1501, 1503, 1509, 1492
  1501, 1503, 1496, 1492
  1501, 1503, 1484, 1492
  1501, 1503, 1467, 1492
  1501, 1503, 1445, 1492
  1501, 1503, 1425, 1492
  1501, 1503, 1417, 1492
  1501, 1503, 1415, 1492
  1501, 1503, 1404, 1494
  1501, 1503, 1399, 1500
  1501, 1503, 1394, 1505
  1501, 1503, 1394, 1505
  1501, 1503, 1394, 1505
  1501, 1503, 1401, 1509
  1501, 1503, 1408, 1515
  1501, 1503, 1408, 1517
  1501, 1503, 1408, 1517
  1501, 1503, 1408, 1517
  1501, 1503, 1408, 1517
  1501, 1503, 1408, 1517
  1501, 1503, 1408, 1517
  1501, 1503, 1408, 1517
  1501, 1503, 1408, 1517

This is a graph of the data for the 20 second:

Between two and four seconds, the yaw goes to 1800 which arms the copter, by the sixth second the throttle is at it's MINTHROTTLE, 1350, and we are increasing the throttle.  We take-off at about eight seconds.

This is the take-off in greater detail:

No comments:

Post a Comment