Skip to content

Instantly share code, notes, and snippets.

@joksim
Created September 2, 2021 05:33
Show Gist options
  • Save joksim/668db6b0129d4caf070a409d43c72796 to your computer and use it in GitHub Desktop.
Save joksim/668db6b0129d4caf070a409d43c72796 to your computer and use it in GitHub Desktop.
Excercise Jupyter Notebook : Sensors and actuators
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Сензори и актуатори"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Читање на сензорски податоци со Sensorstream IMU+GPS и сокети"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import socket, traceback\n",
"import time\n",
"import re"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Со следниот код се поставува сокетот кој ќе ги прима податоците од апликацијата. Бројот на портата треба да соодветствува на бројот на портата внесена во апликацијата во полето Edit Target Port."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"host = ''\n",
"port = 5555"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)\n",
"s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)\n",
"s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)\n",
"s.bind((host, port))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Со следната наредба се почнува примањето на сензорските податоци. Доколку се испраќаат податоци од апликацијата, тие се печатат на екранот. "
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"b'13821497.86193, 3, -0.101, 0.431, 9.991'\n",
"b'13821497.88194, 3, -0.119, 0.327, 9.363'\n",
"b'13821497.90192, 3, -0.060, 0.417, 9.996, 5, 1.090, 26.740,-47.400'\n",
"b'13821497.92193, 3, -0.080, 0.421, 9.977'\n",
"b'13821497.94196, 3, -0.059, 0.436, 9.974'\n",
"b'13821497.96193, 3, -0.068, 0.425, 10.021, 5, 1.120, 28.010,-48.310'\n",
"b'13821497.98193, 3, -0.068, 0.427, 9.977, 4, 0.008, -0.001, 0.001'\n",
"b'13821498.00197, 3, -0.073, 0.437, 9.975'\n",
"b'13821498.02193, 3, -0.062, 0.425, 9.963, 5, 0.800, 28.300,-47.000'\n",
"b'13821498.04192, 3, -0.057, 0.430, 10.026, 4, 0.005, -0.002, 0.002'\n",
"b'13821498.06193, 3, -0.087, 0.431, 9.979'\n",
"b'13821498.08195, 3, -0.101, 0.411, 9.962, 5, 0.200, 28.500,-47.400'\n",
"b'13821498.10193, 3, -0.086, 0.415, 9.978, 4, 0.005, -0.001, 0.000'\n",
"b'13821498.12196, 3, -0.066, 0.414, 10.014'\n",
"b'13821498.14196, 3, -0.097, 0.441, 10.009, 5, 0.200, 28.500,-47.400'\n",
"b'13821498.16192, 3, -0.093, 0.400, 10.003, 4, 0.006, 0.001, 0.003'\n",
"b'13821498.18192, 3, -0.090, 0.433, 10.001'\n",
"b'13821498.20196, 3, -0.096, 0.409, 9.978, 5, 0.100, 28.500,-47.300'\n",
"b'13821498.22193, 3, 0.002, 0.442, 10.138, 4, 0.008, 0.000, -0.001'\n",
"b'13821498.24199, 3, -0.090, 0.390, 9.884'\n",
"b'13821498.26196, 3, -0.073, 0.389, 9.867, 5, 0.100, 28.600,-47.100'\n",
"b'13821498.28192, 3, -0.121, 0.443, 9.965, 4, 0.006, 0.000, 0.001'\n",
"b'13821498.30194, 3, -0.150, 0.424, 9.967'\n",
"b'13821498.32192, 3, -0.104, 0.396, 9.944, 5, 0.100, 28.600,-47.200'\n",
"b'13821498.34193, 3, -0.083, 0.423, 9.980, 4, 0.013, 0.001, -0.003'\n",
"b'13821498.36200, 3, -0.057, 0.431, 10.084'\n",
"b'13821498.38196, 3, -0.044, 0.432, 10.047, 5, 0.100, 28.600,-47.200'\n",
"b'13821498.40197, 3, -0.068, 0.427, 9.987, 4, 0.010, -0.001, -0.001'\n",
"b'13821498.42193, 3, -0.073, 0.405, 9.991'\n",
"b'13821498.44196, 3, -0.090, 0.437, 9.975, 5, 0.100, 28.600,-47.100'\n",
"b'13821498.46193, 3, -0.083, 0.411, 9.995, 4, 0.011, -0.002, 0.004'\n",
"b'13821498.48192, 3, -0.123, 0.427, 9.935'\n",
"b'13821498.50195, 3, -0.077, 0.429, 10.307, 5, 0.100, 28.500,-47.200'\n",
"b'13821498.52193, 3, -0.150, 0.405, 10.148, 4, 0.014, -0.003, 0.002'\n",
"b'13821498.54193, 3, -0.130, 0.409, 9.979'\n",
"b'13821498.56197, 3, -0.096, 0.412, 9.951, 5, 0.200, 28.500,-47.100'\n",
"b'13821498.58196, 3, -0.079, 0.439, 9.896, 4, 0.018, -0.005, -0.004'\n",
"b'13821498.60199, 3, 0.004, 0.414, 10.234'\n",
"b'13821498.62197, 3, -0.108, 0.438, 10.208, 5, 0.200, 28.500,-47.200'\n",
"b'13821498.64193, 3, -0.124, 0.482, 10.495, 4, 0.036, -0.017, -0.001'\n",
"b'13821498.66196, 3, -0.110, 0.413, 9.943'\n",
"b'13821498.68196, 3, -0.104, 0.423, 9.872, 5, 0.200, 28.500,-47.200'\n",
"b'13821498.70194, 3, -0.053, 0.466, 10.003, 4, 0.006, -0.001, -0.006'\n",
"b'13821498.72193, 3, -0.071, 0.450, 9.963'\n",
"b'13821498.74193, 3, -0.044, 0.419, 9.960, 5, 0.200, 28.400,-47.200'\n",
"b'13821498.76197, 3, -0.029, 0.430, 10.008, 4, 0.011, -0.005, -0.001'\n",
"b'13821498.78197, 3, -0.048, 0.448, 10.019'\n",
"b'13821498.80198, 3, -0.053, 0.450, 9.974, 5, 0.200, 28.400,-47.300'\n",
"b'13821498.82197, 3, -0.079, 0.448, 10.009, 4, 0.013, -0.004, -0.001'\n",
"b'13821498.84197, 3, -0.014, 0.448, 9.993'\n",
"b'13821498.86197, 3, -0.105, 0.472, 9.998, 5, 0.200, 28.400,-47.300'\n",
"b'13821498.88196, 3, -0.133, 0.420, 9.985, 4, 0.007, -0.001, 0.004'\n",
"b'13821498.90198, 3, -0.086, 0.442, 9.995'\n",
"b'13821498.92193, 3, -0.062, 0.423, 9.971, 5, 0.200, 28.300,-47.300'\n",
"b'13821498.94196, 3, -0.056, 0.450, 10.003, 4, 0.008, -0.003, 0.001'\n",
"b'13821498.96197, 3, -0.059, 0.432, 9.997'\n",
"b'13821498.98198, 3, -0.084, 0.449, 10.010, 5, 0.200, 28.300,-47.300'\n",
"b'13821499.00197, 3, -0.075, 0.479, 9.996, 4, 0.010, -0.002, 0.000'\n",
"b'13821499.02193, 3, -0.066, 0.456, 10.014'\n",
"b'13821499.04197, 3, -0.083, 0.429, 10.002, 5, 0.200, 28.300,-47.400'\n",
"b'13821499.06196, 3, -0.102, 0.447, 9.997, 4, 0.003, -0.002, 0.003'\n",
"b'13821499.08197, 3, -0.084, 0.436, 9.986'\n",
"b'13821499.10193, 3, -0.059, 0.417, 9.985, 5, 0.100, 28.300,-47.400'\n",
"b'13821499.12197, 3, -0.062, 0.409, 9.951, 4, 0.004, -0.002, 0.004'\n",
"b'13821499.14200, 3, -0.109, 0.437, 9.977'\n",
"b'13821499.16196, 3, -0.097, 0.454, 9.997, 5, 0.000, 28.400,-47.600'\n",
"b'13821499.18200, 3, -0.054, 0.449, 10.019, 4, 0.008, -0.003, 0.002'\n",
"b'13821499.20201, 3, -0.083, 0.450, 9.999'\n",
"b'13821499.22200, 3, -0.065, 0.438, 9.987, 5, 0.000, 28.400,-47.500'\n",
"b'13821499.24200, 3, -0.060, 0.432, 9.978, 4, 0.007, -0.002, -0.000'\n",
"b'13821499.26199, 3, -0.075, 0.429, 9.975'\n",
"b'13821499.28200, 3, -0.077, 0.423, 9.998, 5, 0.000, 28.500,-47.400'\n",
"b'13821499.30194, 3, -0.078, 0.443, 9.993, 4, 0.007, -0.003, 0.002'\n",
"b'13821499.32195, 3, -0.089, 0.441, 9.979'\n",
"b'13821499.34194, 3, -0.073, 0.436, 9.993, 5, 0.000, 28.500,-47.400'\n",
"b'13821499.36201, 3, -0.089, 0.445, 10.008, 4, 0.006, -0.002, -0.001'\n",
"b'13821499.38200, 3, -0.060, 0.441, 10.011'\n",
"b'13821499.40201, 3, -0.068, 0.426, 9.981, 5, 0.000, 28.600,-47.400'\n",
"b'13821499.42194, 3, -0.065, 0.426, 9.985, 4, 0.006, -0.002, 0.002'\n",
"b'13821499.44194, 3, -0.073, 0.432, 9.983'\n",
"b'13821499.46200, 3, -0.097, 0.432, 9.963, 5, 0.000, 28.600,-47.600'\n",
"b'13821499.48200, 3, -0.092, 0.432, 9.981, 4, 0.010, -0.002, 0.002'\n",
"b'13821499.50196, 3, -0.090, 0.450, 9.996'\n",
"b'13821499.52194, 3, -0.085, 0.438, 9.985, 5, 0.000, 28.700,-47.600'\n",
"b'13821499.54194, 3, -0.073, 0.438, 9.985, 4, 0.009, -0.001, 0.002'\n",
"b'13821499.56200, 3, -0.065, 0.437, 9.995'\n",
"b'13821499.58198, 3, -0.060, 0.432, 9.987, 5, 0.000, 28.600,-47.700'\n",
"b'13821499.60193, 3, -0.056, 0.436, 9.983, 4, 0.003, -0.001, 0.002'\n",
"b'13821499.62193, 3, -0.071, 0.431, 9.980'\n",
"b'13821499.64196, 3, -0.089, 0.430, 9.963, 5, 0.000, 28.700,-47.800'\n",
"b'13821499.66192, 3, -0.096, 0.430, 9.979, 4, 0.003, -0.001, -0.001'\n",
"b'13821499.68195, 3, -0.087, 0.437, 9.985'\n",
"b'13821499.70196, 3, -0.085, 0.441, 10.008, 5, 0.000, 28.600,-47.800'\n",
"b'13821499.72197, 3, -0.066, 0.443, 9.991, 4, 0.001, -0.001, 0.001'\n",
"b'13821499.74196, 3, -0.054, 0.442, 9.987'\n",
"b'13821499.76200, 3, -0.063, 0.427, 9.989, 5, 0.100, 28.600,-47.700'\n",
"b'13821499.78195, 3, -0.069, 0.425, 10.005, 4, 0.003, -0.002, 0.001'\n",
"b'13821499.80194, 3, -0.083, 0.441, 9.986'\n",
"b'13821499.82196, 3, -0.103, 0.442, 9.977, 5, 0.000, 28.600,-47.800'\n",
"b'13821499.84200, 3, -0.101, 0.450, 9.998, 4, 0.004, -0.001, 0.000'\n",
"b'13821499.86195, 3, -0.074, 0.454, 9.971'\n",
"b'13821499.88201, 3, -0.083, 0.444, 10.023, 5, 0.000, 28.600,-47.900'\n",
"b'13821499.90200, 3, -0.059, 0.438, 9.955, 4, 0.004, -0.003, 0.000'\n",
"b'13821499.92196, 3, -0.068, 0.426, 9.934'\n",
"b'13821499.94201, 3, 0.025, 0.444, 10.125, 5, 0.000, 28.600,-47.900'\n",
"b'13821499.96201, 3, -0.019, 0.455, 10.056, 4, 0.004, -0.001, 0.002'\n",
"b'13821499.98200, 3, -0.119, 0.464, 10.015'\n",
"b'13821500.00200, 3, -0.080, 0.436, 9.137, 5, 0.100, 28.500,-47.900'\n",
"b'13821500.02210, 3, -0.093, 0.448, 9.974, 4, -0.010, 0.001, 0.001'\n",
"b'13821500.04200, 3, -0.086, 0.463, 9.996'\n",
"b'13821500.06201, 3, -0.086, 0.426, 9.963, 5, 0.100, 28.600,-47.700'\n",
"b'13821500.08200, 3, -0.134, 0.420, 9.934, 4, -0.001, -0.000, -0.000'\n",
"b'13821500.10200, 3, -0.014, 0.445, 10.118'\n",
"b'13821500.12201, 3, -0.114, 0.442, 9.957, 5, 0.100, 28.600,-47.700'\n",
"b'13821500.14200, 3, -0.074, 0.423, 9.955, 4, -0.009, -0.001, 0.001'\n",
"b'13821500.16201, 3, -0.097, 0.432, 9.978'\n",
"b'13821500.18201, 3, -0.025, 0.399, 10.336, 5, 0.000, 28.600,-47.600'\n",
"b'13821500.20200, 3, -0.121, 0.455, 10.093, 4, 0.008, -0.007, -0.003'\n",
"b'13821500.22202, 3, -0.135, 3.795, 9.989'\n",
"b'13821500.24194, 3, -0.959, 1.554, 9.922, 5, 0.000, 28.700,-47.500'\n",
"b'13821500.26200, 3, 0.417, -1.640, 9.922, 4, 0.010, -0.027, -0.347'\n",
"b'13821500.28194, 3, 1.076, -2.085, 10.051'\n",
"b'13821500.30194, 3, 0.638, -0.239, 9.977, 5, -0.100, 28.700,-47.600'\n",
"b'13821500.32194, 3, -0.731, 0.366, 9.892, 4, -0.008, -0.001, -0.097'\n",
"b'13821500.34200, 3, -2.433, 0.771, 10.052'\n",
"b'13821500.36194, 3, -3.865, -0.248, 10.637, 5, -0.100, 28.700,-47.600'\n",
"b'13821500.38201, 3, -3.698, 0.014, 12.420, 4, 0.110, -0.197, 1.055'\n",
"b'13821500.42195, 3, 4.005, 0.093, 10.472, 5, 0.000, 28.700,-47.500'\n",
"b'13821500.44200, 3, 2.219, 0.605, 10.418, 4, 0.515, -0.373, 1.973'\n",
"b'13821500.46200, 3, 1.052, 0.854, 13.722'\n",
"b'13821500.48202, 3, -1.046, -0.123, 16.615, 5, 0.300, 28.400,-47.600'\n",
"b'13821500.50195, 3, -1.407, 2.163, 15.546, 4, 1.814, -0.450, 1.474'\n",
"b'13821500.52195, 3, -2.561, 1.609, 15.631'\n",
"b'13821500.54194, 3, 0.866, -0.612, 12.975, 5, 1.569, 25.919,-48.740'\n",
"b'13821500.56197, 3, 11.127, 2.312, -3.719, 4, 4.306, 0.482, 3.158'\n",
"b'13821500.58199, 3, -3.300, 2.608, 10.709'\n",
"b'13821500.60193, 3, 2.702, 3.916, 7.181, 5, 4.870, 13.359,-53.144'\n",
"b'13821500.62194, 3, 0.020, 2.841, 11.021, 4, 1.934, -0.130, 1.197'\n",
"b'13821500.64199, 3, -0.728, 3.195, 8.238'\n",
"b'13821500.66199, 3, 2.373, 4.032, 6.442, 5, 4.922, 6.105,-54.820'\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"b'13821500.68199, 3, 3.415, 5.194, 7.086, 4, 1.713, 1.123, 1.388'\n",
"b'13821500.70199, 3, -0.334, 4.747, 5.413'\n",
"b'13821500.72197, 3, -0.054, 5.377, 4.277, 5, 7.523, 0.915,-55.422'\n",
"b'13821500.74200, 3, 1.110, 5.021, 5.663, 4, 0.275, -0.410, 0.106'\n",
"b'13821500.76193, 3, 2.270, 5.249, 7.563'\n",
"b'13821500.78193, 3, 0.400, 3.229, 9.615, 5, 7.672, 0.369,-54.991'\n",
"b'13821500.80196, 3, -0.852, 2.437, 7.930, 4, -0.818, -0.800, -0.016'\n",
"b'13821500.82192, 3, 3.417, 4.453, 7.360'\n",
"b'13821500.84196, 3, 3.072, 3.531, 10.238, 5, 6.010, 3.128,-53.909'\n",
"b'13821500.86192, 3, 3.111, 4.791, 10.762, 4, -1.213, 0.630, -0.039'\n",
"b'13821500.88196, 3, 1.202, 4.336, 8.009'\n",
"b'13821500.90192, 3, 1.441, 5.703, 7.414, 5, 10.945, 5.183,-55.004'\n",
"b'13821500.92192, 3, 1.067, 5.448, 8.944, 4, -0.824, 0.716, 0.012'\n",
"b'13821500.94199, 3, 1.294, 6.245, 9.863'\n",
"b'13821500.96200, 3, 1.074, 6.910, 9.196, 5, 13.259, 7.150,-54.429'\n",
"b'13821500.98200, 3, 0.389, 4.591, 9.270, 4, -0.406, 1.696, 0.246'\n",
"b'13821501.00200, 3, 0.804, 4.314, 10.511'\n",
"b'13821501.02200, 3, -0.117, 4.004, 11.376, 5, 14.166, 7.693,-54.432'\n",
"b'13821501.04201, 3, 0.426, 4.438, 9.657, 4, 0.081, -0.334, 0.772'\n",
"b'13821501.06200, 3, -0.972, 2.563, 10.449'\n",
"b'13821501.08201, 3, 0.527, 3.074, 12.388, 5, 15.675, 5.823,-53.186'\n",
"b'13821501.10200, 3, 0.906, 5.083, 11.450, 4, 0.678, 0.211, 0.780'\n",
"b'13821501.12201, 3, 0.769, 5.599, 10.217'\n",
"b'13821501.14195, 3, -0.206, 3.584, 10.485, 5, 13.976, 2.891,-55.600'\n",
"b'13821501.16194, 3, 0.199, 2.867, 9.919, 4, 1.497, -0.337, 1.425'\n",
"b'13821501.18194, 3, 1.358, 3.903, 12.192'\n",
"b'13821501.20200, 3, 1.458, 5.417, 9.588, 5, 13.544, -1.498,-54.133'\n",
"b'13821501.22201, 3, 1.499, 5.703, 6.470, 4, 1.442, -0.074, 2.175'\n",
"b'13821501.24200, 3, 2.480, 6.007, 7.649'\n",
"b'13821501.26200, 3, 2.986, 4.968, 7.971, 5, 12.213, -4.768,-54.131'\n",
"b'13821501.28200, 3, 4.100, 4.162, 8.548, 4, -0.273, -2.193, 3.193'\n",
"b'13821501.30201, 3, 4.896, 3.245, 9.281'\n",
"b'13821501.32201, 3, 5.041, 2.592, 7.542, 5, 3.967, -5.410,-55.141'\n",
"b'13821501.34195, 3, 6.736, 1.718, 5.118, 4, -0.254, -3.006, 4.434'\n",
"b'13821501.36194, 3, 6.201, -0.049, 5.064'\n",
"b'13821501.38194, 3, 7.936, -1.245, 4.535, 5, -6.535, -5.116,-55.651'\n",
"b'13821501.40194, 3, 8.553, -2.822, 4.096, 4, -0.948, -3.946, 6.232'\n",
"b'13821501.42200, 3, 8.587, -4.482, 3.345'\n",
"b'13821501.44195, 3, 11.353, -4.853, 3.438, 5, -21.465, 3.707,-51.358'\n",
"b'13821501.46200, 3, 11.928, -3.630, 3.845, 4, -0.932, -3.579, 6.712'\n",
"b'13821501.48200, 3, 10.382, -2.805, 3.673'\n",
"b'13821501.50194, 3, 9.278, -3.426, 3.807, 5, -25.505, 13.625,-46.583'\n",
"b'13821501.52200, 3, 10.064, -4.621, 3.863, 4, -1.366, -2.256, 5.062'\n",
"b'13821501.54201, 3, 9.576, -4.372, 3.694'\n",
"b'13821501.56201, 3, 7.246, -4.047, 3.545, 5, -25.935, 23.637,-42.599'\n",
"b'13821501.58202, 3, 6.877, -4.744, 3.306, 4, -0.398, -0.862, 2.717'\n",
"b'13821501.60196, 3, 7.296, -4.916, 2.545'\n",
"b'13821501.62195, 3, 6.208, -5.179, 1.866, 5, -25.506, 27.776,-41.015'\n",
"b'13821501.64194, 3, 4.922, -5.610, 2.297, 4, -0.066, -0.174, 1.205'\n",
"b'13821501.66194, 3, 5.727, -6.568, 2.884'\n",
"b'13821501.68205, 3, 6.478, -5.652, 1.651, 5, -23.742, 28.633,-42.144'\n",
"b'13821501.70200, 3, 5.428, -6.059, 1.199, 4, 0.130, -0.174, 0.416'\n",
"b'13821501.72194, 3, 4.197, -7.102, 1.711'\n",
"b'13821501.74195, 3, 3.424, -8.146, 1.984, 5, -25.370, 30.208,-41.235'\n",
"b'13821501.76194, 3, 4.658, -8.928, 1.380, 4, 0.251, -0.281, 0.403'\n",
"b'13821501.78201, 3, 5.871, -7.836, 0.269'\n",
"b'13821501.80201, 3, 5.671, -7.161, 0.089, 5, -24.618, 30.053,-40.322'\n",
"b'13821501.82195, 3, 4.483, -7.105, 0.709, 4, 0.345, -0.588, 0.540'\n",
"b'13821501.84195, 3, 3.498, -8.192, 1.403'\n",
"b'13821501.86194, 3, 4.270, -9.750, 0.972, 5, -25.980, 30.737,-41.542'\n",
"b'13821501.88200, 3, 5.104, -8.830, 0.520, 4, 0.447, -0.613, 0.968'\n",
"b'13821501.90199, 3, 4.623, -7.620, 0.608'\n",
"b'13821501.92193, 3, 3.513, -7.245, 1.525, 5, -21.836, 30.816,-42.662'\n",
"b'13821501.94198, 3, 2.650, -8.435, 2.334, 4, 0.354, -0.178, 1.166'\n",
"b'13821501.96194, 3, 3.721,-10.469, 1.866'\n",
"b'13821501.98196, 3, 4.571, -9.578, 1.134, 5, -22.251, 31.168,-42.359'\n",
"b'13821502.00192, 3, 4.701, -7.887, 1.234, 4, 1.291, -0.469, 1.899'\n",
"b'13821502.02197, 3, 3.549, -7.410, 3.597'\n",
"b'13821502.04196, 3, 4.815, -9.940, 3.630, 5, -19.929, 30.296,-44.979'\n",
"b'13821502.06199, 3, 5.533,-11.876, 1.982, 4, 1.750, 0.506, 1.240'\n",
"b'13821502.08196, 3, 5.021,-10.360, 0.359'\n",
"b'13821502.10196, 3, 4.165, -8.216, 0.971, 5, -19.584, 29.060,-45.661'\n",
"b'13821502.12192, 3, 3.073, -8.966, 2.549, 4, 0.986, -0.648, 1.053'\n",
"b'13821502.14197, 3, 2.453,-10.728, 3.026'\n",
"b'13821502.16193, 3, 1.476,-10.742, 2.201, 5, -19.417, 28.973,-45.950'\n",
"b'13821502.18201, 3, 1.384, -8.888, 1.636, 4, 0.518, -1.515, 1.455'\n",
"b'13821502.20200, 3, 1.393, -9.096, 2.181'\n",
"b'13821502.22200, 3, 0.868, -9.493, 2.227, 5, -19.513, 29.604,-45.637'\n",
"b'13821502.24195, 3, 0.763, -9.201, 2.306, 4, -0.550, -1.701, 1.639'\n",
"b'13821502.26200, 3, 0.991, -8.768, 3.001'\n",
"b'13821502.28194, 3, 0.894, -8.532, 3.655, 5, -20.525, 32.476,-43.890'\n",
"b'13821502.30194, 3, 0.241, -8.793, 3.985, 4, -0.721, -1.804, 1.322'\n",
"b'13821502.32200, 3, -0.366, -9.056, 3.990'\n",
"b'13821502.34195, 3, -0.496, -8.853, 3.801, 5, -20.839, 33.060,-41.874'\n",
"b'13821502.36194, 3, -0.607, -8.638, 3.175, 4, -0.021, -1.581, 0.847'\n",
"b'13821502.38194, 3, -0.091, -8.705, 2.626'\n",
"b'13821502.40194, 3, 0.247, -8.413, 2.339, 5, -21.242, 33.824,-40.727'\n",
"b'13821502.42200, 3, 0.376, -8.503, 2.164, 4, 0.130, -1.388, 0.165'\n",
"b'13821502.44195, 3, 1.098, -8.538, 2.077'\n",
"b'13821502.46195, 3, 2.920, -8.122, 2.312, 5, -23.773, 34.717,-38.638'\n",
"b'13821502.48200, 3, 5.543, -7.957, 3.072, 4, -0.211, -1.353, -1.503'\n",
"b'13821502.50200, 3, 7.797, -7.859, 3.798'\n",
"b'13821502.52273, 3, 8.496, -9.567, 4.448, 5, -30.488, 30.844,-36.498'\n",
"b'13821502.54201, 3, 8.399,-11.320, 4.034, 4, 0.623, 0.192, -6.242'\n",
"b'13821502.56195, 3, 7.766,-12.182, 3.937'\n",
"b'13821502.58194, 3, 6.913,-13.270, 5.170, 5, -39.104, 17.363,-36.817'\n",
"b'13821502.60193, 3, 7.968,-12.449, 5.158, 4, 2.096, 0.904, -8.412'\n",
"b'13821502.62199, 3, 9.234,-10.982, 4.541'\n",
"b'13821502.64194, 3, 9.440, -9.337, 4.991, 5, -38.107,-11.807,-38.741'\n",
"b'13821502.66194, 3, 8.121, -8.558, 5.557, 4, 3.167, 0.773, -7.973'\n",
"b'13821502.68194, 3, 9.080, -5.631, 3.772'\n",
"b'13821502.70194, 3, 9.538, -3.351, 2.860, 5, -26.411,-30.790,-37.616'\n",
"b'13821502.72194, 3, 9.567, -0.656, 3.102, 4, 3.806, 0.105, -6.401'\n",
"b'13821502.74196, 3, 9.934, 1.713, 4.199'\n",
"b'13821502.76201, 3, 11.527, 3.448, 5.035, 5, -6.452,-45.818,-28.959'\n",
"b'13821502.78195, 3, 9.479, 3.179, 6.331, 4, 2.472, 0.954, -6.339'\n",
"b'13821502.80200, 3, 7.530, 1.864, 6.833'\n",
"b'13821502.82201, 3, 4.544, 1.499, 5.101, 5, 11.656,-47.160,-21.980'\n",
"b'13821502.84201, 3, 1.906, 2.962, 3.445, 4, 3.779, 2.578, -7.382'\n",
"b'13821502.86201, 3, 1.004, 3.573, 3.452'\n",
"b'13821502.88194, 3, 0.735, 4.281, 2.695, 5, 35.258,-37.589, -5.516'\n",
"b'13821502.90202, 3, -0.060, 3.496, 2.307, 4, 3.937, 2.848, -6.628'\n",
"b'13821502.92200, 3, -3.948, 2.221, 1.536'\n",
"b'13821502.94201, 3, -5.486, 2.365, 0.014, 5, 43.875,-22.007, 5.597'\n",
"b'13821502.96201, 3, -5.286, 1.776, -1.790, 4, 4.255, 2.912, -6.597'\n",
"b'13821502.98201, 3, -6.962, 0.822, -1.915'\n",
"b'13821503.00200, 3, -8.223, -1.123, -2.479, 5, 45.673, 1.796, 15.096'\n",
"b'13821503.02200, 3, -9.535, -2.374, -3.412, 4, 4.253, 1.540, -5.778'\n",
"b'13821503.04200, 3, -9.349, -3.500, -5.644'\n",
"b'13821503.06197, 3, -10.036, -3.740, -6.382, 5, 42.362, 18.391, 13.888'\n",
"b'13821503.08197, 3, -9.287, -3.654, -6.214, 4, 4.089, 0.636, -3.595'\n",
"b'13821503.10196, 3, -8.120, -3.669, -6.161'\n",
"b'13821503.12196, 3, -6.175, -3.882, -5.291, 5, 36.275, 32.651, 11.109'\n",
"b'13821503.14195, 3, -6.970, -5.641, -7.089, 4, 3.218, 0.474, -2.915'\n",
"b'13821503.16193, 3, -8.106, -5.256, -7.869'\n",
"b'13821503.18192, 3, -8.813, -5.529, -7.694, 5, 30.306, 41.464, 4.979'\n",
"b'13821503.20195, 3, -8.056, -5.786, -6.603, 4, 1.508, 0.643, -3.012'\n",
"b'13821503.22196, 3, -8.449, -5.738, -6.568'\n",
"b'13821503.24195, 3, -11.038, -6.322, -5.261, 5, 21.044, 48.024, 1.828'\n",
"b'13821503.26195, 3, -11.054, -5.616, -4.099, 4, 0.716, 0.239, -2.065'\n",
"b'13821503.28199, 3, -9.333, -5.124, -3.989'\n",
"b'13821503.30199, 3, -8.086, -5.611, -5.179, 5, 15.178, 49.846, 0.849'\n",
"b'13821503.32200, 3, -8.329, -5.296, -6.257, 4, 0.990, 0.947, -0.528'\n",
"b'13821503.34200, 3, -6.563, -4.650, -5.769'\n",
"b'13821503.36201, 3, -5.549, -5.041, -5.472, 5, 15.472, 49.898, -0.954'\n",
"b'13821503.38201, 3, -5.531, -5.071, -5.806, 4, 0.991, 0.827, 0.177'\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"b'13821503.40201, 3, -5.407, -4.990, -5.631'\n",
"b'13821503.42201, 3, -6.308, -6.002, -5.533, 5, 14.929, 49.256, -5.170'\n",
"b'13821503.44201, 3, -6.159, -5.947, -5.063, 4, 0.846, 0.606, 0.240'\n",
"b'13821503.46202, 3, -5.412, -5.921, -4.575'\n",
"b'13821503.48200, 3, -5.309, -5.786, -4.196, 5, 16.308, 49.279, -4.510'\n",
"b'13821503.50194, 3, -5.958, -6.357, -4.343, 4, 0.751, 0.871, 0.525'\n",
"b'13821503.52201, 3, -5.624, -6.430, -4.193'\n",
"b'13821503.54200, 3, -5.588, -6.258, -4.040, 5, 18.203, 48.820, -5.920'\n",
"b'13821503.56200, 3, -5.799, -6.164, -4.366, 4, 1.084, 0.517, 0.987'\n",
"b'13821503.58200, 3, -6.640, -6.364, -4.849'\n",
"b'13821503.60200, 3, -7.058, -6.132, -4.942, 5, 18.987, 48.028, -8.483'\n",
"b'13821503.62201, 3, -6.950, -5.811, -4.360, 4, 0.802, 0.681, 1.136'\n",
"b'13821503.64201, 3, -7.031, -6.238, -3.602'\n",
"b'13821503.66201, 3, -7.472, -6.036, -3.384, 5, 22.194, 45.669, -9.054'\n",
"b'13821503.68200, 3, -7.198, -5.838, -3.239, 4, 0.912, 0.662, 1.313'\n",
"b'13821503.70201, 3, -7.672, -6.422, -3.251'\n",
"b'13821503.72202, 3, -7.501, -6.410, -3.371, 5, 23.749, 45.195, -8.958'\n",
"b'13821503.74201, 3, -7.138, -6.067, -3.808, 4, 1.160, 0.867, 1.436'\n",
"b'13821503.76201, 3, -7.420, -6.018, -3.827'\n",
"b'13821503.78201, 3, -7.230, -5.608, -3.463, 5, 26.656, 43.919,-12.183'\n",
"b'13821503.80200, 3, -6.317, -5.455, -2.755, 4, 1.036, 0.913, 1.522'\n",
"b'13821503.82200, 3, -6.363, -5.847, -2.520'\n",
"b'13821503.84195, 3, -7.605, -5.788, -2.879, 5, 28.335, 42.009,-14.725'\n",
"b'13821503.86201, 3, -8.381, -6.455, -3.202, 4, 1.332, 1.083, 0.921'\n",
"b'13821503.88194, 3, -8.043, -6.711, -3.196'\n",
"b'13821503.90194, 3, -6.552, -5.672, -3.025, 5, 31.638, 38.976,-17.394'\n",
"b'13821503.92194, 3, -6.224, -5.589, -2.883, 4, 1.455, 1.226, 1.337'\n",
"b'13821503.94194, 3, -6.543, -6.294, -2.777'\n",
"b'13821503.96194, 3, -6.950, -6.633, -3.111, 5, 34.270, 36.785,-18.896'\n",
"b'13821503.98194, 3, -6.376, -5.983, -3.133, 4, 1.622, 1.280, 0.942'\n",
"b'13821504.00194, 3, -6.525, -6.262, -3.262'\n",
"b'13821504.02194, 3, -6.789, -7.010, -3.305, 5, 33.580, 32.115,-12.732'\n",
"b'13821504.04194, 3, -6.506, -6.637, -3.697, 4, 1.695, 1.272, 1.031'\n",
"b'13821504.06196, 3, -6.626, -5.935, -4.234'\n",
"b'13821504.08195, 3, -8.440, -5.911, -4.198, 5, 36.179, 27.708,-15.015'\n",
"b'13821504.10200, 3, -9.682, -5.986, -4.088, 4, 1.490, 1.196, 1.361'\n",
"b'13821504.12200, 3, -10.020, -6.150, -5.058'\n",
"b'13821504.14194, 3, -9.577, -6.092, -6.467, 5, 41.046, 19.323,-14.218'\n",
"b'13821504.16195, 3, -9.679, -6.122, -8.635, 4, 1.066, 1.215, 2.633'\n",
"b'13821504.18200, 3, -11.447, -6.088, -9.504'\n",
"b'13821504.20200, 3, -12.977, -6.227,-10.107, 5, 44.832, 12.219,-10.461'\n",
"b'13821504.22198, 3, -15.200, -6.665,-10.001, 4, -0.717, 0.732, 3.317'\n",
"b'13821504.24197, 3, -16.401, -6.867, -9.766'\n",
"b'13821504.26198, 3, -16.843, -6.968, -9.385, 5, 49.011, -0.780, -6.561'\n",
"b'13821504.28196, 3, -16.297, -6.396, -7.602, 4, -2.350, 0.983, 5.371'\n",
"b'13821504.30195, 3, -14.966, -5.213, -7.551'\n",
"b'13821504.32192, 3, -13.276, -3.743, -6.676, 5, 45.966,-17.881, -2.947'\n",
"b'13821504.34195, 3, -10.521, -0.584, -5.326, 4, -1.962, -0.160, 7.546'\n",
"b'13821504.36196, 3, -8.520, 1.299, -7.142'\n",
"b'13821504.38197, 3, -7.762, 2.046, -9.784, 5, 31.020,-42.308, -4.893'\n",
"b'13821504.40196, 3, -5.848, 4.338, -9.766, 4, -0.546, -0.607, 7.306'\n",
"b'13821504.42201, 3, -2.806, 6.923, -7.010'\n",
"b'13821504.44200, 3, -4.499, 7.848, -5.707, 5, 13.886,-49.977, -7.233'\n",
"b'13821504.46201, 3, -7.762, 7.883, -5.359, 4, -0.982, -2.030, 4.875'\n",
"b'13821504.48200, 3, -7.596, 5.307, -5.199'\n",
"b'13821504.50194, 3, -5.270, 3.029, -4.588, 5, -5.872,-51.145,-11.445'\n",
"b'13821504.52201, 3, -2.273, 1.773, -3.293, 4, -0.900, -3.549, 6.216'\n",
"b'13821504.54200, 3, 0.266, 1.246, -4.816'\n",
"b'13821504.56201, 3, 1.648, 2.884, -5.532, 5, -26.000,-45.610, -9.632'\n",
"b'13821504.58200, 3, 2.970, 2.492, -2.679, 4, -0.785, -4.931, 6.951'\n",
"b'13821504.60201, 3, 2.229, 0.855, -0.509'\n",
"b'13821504.62201, 3, 3.928, 1.316, -1.427, 5, -45.594,-30.414, 0.399'\n",
"b'13821504.64200, 3, 5.564, 3.944, -4.131, 4, -0.540, -5.329, 6.359'\n",
"b'13821504.66200, 3, 8.146, 5.887, -1.359'\n",
"b'13821504.68200, 3, 7.157, 5.823, 0.858, 5, -48.216,-17.082, 10.833'\n",
"b'13821504.70200, 3, 7.181, 7.081, 0.277, 4, -1.823, -3.129, 3.025'\n",
"b'13821504.72200, 3, 7.047, 7.719, 1.178'\n",
"b'13821504.74194, 3, 7.694, 8.400, 2.354, 5, -48.857, -9.782, 17.530'\n",
"b'13821504.76204, 3, 6.947, 9.197, 2.136, 4, -0.763, -1.945, 0.912'\n",
"b'13821504.78201, 3, 5.859, 8.644, 0.879'\n",
"b'13821504.80194, 3, 3.585, 7.240, -1.459, 5, -47.012,-10.701, 21.502'\n",
"b'13821504.82200, 3, 1.876, 6.456, -3.175, 4, 0.869, -0.293, -1.056'\n",
"b'13821504.84200, 3, 0.565, 6.361, -3.536'\n",
"b'13821504.86195, 3, 0.715, 6.899, -4.112, 5, -45.444,-11.557, 21.225'\n",
"b'13821504.88201, 3, -0.066, 7.251, -3.706, 4, 1.040, -0.832, 0.102'\n",
"b'13821504.90201, 3, -1.755, 6.474, -3.411'\n",
"b'13821504.92201, 3, -2.330, 5.875, -3.278, 5, -45.586, -8.550, 24.754'\n",
"b'13821504.94197, 3, -2.380, 5.385, -3.139, 4, 1.318, -0.593, 1.540'\n",
"b'13821504.96206, 3, -1.209, 5.359, -3.308'\n",
"b'13821504.98197, 3, -0.348, 5.203, -3.395, 5, -45.088, 0.950, 26.573'\n",
"b'13821505.00194, 3, -0.758, 4.609, -3.462, 4, 2.324, -0.615, 3.235'\n",
"b'13821505.02194, 3, -1.533, 2.738, -4.058'\n",
"b'13821505.04194, 3, -1.660, 1.261, -4.532, 5, -43.802, 10.837, 25.996'\n",
"b'13821505.06194, 3, -0.310, 0.534, -5.522, 4, 3.227, -0.098, 4.271'\n",
"b'13821505.08193, 3, 0.182, -0.113, -6.433'\n",
"b'13821505.10194, 3, -0.104, -1.881, -6.523, 5, -37.262, 28.388, 24.031'\n",
"b'13821505.12192, 3, 0.400, -2.631, -6.314, 4, 3.554, -0.753, 5.059'\n",
"b'13821505.14196, 3, 0.296, -3.812, -6.674'\n",
"b'13821505.16197, 3, 2.037, -5.431, -6.167, 5, -28.135, 40.652, 18.647'\n",
"b'13821505.18197, 3, 2.520, -5.641, -7.362, 4, 4.159, -1.794, 5.348'\n",
"b'13821505.20197, 3, 1.887, -6.302, -7.728'\n",
"b'13821505.22197, 3, 1.213, -7.246, -7.257, 5, -12.340, 51.332, 8.130'\n",
"b'13821505.24197, 3, 0.436, -8.539, -7.265, 4, 3.672, -1.669, 3.588'\n",
"b'13821505.26201, 3, 0.934, -8.584, -6.798'\n",
"b'13821505.28195, 3, 1.058, -8.268, -4.618, 5, -3.603, 53.005, 0.383'\n",
"b'13821505.30200, 3, 0.790, -8.335, -3.578, 4, 2.620, -2.110, 2.336'\n",
"b'13821505.32200, 3, -0.266, -7.993, -4.033'\n",
"b'13821505.34201, 3, -1.454, -8.589, -3.719, 5, 1.556, 52.237,-10.776'\n",
"b'13821505.36201, 3, -1.265, -9.402, -0.943, 4, 2.117, -1.220, 0.753'\n",
"b'13821505.38199, 3, -0.704, -9.857, 0.916'\n",
"b'13821505.40193, 3, 0.693, -9.172, -0.991, 5, 2.937, 50.471,-15.374'\n",
"b'13821505.42193, 3, 1.756, -9.305, -2.520, 4, 2.741, -1.102, 0.065'\n",
"b'13821505.44196, 3, 2.185,-10.627, -1.381'\n",
"b'13821505.46192, 3, 1.028,-11.000, 0.402, 5, -0.927, 46.845,-23.635'\n",
"b'13821505.48192, 3, 1.311,-10.054, 0.034, 4, 2.175, -1.419, -1.340'\n",
"b'13821505.50196, 3, 3.451, -9.111, -0.427'\n",
"b'13821505.52196, 3, 7.075, -9.863, 3.385, 5, -7.189, 43.754,-25.866'\n",
"b'13821505.54197, 3, 8.835,-11.106, 6.395, 4, 1.684, -2.171, -2.292'\n",
"b'13821505.56197, 3, 9.558,-13.508, 6.604'\n",
"b'13821505.58199, 3, 11.617,-16.270, 5.833, 5, -19.456, 35.931,-28.160'\n",
"b'13821505.60194, 3, 14.674,-17.103, 6.335, 4, 3.213, -1.499, -5.660'\n",
"b'13821505.62200, 3, 15.342,-18.088, 8.193'\n",
"b'13821505.64200, 3, 15.039,-19.512, 8.714, 5, -30.215, 22.228,-31.647'\n",
"b'13821505.66200, 3, 16.040,-17.505, 9.108, 4, 3.309, -1.663, -7.747'\n",
"b'13821505.68200, 3, 16.358,-16.650, 10.563'\n",
"b'13821505.70194, 3, 15.627,-15.250, 11.439, 5, -42.297, -4.769,-32.696'\n",
"b'13821505.72194, 3, 14.311,-12.676, 11.304, 4, 3.695, -1.425, -8.332'\n",
"b'13821505.74200, 3, 12.543,-10.934, 10.815'\n",
"b'13821505.76200, 3, 12.967, -9.645, 8.861, 5, -36.744,-26.317,-24.608'\n",
"b'13821505.78195, 3, 12.450, -7.282, 6.868, 4, 4.846, -0.792, -7.531'\n",
"b'13821505.80194, 3, 11.910, -4.275, 5.533'\n",
"b'13821505.82201, 3, 8.940, -3.382, 5.942, 5, -17.633,-46.449,-11.687'\n",
"b'13821505.84201, 3, 7.233, -2.764, 6.124, 4, 4.230, -0.172, -7.261'\n",
"b'13821505.86201, 3, 5.754, -1.526, 4.750'\n",
"b'13821505.88195, 3, 4.356, 0.096, 2.778, 5, 2.744,-51.221, -1.494'\n",
"b'13821505.90194, 3, 3.250, 0.937, 0.455, 4, 4.325, -0.004, -5.392'\n",
"b'13821505.92200, 3, 1.991, 2.229, -0.830'\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"b'13821505.94194, 3, 0.670, 3.486, -1.377, 5, 20.511,-45.036, 10.322'\n",
"b'13821505.96195, 3, 0.530, 4.780, -1.516, 4, 2.690, -0.524, -3.368'\n",
"b'13821505.98194, 3, 1.968, 5.732, -0.084'\n",
"b'13821506.00194, 3, 2.168, 5.193, 0.290, 5, 27.410,-40.571, 15.610'\n",
"b'13821506.02193, 3, 1.804, 5.849, -0.180, 4, 2.062, -0.938, -2.481'\n",
"b'13821506.04194, 3, 2.330, 6.914, -0.899'\n",
"b'13821506.06194, 3, 1.506, 6.713, -1.437, 5, 35.470,-32.264, 16.981'\n",
"b'13821506.08196, 3, 0.897, 5.770, -1.173, 4, 2.577, -0.989, -2.997'\n",
"b'13821506.10194, 3, 0.549, 4.243, -0.946'\n",
"b'13821506.12194, 3, -1.138, 1.841, -1.761, 5, 39.802,-22.317, 20.709'\n",
"b'13821506.14194, 3, -3.262, 0.199, -4.482, 4, 3.556, -0.155, -3.772'\n",
"b'13821506.16195, 3, -6.644, -0.719, -9.594'\n",
"b'13821506.18202, 3, -8.282, -0.664,-10.997, 5, 45.141, -6.707, 24.357'\n",
"b'13821506.20200, 3, -8.493, -0.672, -9.704, 4, 2.385, -0.146, -1.927'\n",
"b'13821506.22200, 3, -8.217, -0.755, -8.369'\n",
"b'13821506.24201, 3, -7.518, -0.378, -8.149, 5, 48.004, -0.794, 23.516'\n",
"b'13821506.26200, 3, -7.268, 0.031, -9.881, 4, 0.792, -0.781, 0.750'\n",
"b'13821506.28194, 3, -7.417, 1.458, -9.744'\n",
"b'13821506.30194, 3, -6.841, 2.280, -9.054, 5, 49.486, -5.499, 19.005'\n",
"b'13821506.32200, 3, -6.053, 4.120, -8.444, 4, -0.281, -2.278, 2.681'\n",
"b'13821506.34201, 3, -5.721, 5.552, -9.783'\n",
"b'13821506.36201, 3, -7.086, 6.221,-10.189, 5, 51.112,-14.043, 12.089'\n",
"b'13821506.38196, 3, -8.387, 7.100, -8.744, 4, -1.015, -2.984, 2.909'\n",
"b'13821506.40200, 3, -9.225, 8.260, -7.177'\n",
"b'13821506.42200, 3, -9.920, 8.286, -6.655, 5, 48.603,-25.867, -0.550'\n",
"b'13821506.44200, 3, -9.729, 8.516, -5.424, 4, -1.459, -3.802, 3.996'\n",
"b'13821506.46200, 3, -8.851, 9.771, -4.138'\n",
"b'13821506.48202, 3, -9.354, 9.667, -3.734, 5, 40.103,-34.943,-10.129'\n",
"b'13821506.50201, 3, -11.945, 7.767, -5.082, 4, 0.138, -4.405, 5.103'\n",
"b'13821506.52200, 3, -13.691, 4.234, -7.295'\n",
"b'13821506.54195, 3, -13.563, 1.353, -9.404, 5, 19.825,-47.903,-18.924'\n",
"b'13821506.56197, 3, -11.503, 0.369,-11.356, 4, 1.219, -5.147, 8.605'\n",
"b'13821506.58199, 3, -9.443, -0.980,-11.662'\n",
"b'13821506.60196, 3, -6.164, -2.507, -9.236, 5, -21.536,-46.928,-15.900'\n",
"b'13821506.62192, 3, -2.971, -3.247, -7.847, 4, 0.121, -4.755, 11.686'\n",
"b'13821506.64193, 3, -0.377, -3.946, -7.900'\n",
"b'13821506.66192, 3, 3.387, -5.077, -7.447, 5, -48.208,-25.387, -8.253'\n",
"b'13821506.68197, 3, 6.401, -4.468, -6.382, 4, 0.223, -2.960, 12.416'\n",
"b'13821506.70193, 3, 7.339, -3.955, -3.972'\n",
"b'13821506.72193, 3, 7.647, -4.323, -2.853, 5, -55.923, 17.397, -2.594'\n",
"b'13821506.74200, 3, 8.341, -4.831, -2.545, 4, 0.986, -1.057, 10.346'\n",
"b'13821506.76201, 3, 9.376, -4.083, -0.903'\n",
"b'13821506.78201, 3, 9.947, -3.492, 0.988, 5, -42.774, 39.469, -4.194'\n",
"b'13821506.80200, 3, 9.838, -3.135, 1.311, 4, 2.364, 0.232, 6.235'\n",
"b'13821506.82200, 3, 9.990, -3.904, 1.038'\n",
"b'13821506.84201, 3, 10.602, -4.081, 1.672, 5, -33.535, 45.807,-16.496'\n",
"b'13821506.86201, 3, 9.322, -4.011, 3.220, 4, 3.272, 1.558, 0.677'\n",
"b'13821506.88196, 3, 9.230, -5.356, 3.705'\n",
"b'13821506.90199, 3, 11.168, -7.096, 3.105, 5, -33.315, 36.237,-26.539'\n",
"b'13821506.92200, 3, 14.274, -8.005, 2.325, 4, 4.187, 3.799, -4.156'\n",
"b'13821506.94200, 3, 16.573, -7.432, 3.862'\n",
"b'13821506.96201, 3, 18.323, -7.323, 5.914, 5, -29.959, 13.139,-40.493'\n",
"b'13821506.98198, 3, 20.415, -7.672, 7.391, 4, 4.720, 5.603, -8.375'\n",
"b'13821507.00195, 3, 21.724, -9.032, 8.314'\n",
"b'13821507.02200, 3, 18.958,-10.186, 7.140, 5, -15.777,-10.714,-46.073'\n",
"b'13821507.04196, 3, 17.022, -6.987, 3.595, 4, 6.837, 7.125,-10.862'\n",
"b'13821507.06194, 3, 13.925, -2.237, 1.233'\n",
"b'13821507.08194, 3, 8.819, 0.696, -0.134, 5, 18.823,-28.537,-38.586'\n",
"b'13821507.10195, 3, 3.122, 2.221, 0.666, 4, 4.731, 5.209, -9.899'\n",
"b'13821507.12193, 3, 0.205, 4.383, 0.362'\n",
"b'13821507.14192, 3, -3.974, 3.095, -1.547, 5, 40.888,-22.945,-26.630'\n",
"b'13821507.16201, 3, -8.717, 3.059, -3.318, 4, 1.762, 4.675, -7.708'\n",
"b'13821507.18194, 3, -13.354, 3.881, -2.665'\n",
"b'13821507.20201, 3, -14.084, 4.472, -0.500, 5, 49.585, -3.762,-14.338'\n",
"b'13821507.22196, 3, -12.540, 5.155, 14.305, 4, -1.351, 1.849, -3.033'\n",
"b'13821507.24194, 3, -10.895, 5.747, 11.129'\n",
"b'13821507.26194, 3, -9.890, 6.554, 3.715, 5, 49.165, -1.092,-15.253'\n",
"b'13821507.28200, 3, -8.132, 8.169, -3.372, 4, 1.743, -1.909, 1.343'\n",
"b'13821507.30195, 3, -5.605, 8.935, 0.341'\n",
"b'13821507.32201, 3, -5.254, 7.732, 3.883, 5, 46.636, -5.504,-20.457'\n",
"b'13821507.34199, 3, -6.449, 5.831, 5.529, 4, -2.193, -0.804, 0.035'\n",
"b'13821507.36199, 3, -6.060, 4.074, 5.965'\n",
"b'13821507.38193, 3, -4.906, 3.955, 3.118, 5, 46.459, -2.460,-23.195'\n",
"b'13821507.40194, 3, -2.693, 6.245, 16.156, 4, -1.396, -1.489, -1.349'\n",
"b'13821507.42201, 3, -11.947, 4.949, 5.776'\n",
"b'13821507.44201, 3, -7.673, 4.911, 1.956, 5, 41.426, 1.766,-30.543'\n",
"b'13821507.46200, 3, -4.914, 4.326, 4.430, 4, -2.303, -1.163, -0.398'\n",
"b'13821507.48200, 3, -4.593, 4.335, 6.734'\n",
"b'13821507.50195, 3, -3.713, 4.386, 8.070, 5, 38.874, 6.631,-31.783'\n",
"b'13821507.52200, 3, -2.921, 3.309, 9.252, 4, -2.380, -2.219, -1.189'\n",
"b'13821507.54200, 3, -4.611, 2.538, 7.804'\n",
"b'13821507.56196, 3, -6.620, 2.249, 7.451, 5, 33.364, 17.252,-38.720'\n",
"b'13821507.58194, 3, -6.165, 1.672, 10.303, 4, -2.218, -1.449, -1.857'\n",
"b'13821507.60200, 3, -7.208, 0.251, 7.983'\n",
"b'13821507.62199, 3, -6.421, 0.851, 8.186, 5, 29.351, 22.075,-38.395'\n",
"b'13821507.64199, 3, -3.689, 0.851, 12.977, 4, -2.169, -2.658, -1.179'\n",
"b'13821507.66194, 3, -4.925, 0.248, 12.668'\n",
"b'13821507.68198, 3, -7.937, -1.319, 12.133, 5, 23.011, 27.623,-39.292'\n",
"b'13821507.70197, 3, -7.530, -1.593, 12.863, 4, 0.042, -0.755, -1.058'\n",
"b'13821507.72196, 3, -5.428, -1.481, 12.383'\n",
"b'13821507.74197, 3, -2.093, 0.134, 11.524, 5, 23.195, 26.031,-39.901'\n",
"b'13821507.76193, 3, -2.240, 1.331, 9.128, 4, 2.048, 0.536, 0.902'\n",
"b'13821507.78195, 3, -3.440, 0.757, 7.198'\n",
"b'13821507.80193, 3, -4.905, 0.810, 6.747, 5, 24.528, 19.290,-44.087'\n",
"b'13821507.82193, 3, -4.610, 1.317, 8.103, 4, 1.482, -0.254, -0.063'\n",
"b'13821507.84193, 3, -3.369, 1.794, 8.261'\n",
"b'13821507.86195, 3, -3.895, 1.355, 8.953, 5, 24.710, 17.409,-43.248'\n",
"b'13821507.88193, 3, -3.493, 1.654, 7.579, 4, 0.891, 0.304, 0.351'\n",
"b'13821507.90197, 3, -3.458, 1.979, 7.112'\n",
"b'13821507.92197, 3, -2.896, 2.057, 8.368, 5, 24.376, 15.575,-44.154'\n",
"b'13821507.94196, 3, -2.387, 1.867, 8.392, 4, 0.549, 0.240, 0.434'\n",
"b'13821507.96196, 3, -2.294, 2.409, 8.231'\n",
"b'13821507.98192, 3, -3.261, 2.698, 7.881, 5, 25.871, 14.032,-45.269'\n",
"b'13821508.00193, 3, -3.424, 2.883, 7.816, 4, 0.533, 0.978, 0.069'\n",
"b'13821508.02196, 3, -4.298, 3.815, 8.438'\n",
"b'13821508.04201, 3, -6.985, 4.920, 12.303, 5, 27.529, 12.852,-45.438'\n",
"b'13821508.06200, 3, -7.187, 2.952, 9.712, 4, -0.090, 0.418, 0.034'\n",
"b'13821508.08195, 3, -5.601, 3.862, 4.143'\n",
"b'13821508.10201, 3, -4.830, 4.021, 10.191, 5, 28.050, 13.157,-46.113'\n",
"b'13821508.12200, 3, -4.320, 3.697, 10.256, 4, 0.965, -0.586, 0.211'\n",
"b'13821508.14200, 3, -5.847, 4.378, 10.519'\n",
"b'13821508.16200, 3, -5.361, 6.310, 9.378, 5, 27.952, 11.418,-45.616'\n",
"b'13821508.18194, 3, -4.873, 6.470, 8.314, 4, 1.108, 0.026, -0.265'\n",
"b'13821508.20194, 3, -4.215, 6.084, 8.478'\n",
"b'13821508.22200, 3, -3.644, 5.848, 8.733, 5, 26.375, 10.649,-45.529'\n",
"b'13821508.24199, 3, -1.496, 5.671, 9.942, 4, -0.134, 0.306, -1.244'\n",
"b'13821508.26194, 3, -2.101, 4.568, 11.110'\n",
"b'13821508.28194, 3, -3.734, 1.257, 10.962, 5, 27.260, 13.385,-45.575'\n",
"b'13821508.30201, 3, -2.843, -0.306, 9.169, 4, 1.071, 1.887, -3.666'\n",
"b'13821508.32200, 3, -3.396, -0.798, 8.119'\n",
"b'13821508.34200, 3, -6.370, -0.660, 7.105, 5, 29.300, 14.701,-42.376'\n",
"b'13821508.36200, 3, -7.020, -0.749, 6.547, 4, 4.197, 3.264, -4.620'\n",
"b'13821508.38199, 3, -6.950, -0.645, 1.055'\n",
"b'13821508.40193, 3, -2.759, 1.109, -3.991, 5, 28.437, 13.690,-44.231'\n",
"b'13821508.42197, 3, -4.988, 1.035, -2.990, 4, 2.660, -0.893, -4.820'\n",
"b'13821508.44198, 3, -6.504, -1.633, 2.567'\n",
"b'13821508.46199, 3, -6.843, -2.380, 8.232, 5, 26.981, 14.639,-44.468'\n",
"b'13821508.48199, 3, -8.443, -1.128, 6.682, 4, 0.557, 2.001, -4.634'\n",
"b'13821508.50201, 3, -9.002, -1.250, 3.298'\n",
"b'13821508.52194, 3, -9.464, -2.234, 1.007, 5, 26.648, 17.500,-43.657'\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"b'13821508.54199, 3, -8.061, -2.932, -0.527, 4, 1.755, 2.546, -2.715'\n",
"b'13821508.56201, 3, -8.909, -2.628, 0.353'\n",
"b'13821508.58200, 3, -9.983, -2.187, 2.637, 5, 26.423, 19.077,-43.077'\n",
"b'13821508.60202, 3, -9.547, -3.332, 3.897, 4, -1.102, 0.130, -1.493'\n",
"b'13821508.62200, 3, -9.782, -5.375, 5.043'\n",
"b'13821508.64200, 3, -10.845, -4.785, 5.434, 5, 25.369, 24.356,-39.687'\n",
"b'13821508.66201, 3, -10.769, -3.589, 3.292, 4, -0.550, 0.499, 0.176'\n",
"b'13821508.68200, 3, -11.101, -4.324, 1.578'\n",
"b'13821508.70202, 3, -9.607, -5.917, 1.234, 5, 24.891, 24.774,-39.712'\n",
"b'13821508.72200, 3, -9.671, -5.250, 1.037, 4, -0.257, -0.971, 0.988'\n",
"b'13821508.74200, 3, -9.664, -3.962, 2.314'\n",
"b'13821508.76200, 3, -8.374, -2.877, 2.971, 5, 24.114, 25.168,-40.049'\n",
"b'13821508.78200, 3, -11.259, -3.630, 2.277, 4, -0.552, -1.361, 1.408'\n",
"b'13821508.80203, 3, -12.237, -4.190, 3.027'\n",
"b'13821508.82200, 3, -10.682, -3.695, 2.444, 5, 24.300, 24.635,-39.736'\n",
"b'13821508.84200, 3, -7.544, -3.140, 2.229, 4, -0.246, -1.421, 3.073'\n",
"b'13821508.86198, 3, -7.041, -2.689, 2.434'\n",
"b'13821508.88193, 3, -10.445, -2.722, 3.150, 5, 25.914, 22.988,-41.758'\n",
"b'13821508.90199, 3, -14.325, -1.946, 4.172, 4, -0.996, 0.275, 2.096'\n",
"b'13821508.92198, 3, -14.693, -2.185, 5.121'\n",
"b'13821508.94193, 3, -13.651, -2.407, 4.855, 5, 28.342, 21.737,-38.702'\n",
"b'13821508.96193, 3, -12.127, -1.824, 3.345, 4, -0.514, 1.809, 5.923'\n",
"b'13821508.98196, 3, -10.762, -0.382, 0.327'\n",
"b'13821509.00193, 3, -10.305, 0.086, -0.821, 5, 37.065, 10.849,-37.381'\n",
"b'13821509.02192, 3, -8.466, -0.497, 0.364, 4, -1.393, -0.945, 6.825'\n",
"b'13821509.04192, 3, -5.455, 1.501, -1.547'\n",
"b'13821509.06196, 3, -2.514, 2.468, 0.777, 5, 39.247, -0.604,-40.235'\n",
"b'13821509.08196, 3, -3.428, 1.258, 3.262, 4, -3.970, -2.769, 5.284'\n",
"b'13821509.10193, 3, -3.974, 1.064, 3.877'\n",
"b'13821509.12194, 3, 3.448, 2.693, 8.787, 5, 29.920, -4.738,-46.158'\n",
"b'13821509.14194, 3, 2.802, 3.828, 9.506, 4, -4.177, -2.326, 3.901'\n",
"b'13821509.16200, 3, 1.915, 4.010, 8.232'\n",
"b'13821509.18195, 3, 0.548, 2.929, 6.341, 5, 24.595, -1.151,-48.095'\n",
"b'13821509.20194, 3, 0.310, 1.842, 6.261, 4, -2.968, -0.036, 1.500'\n",
"b'13821509.22194, 3, 1.375, 0.432, 8.863'\n",
"b'13821509.24200, 3, 3.669, 0.935, 11.930, 5, 22.510, 8.395,-49.044'\n",
"b'13821509.26195, 3, 2.661, 1.990, 13.536, 4, -3.396, -0.783, 0.200'\n",
"b'13821509.28200, 3, -1.487, 0.965, 12.414'\n",
"b'13821509.30201, 3, -3.120, -0.306, 12.783, 5, 20.855, 14.240,-49.378'\n",
"b'13821509.32201, 3, -0.453, -0.627, 12.979, 4, -0.650, 0.590, 0.180'\n",
"b'13821509.34200, 3, 0.132, -0.141, 12.649'\n",
"b'13821509.36194, 3, 0.424, 2.173, 10.833, 5, 24.427, 11.884,-48.761'\n",
"b'13821509.38194, 3, -1.028, 3.722, 9.153, 4, 2.271, 2.689, 1.095'\n",
"b'13821509.40195, 3, -0.104, 4.914, 8.091'\n",
"b'13821509.42195, 3, 0.500, 5.240, 7.065, 5, 30.493, 7.013,-45.515'\n",
"b'13821509.44195, 3, -1.599, 5.446, 5.595, 4, 1.171, 2.348, -0.112'\n",
"b'13821509.46195, 3, -3.049, 5.253, 4.505'\n",
"b'13821509.48195, 3, -1.743, 4.017, 4.894, 5, 35.089, 6.778,-41.205'\n",
"b'13821509.50200, 3, -2.266, 2.994, 7.153, 4, -2.706, 0.055, -1.329'\n",
"b'13821509.52201, 3, -2.782, 3.010, 15.883'\n",
"b'13821509.54200, 3, -2.588, 1.384, 13.030, 5, 32.581, 15.753,-39.602'\n",
"b'13821509.56200, 3, -3.010, -0.272, 13.862, 4, -2.170, -0.609, -2.298'\n",
"b'13821509.58200, 3, -5.426, -0.462, 12.742'\n",
"b'13821509.60201, 3, -7.174, -0.839, 11.540, 5, 29.667, 20.906,-39.347'\n",
"b'13821509.62195, 3, -3.530, 0.277, 10.888, 4, 0.524, -0.467, -0.653'\n",
"b'13821509.64200, 3, -2.446, 1.464, 10.381'\n",
"b'13821509.66201, 3, -3.330, 1.560, 9.365, 5, 27.559, 20.853,-41.943'\n",
"b'13821509.68201, 3, -4.027, 1.298, 8.248, 4, 1.136, -0.516, -0.881'\n",
"b'13821509.70200, 3, -3.118, 1.538, 7.545'\n",
"b'13821509.72201, 3, -2.683, 1.788, 7.860, 5, 25.260, 19.765,-43.382'\n",
"b'13821509.74200, 3, -2.434, 1.353, 7.446, 4, 0.134, -0.977, -0.709'\n",
"b'13821509.76201, 3, -1.996, 0.915, 7.736'\n",
"b'13821509.78200, 3, -2.078, 0.812, 8.009, 5, 22.198, 20.552,-44.756'\n",
"b'13821509.80200, 3, -3.059, 0.119, 8.068, 4, -0.582, -0.995, -1.030'\n",
"b'13821509.82195, 3, -3.306, -0.549, 8.866'\n",
"b'13821509.84194, 3, -2.157, -0.656, 10.235, 5, 19.406, 22.832,-43.648'\n",
"b'13821509.86200, 3, -1.833, -0.965, 10.766, 4, -0.647, -0.702, -0.286'\n",
"b'13821509.88200, 3, -0.929, -1.391, 10.690'\n",
"b'13821509.90201, 3, -1.028, 0.089, 10.229, 5, 17.606, 23.487,-43.887'\n",
"b'13821509.92200, 3, -2.318, 0.284, 9.015, 4, 0.785, 0.416, -0.830'\n",
"b'13821509.94200, 3, -1.747, 0.765, 9.067'\n",
"b'13821509.96199, 3, -0.697, 1.134, 9.804, 5, 16.695, 23.370,-45.505'\n",
"b'13821509.98200, 3, -0.796, 1.081, 10.762, 4, -0.129, 0.110, -0.447'\n",
"b'13821510.00200, 3, -1.908, 0.449, 11.690'\n",
"b'13821510.02195, 3, -2.148, 0.399, 11.586, 5, 15.855, 23.975,-45.231'\n",
"b'13821510.04194, 3, -2.574, 0.451, 11.041, 4, 0.020, -0.117, -0.600'\n",
"b'13821510.06198, 3, -2.982, 0.227, 10.415'\n",
"b'13821510.08198, 3, -2.807, 0.294, 10.710, 5, 16.006, 24.030,-44.114'\n",
"b'13821510.10194, 3, -2.693, 0.257, 10.551, 4, 0.076, -0.038, -0.105'\n",
"b'13821510.12193, 3, -2.418, 0.237, 9.910'\n",
"b'13821510.14193, 3, -2.415, 0.324, 9.361, 5, 16.191, 23.245,-44.554'\n",
"b'13821510.16196, 3, -2.186, 0.565, 8.815, 4, 0.317, 0.156, 0.144'\n",
"b'13821510.18196, 3, -1.733, 0.530, 8.881'\n",
"b'13821510.20193, 3, -1.331, 0.322, 9.902, 5, 16.918, 23.385,-44.832'\n",
"b'13821510.22198, 3, -1.841, 0.223, 10.891, 4, -0.543, -0.334, -0.069'\n",
"b'13821510.24195, 3, -2.164, -0.095, 10.894'\n",
"b'13821510.26195, 3, -2.170, -0.141, 10.440, 5, 16.201, 23.935,-44.161'\n",
"b'13821510.28200, 3, -1.383, 0.214, 9.855, 4, 0.056, 0.045, 0.187'\n",
"b'13821510.30195, 3, -1.117, 0.363, 9.516'\n",
"b'13821510.32196, 3, -1.804, 0.368, 9.497, 5, 16.300, 23.600,-44.800'\n",
"b'13821510.34194, 3, -2.157, 0.364, 9.790, 4, -0.005, -0.019, -0.021'\n",
"b'13821510.36199, 3, -1.759, 0.458, 9.639'\n",
"b'13821510.38201, 3, -1.681, 0.427, 9.459, 5, 15.500, 24.000,-44.800'\n",
"b'13821510.40200, 3, -1.518, 0.445, 9.517, 4, -0.059, 0.019, 0.161'\n",
"b'13821510.42195, 3, -1.433, 0.639, 10.065'\n",
"b'13821510.44194, 3, -1.550, 0.536, 9.827, 5, 15.100, 24.100,-44.800'\n",
"b'13821510.46194, 3, -1.884, 0.368, 9.518, 4, 0.113, -0.056, -0.074'\n",
"b'13821510.48200, 3, -2.260, 0.235, 9.495'\n",
"b'13821510.50200, 3, -1.706, 0.409, 9.773, 5, 14.800, 24.100,-44.900'\n",
"b'13821510.52202, 3, -1.401, 0.388, 9.851, 4, -0.097, -0.023, 0.114'\n",
"b'13821510.54194, 3, -1.654, 0.287, 9.856'\n",
"b'13821510.56199, 3, -1.827, 0.151, 9.996, 5, 14.700, 24.200,-44.800'\n",
"b'13821510.58201, 3, -1.676, 0.080, 10.008, 4, -0.078, -0.090, -0.040'\n",
"b'13821510.60200, 3, -1.678, 0.004, 10.088'\n",
"b'13821510.62202, 3, -1.635, 0.171, 9.874, 5, 14.600, 24.200,-44.700'\n",
"b'13821510.64194, 3, -1.446, 0.300, 9.689, 4, 0.081, -0.005, 0.034'\n",
"b'13821510.66200, 3, -1.526, 0.255, 9.601'\n",
"b'13821510.68201, 3, -1.967, 0.159, 9.967, 5, 14.600, 24.300,-44.800'\n",
"b'13821510.70200, 3, -1.335, 0.263, 10.165, 4, -0.037, -0.140, -0.080'\n",
"b'13821510.72195, 3, -1.018, 0.347, 10.183'\n"
]
},
{
"ename": "KeyboardInterrupt",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-4-45d6b455851f>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mwhile\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mmessage\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maddress\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0ms\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrecvfrom\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m8192\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmessage\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;32mexcept\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mKeyboardInterrupt\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mSystemExit\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mKeyboardInterrupt\u001b[0m: "
]
}
],
"source": [
"while 1:\n",
" try:\n",
" message, address = s.recvfrom(8192)\n",
" print(message)\n",
" except (KeyboardInterrupt, SystemExit):\n",
" raise\n",
" except:\n",
" traceback.print_exc()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Подадтоците кои се примаат се дадени во форма која не е лесно разбирлива. Функцијата *print_sensor_data(sensor_message)* ја зема пораката со сензорските податоци во претходно дадениот формат и ја печати со тоа што прво го печати датумот и времето на примање на податоците, а потоа името на сензорот од кој доаѓаат податоците следен од неговите податоци како подредена тројка. "
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"def print_sensor_data(sensor_message):\n",
" sensor_message = sensor_message.decode() # претвори од bytes literal во string literal\n",
" sensor_data = re.split(\"[ ]+|,[ ]+|,\", sensor_message) # подели ја пораката на составните делови\n",
" \n",
" sensor_names = {3: \"accelerometer\", 4: \"gyroscope\", 5: \"magnetic field\"}\n",
" \n",
" sensor_len = {3: 3, 4: 3, 5: 3}\n",
" \n",
" res = time.strftime(\"%Y/%m/%d %H:%M:%S\") # формат за датумот и времето. автоматски се користи моменталното локално време.\n",
" \n",
" i = 1\n",
"\n",
" while i < len(sensor_data):\n",
" sensor = int(sensor_data[i])\n",
" sensor_name = sensor_names[sensor]\n",
" res += \" \" + sensor_name + \" \"\n",
" if sensor_len[sensor] == 3:\n",
" res += str((float(sensor_data[i+1]), float(sensor_data[i+2]), float(sensor_data[i+3])))\n",
" i += 4\n",
" elif sensor_len[i] == 1:\n",
" res += str(sensor_data[i+1])\n",
" i += 2\n",
" print(res)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021/08/30 11:12:10 accelerometer (-2.423, 0.207, 9.823) gyroscope (0.248, 0.096, -0.17)\n",
"2021/08/30 11:12:10 accelerometer (-1.97, 0.591, 9.086)\n",
"2021/08/30 11:12:10 accelerometer (-1.387, 0.795, 9.092) magnetic field (14.4, 24.5, -44.6)\n",
"2021/08/30 11:12:10 accelerometer (-1.384, 0.596, 9.267) gyroscope (-0.019, 0.004, 0.157)\n",
"2021/08/30 11:12:10 accelerometer (-1.747, 0.243, 9.932)\n",
"2021/08/30 11:12:10 accelerometer (-1.604, 0.335, 10.366) magnetic field (14.3, 24.5, -44.6)\n",
"2021/08/30 11:12:10 accelerometer (-1.736, 0.213, 10.404) gyroscope (-0.167, -0.11, -0.041)\n",
"2021/08/30 11:12:10 accelerometer (-1.46, 0.051, 10.09)\n",
"2021/08/30 11:12:10 accelerometer (-1.358, 0.176, 9.831) magnetic field (14.3, 24.6, -44.4)\n",
"2021/08/30 11:12:10 accelerometer (-1.638, 0.317, 9.634) gyroscope (0.079, 0.088, 0.059)\n",
"2021/08/30 11:12:10 accelerometer (-1.639, 0.316, 9.528)\n",
"2021/08/30 11:12:10 accelerometer (-1.027, 0.245, 9.395) magnetic field (14.2, 24.6, -44.4)\n",
"2021/08/30 11:12:10 accelerometer (-1.469, 0.377, 9.698) gyroscope (-0.077, -0.014, -0.049)\n",
"2021/08/30 11:12:10 accelerometer (-1.897, 0.135, 10.031)\n",
"2021/08/30 11:12:10 accelerometer (-1.78, 0.248, 9.987) magnetic field (14.1, 24.6, -44.3)\n",
"2021/08/30 11:12:10 accelerometer (-1.47, 0.265, 9.853) gyroscope (-0.049, 0.061, 0.048)\n",
"2021/08/30 11:12:10 accelerometer (-1.324, 0.399, 9.852)\n",
"2021/08/30 11:12:10 accelerometer (-1.991, 0.206, 10.253) magnetic field (14.0, 24.7, -44.2)\n",
"2021/08/30 11:12:10 accelerometer (-1.811, 0.229, 10.215) gyroscope (0.022, -0.031, -0.058)\n",
"2021/08/30 11:12:10 accelerometer (-1.867, 0.266, 9.899)\n",
"2021/08/30 11:12:10 accelerometer (-1.623, 0.445, 9.768) magnetic field (14.0, 24.7, -44.1)\n",
"2021/08/30 11:12:10 accelerometer (-1.585, 0.336, 9.533) gyroscope (0.099, 0.01, 0.073)\n",
"2021/08/30 11:12:10 accelerometer (-1.705, 0.212, 9.574)\n",
"2021/08/30 11:12:10 accelerometer (-1.548, 0.225, 9.792) magnetic field (14.0, 24.7, -44.1)\n",
"2021/08/30 11:12:10 accelerometer (-1.815, 0.236, 10.081) gyroscope (-0.123, -0.074, -0.032)\n",
"2021/08/30 11:12:10 accelerometer (-1.889, 0.262, 10.157)\n",
"2021/08/30 11:12:10 accelerometer (-1.599, 0.455, 10.302) magnetic field (14.0, 24.7, -44.0)\n",
"2021/08/30 11:12:10 accelerometer (-1.81, 0.557, 10.651) gyroscope (0.132, 0.009, 0.107)\n",
"2021/08/30 11:12:10 accelerometer (-1.839, 0.558, 10.314)\n",
"2021/08/30 11:12:10 accelerometer (-1.627, 0.6, 9.558) magnetic field (14.1, 24.6, -44.0)\n",
"2021/08/30 11:12:10 accelerometer (-1.383, 0.712, 9.3) gyroscope (0.402, -0.075, 0.173)\n",
"2021/08/30 11:12:10 accelerometer (-1.219, 0.772, 9.527)\n",
"2021/08/30 11:12:10 accelerometer (-1.581, 0.83, 9.595) magnetic field (14.1, 24.5, -44.1)\n",
"2021/08/30 11:12:10 accelerometer (-0.7, 0.84, 10.202) gyroscope (-0.192, -0.101, 0.207)\n",
"2021/08/30 11:12:10 accelerometer (-0.733, 0.46, 9.898)\n",
"2021/08/30 11:12:10 accelerometer (0.141, 0.306, 10.174) magnetic field (14.0, 24.5, -43.9)\n",
"2021/08/30 11:12:10 accelerometer (-0.666, -0.201, 11.675) gyroscope (-0.422, -0.399, -0.152)\n",
"2021/08/30 11:12:10 accelerometer (-1.314, -0.736, 12.011)\n",
"2021/08/30 11:12:10 accelerometer (-0.98, -0.794, 11.809) magnetic field (13.8, 24.5, -44.0)\n",
"2021/08/30 11:12:10 accelerometer (-0.743, -0.494, 11.811) gyroscope (0.548, -0.138, -0.18)\n",
"2021/08/30 11:12:10 accelerometer (-1.392, -0.394, 10.933)\n",
"2021/08/30 11:12:10 accelerometer (-1.682, -0.253, 9.661) magnetic field (13.6, 24.3, -44.1)\n",
"2021/08/30 11:12:10 accelerometer (-1.596, 0.047, 8.592) gyroscope (1.377, 0.088, -0.186)\n",
"2021/08/30 11:12:10 accelerometer (-1.938, 0.832, 8.479)\n",
"2021/08/30 11:12:10 accelerometer (-2.319, 1.489, 8.533) magnetic field (13.4, 23.9, -44.4)\n",
"2021/08/30 11:12:10 accelerometer (-1.525, 1.946, 8.49) gyroscope (0.613, 0.05, -0.089)\n",
"2021/08/30 11:12:10 accelerometer (-1.966, 1.714, 8.661)\n",
"2021/08/30 11:12:10 accelerometer (-2.049, 1.547, 8.894) magnetic field (13.3, 23.3, -44.8)\n",
"2021/08/30 11:12:10 accelerometer (-1.852, 1.84, 9.56) gyroscope (0.042, 0.016, 0.041)\n",
"2021/08/30 11:12:10 accelerometer (-1.609, 2.145, 9.614)\n",
"2021/08/30 11:12:10 accelerometer (-1.456, 2.247, 9.41) magnetic field (13.2, 22.7, -45.3)\n",
"2021/08/30 11:12:10 accelerometer (-1.658, 2.32, 9.354) gyroscope (0.186, 0.193, 0.19)\n",
"2021/08/30 11:12:10 accelerometer (-1.672, 2.33, 9.396)\n",
"2021/08/30 11:12:10 accelerometer (-1.666, 2.248, 9.574) magnetic field (13.286, 21.634, -46.216)\n",
"2021/08/30 11:12:10 accelerometer (-1.025, 2.325, 9.956) gyroscope (0.071, 0.009, 0.143)\n",
"2021/08/30 11:12:10 accelerometer (-0.949, 2.522, 10.156)\n",
"2021/08/30 11:12:10 accelerometer (-1.324, 2.327, 10.429) magnetic field (13.005, 21.156, -46.315)\n",
"2021/08/30 11:12:10 accelerometer (-1.978, 3.004, 11.592) gyroscope (0.229, -0.074, -0.163)\n",
"2021/08/30 11:12:10 accelerometer (-2.562, 2.231, 9.337)\n",
"2021/08/30 11:12:10 accelerometer (-1.87, 2.583, 7.11) magnetic field (13.52, 20.091, -46.791)\n",
"2021/08/30 11:12:10 accelerometer (-0.662, 3.31, 5.841) gyroscope (0.968, 0.452, 0.479)\n",
"2021/08/30 11:12:10 accelerometer (-0.303, 3.291, 8.198)\n",
"2021/08/30 11:12:10 accelerometer (-1.636, 2.437, 9.953) magnetic field (13.73, 18.852, -47.894)\n",
"2021/08/30 11:12:10 accelerometer (0.731, 0.718, 12.256)\n",
"2021/08/30 11:12:10 accelerometer (-0.005, 0.472, 9.923)\n",
"2021/08/30 11:12:10 accelerometer (0.016, 0.494, 9.98) magnetic field (6.71, 25.34, -45.65)\n",
"2021/08/30 11:12:10 accelerometer (0.044, 0.463, 9.948)\n",
"2021/08/30 11:12:10 accelerometer (0.025, 0.48, 9.966)\n",
"2021/08/30 11:12:10 accelerometer (0.022, 0.476, 9.96) gyroscope (-0.005, -0.0, 0.002) magnetic field (4.57, 26.36, -45.68)\n",
"2021/08/30 11:12:10 accelerometer (0.006, 0.469, 9.965)\n",
"2021/08/30 11:12:10 accelerometer (-0.008, 0.476, 9.966)\n",
"2021/08/30 11:12:10 accelerometer (0.006, 0.48, 9.951) gyroscope (-0.007, 0.001, 0.001) magnetic field (5.0, 26.2, -44.2)\n",
"2021/08/30 11:12:10 accelerometer (-0.037, 0.508, 9.773)\n",
"2021/08/30 11:12:10 accelerometer (-0.002, 0.468, 9.924)\n",
"2021/08/30 11:12:10 accelerometer (0.012, 0.47, 9.943) gyroscope (-0.002, -0.006, -0.001) magnetic field (5.3, 26.0, -44.9)\n",
"2021/08/30 11:12:10 accelerometer (0.011, 0.473, 9.947)\n",
"2021/08/30 11:12:10 accelerometer (0.016, 0.462, 9.949)\n",
"2021/08/30 11:12:10 accelerometer (0.022, 0.49, 9.992) gyroscope (-0.006, 0.003, 0.002) magnetic field (5.3, 26.1, -45.2)\n",
"2021/08/30 11:12:10 accelerometer (0.016, 0.481, 9.99)\n",
"2021/08/30 11:12:10 accelerometer (-0.007, 0.469, 10.019)\n",
"2021/08/30 11:12:10 accelerometer (-0.03, 0.488, 9.978) gyroscope (-0.003, 0.005, -0.0) magnetic field (5.2, 26.1, -45.4)\n",
"2021/08/30 11:12:10 accelerometer (-0.043, 0.466, 9.865)\n",
"2021/08/30 11:12:10 accelerometer (-0.069, 0.469, 9.867)\n",
"2021/08/30 11:12:10 accelerometer (0.012, 0.46, 9.894) gyroscope (0.001, 0.008, -0.004) magnetic field (5.3, 26.1, -45.5)\n",
"2021/08/30 11:12:10 accelerometer (0.035, 0.479, 9.966)\n",
"2021/08/30 11:12:10 accelerometer (-0.002, 0.496, 10.029)\n",
"2021/08/30 11:12:10 accelerometer (0.04, 0.46, 9.899) gyroscope (-0.003, 0.0, 0.001) magnetic field (5.1, 26.2, -45.5)\n",
"2021/08/30 11:12:10 accelerometer (-0.029, 0.497, 9.985)\n",
"2021/08/30 11:12:10 accelerometer (0.007, 0.488, 9.991)\n",
"2021/08/30 11:12:10 accelerometer (-0.036, 0.49, 9.998) gyroscope (-0.005, 0.005, 0.003) magnetic field (5.2, 26.2, -45.5)\n",
"2021/08/30 11:12:10 accelerometer (-0.03, 0.482, 9.94)\n",
"2021/08/30 11:12:10 accelerometer (-0.012, 0.481, 9.957)\n",
"2021/08/30 11:12:10 accelerometer (-0.048, 0.485, 9.937) gyroscope (-0.003, 0.001, 0.001) magnetic field (5.2, 26.3, -45.5)\n",
"2021/08/30 11:12:10 accelerometer (-0.031, 0.481, 9.956)\n",
"2021/08/30 11:12:10 accelerometer (-0.032, 0.48, 9.975)\n",
"2021/08/30 11:12:10 accelerometer (-0.014, 0.478, 9.96) gyroscope (-0.001, 0.0, -0.0) magnetic field (5.1, 26.3, -45.6)\n",
"2021/08/30 11:12:10 accelerometer (0.037, 0.496, 9.996)\n",
"2021/08/30 11:12:10 accelerometer (0.02, 0.5, 9.979)\n",
"2021/08/30 11:12:10 accelerometer (0.001, 0.491, 9.996) gyroscope (-0.005, 0.0, 0.001) magnetic field (5.2, 26.2, -45.6)\n",
"2021/08/30 11:12:10 accelerometer (-0.01, 0.473, 10.014)\n",
"2021/08/30 11:12:10 accelerometer (-0.013, 0.45, 10.005)\n",
"2021/08/30 11:12:10 accelerometer (-0.012, 0.47, 9.955) gyroscope (-0.0, -0.012, 0.001) magnetic field (5.1, 26.2, -45.6)\n",
"2021/08/30 11:12:10 accelerometer (0.019, 0.534, 9.639)\n",
"2021/08/30 11:12:10 accelerometer (-0.055, 0.612, 10.496)\n",
"2021/08/30 11:12:10 accelerometer (-0.04, 0.558, 9.905) gyroscope (-0.016, 0.011, 0.0) magnetic field (5.1, 26.3, -45.5)\n",
"2021/08/30 11:12:10 accelerometer (-0.012, 0.379, 9.912)\n",
"2021/08/30 11:12:10 accelerometer (0.016, 0.517, 10.051)\n",
"2021/08/30 11:12:10 accelerometer (0.056, 0.484, 9.914) gyroscope (-0.01, -0.0, -0.003) magnetic field (5.1, 26.2, -45.5)\n",
"2021/08/30 11:12:10 accelerometer (-0.005, 0.502, 9.929)\n",
"2021/08/30 11:12:10 accelerometer (0.051, 0.432, 9.962)\n",
"2021/08/30 11:12:10 accelerometer (-0.001, 0.479, 9.937) gyroscope (-0.007, -0.002, 0.001) magnetic field (5.1, 26.2, -45.5)\n",
"2021/08/30 11:12:10 accelerometer (-0.017, 0.478, 9.961)\n",
"2021/08/30 11:12:10 accelerometer (-0.026, 0.508, 9.967)\n",
"2021/08/30 11:12:10 accelerometer (0.007, 0.456, 9.983) gyroscope (-0.003, 0.001, -0.002) magnetic field (5.1, 26.2, -45.4)\n",
"2021/08/30 11:12:10 accelerometer (0.006, 0.523, 9.96)\n",
"2021/08/30 11:12:10 accelerometer (-0.024, 0.493, 9.963)\n",
"2021/08/30 11:12:10 accelerometer (0.005, 0.482, 9.979) gyroscope (-0.005, 0.002, 0.0) magnetic field (5.1, 26.2, -45.4)\n",
"2021/08/30 11:12:10 accelerometer (0.036, 0.468, 9.984)\n",
"2021/08/30 11:12:10 accelerometer (0.036, 0.479, 9.929)\n",
"2021/08/30 11:12:10 accelerometer (0.042, 0.484, 9.998) gyroscope (-0.005, -0.002, 0.003) magnetic field (5.1, 26.2, -45.4)\n",
"2021/08/30 11:12:10 accelerometer (0.002, 0.472, 9.975)\n",
"2021/08/30 11:12:10 accelerometer (-0.005, 0.494, 9.983)\n",
"2021/08/30 11:12:10 accelerometer (-0.017, 0.506, 9.984) gyroscope (-0.005, 0.001, 0.001) magnetic field (5.1, 26.2, -45.3)\n",
"2021/08/30 11:12:10 accelerometer (-0.006, 0.491, 9.979)\n",
"2021/08/30 11:12:10 accelerometer (-0.023, 0.467, 9.985)\n",
"2021/08/30 11:12:10 accelerometer (-0.005, 0.493, 9.981) gyroscope (-0.005, 0.0, -0.002) magnetic field (5.1, 26.2, -45.2)\n",
"2021/08/30 11:12:10 accelerometer (0.034, 0.475, 9.969)\n",
"2021/08/30 11:12:10 accelerometer (0.023, 0.48, 9.974)\n",
"2021/08/30 11:12:10 accelerometer (-0.007, 0.492, 9.967) gyroscope (-0.004, -0.0, 0.003) magnetic field (5.1, 26.3, -45.2)\n",
"2021/08/30 11:12:10 accelerometer (0.002, 0.496, 9.992)\n",
"2021/08/30 11:12:10 accelerometer (-0.004, 0.503, 9.99)\n",
"2021/08/30 11:12:10 accelerometer (-0.011, 0.5, 9.956)\n",
"2021/08/30 11:12:10 accelerometer (0.025, 0.488, 9.985)\n",
"2021/08/30 11:12:10 accelerometer (0.018, 0.479, 9.961) gyroscope (-0.006, 0.001, 0.0) magnetic field (5.1, 26.3, -45.3)\n",
"2021/08/30 11:12:10 accelerometer (0.024, 0.479, 9.968)\n",
"2021/08/30 11:12:10 accelerometer (0.016, 0.494, 9.943)\n",
"2021/08/30 11:12:10 accelerometer (-0.017, 0.521, 10.093)\n",
"2021/08/30 11:12:10 accelerometer (0.014, 0.576, 9.918) gyroscope (-0.008, 0.003, 0.0) magnetic field (5.1, 26.3, -45.2)\n",
"2021/08/30 11:12:10 accelerometer (-0.022, 0.474, 9.902)\n",
"2021/08/30 11:12:10 accelerometer (0.135, 0.445, 10.098) gyroscope (-0.018, -0.001, 0.0) magnetic field (5.2, 26.4, -45.2)\n",
"2021/08/30 11:12:10 accelerometer (0.037, 0.474, 10.07)\n",
"2021/08/30 11:12:10 accelerometer (0.001, 0.462, 9.993)\n",
"2021/08/30 11:12:10 accelerometer (0.098, 0.435, 9.738) gyroscope (-0.018, -0.0, 0.002) magnetic field (5.3, 26.3, -45.2)\n",
"2021/08/30 11:12:10 accelerometer (-0.022, 0.504, 9.758)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021/08/30 11:12:10 accelerometer (0.01, 0.508, 9.851)\n",
"2021/08/30 11:12:10 accelerometer (-0.02, 0.487, 9.807) gyroscope (-0.011, -0.008, 0.001) magnetic field (5.3, 26.3, -45.1)\n",
"2021/08/30 11:12:10 accelerometer (-0.028, 0.469, 9.972)\n",
"2021/08/30 11:12:10 accelerometer (-0.068, 0.451, 9.786)\n",
"2021/08/30 11:12:10 accelerometer (-0.071, 0.472, 9.725) gyroscope (-0.025, -0.002, 0.0) magnetic field (5.3, 26.3, -45.0)\n",
"2021/08/30 11:12:10 accelerometer (-0.013, 0.423, 10.423)\n",
"2021/08/30 11:12:10 accelerometer (0.132, 0.356, 10.597)\n",
"2021/08/30 11:12:10 accelerometer (1.419, 0.116, 10.466) gyroscope (-0.006, -0.022, 0.0) magnetic field (5.3, 26.3, -45.0)\n",
"2021/08/30 11:12:10 accelerometer (2.277, -0.413, 9.979)\n",
"2021/08/30 11:12:10 accelerometer (1.696, -0.146, 10.435)\n",
"2021/08/30 11:12:10 accelerometer (2.306, -0.381, 9.669) gyroscope (-0.03, -0.051, -0.028) magnetic field (5.4, 26.3, -44.9)\n",
"2021/08/30 11:12:10 accelerometer (-9.761, -1.092, 10.271)\n",
"2021/08/30 11:12:10 accelerometer (0.548, 4.367, 9.918)\n",
"2021/08/30 11:12:10 accelerometer (2.907, 1.787, 9.497) gyroscope (-0.201, 0.652, 0.372) magnetic field (5.4, 26.3, -44.9)\n",
"2021/08/30 11:12:10 accelerometer (-0.017, -0.54, 9.629)\n",
"2021/08/30 11:12:10 accelerometer (0.431, -1.004, 10.849)\n",
"2021/08/30 11:12:10 accelerometer (-1.504, -0.962, 11.614) gyroscope (0.368, -0.323, 0.361) magnetic field (5.6, 26.3, -44.8)\n",
"2021/08/30 11:12:10 accelerometer (2.995, 0.977, 9.38)\n",
"2021/08/30 11:12:10 accelerometer (7.784, -1.168, 9.26)\n",
"2021/08/30 11:12:10 accelerometer (11.417, -2.349, 10.211) gyroscope (-0.977, -4.927, -2.641) magnetic field (5.5, 26.2, -44.9)\n",
"2021/08/30 11:12:10 accelerometer (14.241, -3.594, 9.528)\n",
"2021/08/30 11:12:10 accelerometer (-2.715, -5.792, 9.773)\n",
"2021/08/30 11:12:10 accelerometer (-5.948, -5.204, 11.03) gyroscope (0.034, -10.372, 0.522) magnetic field (-10.224, 26.915, -41.452)\n",
"2021/08/30 11:12:10 accelerometer (3.183, 2.758, 28.783)\n",
"2021/08/30 11:12:10 accelerometer (12.887, 14.39, 4.551)\n",
"2021/08/30 11:12:10 accelerometer (18.11, 2.544, -1.462) gyroscope (3.046, -0.859, -2.862) magnetic field (-27.851, 26.632, -32.44)\n",
"2021/08/30 11:12:10 accelerometer (16.648, -0.195, -12.203)\n",
"2021/08/30 11:12:10 accelerometer (1.287, -0.475, 11.68)\n",
"2021/08/30 11:12:10 accelerometer (8.043, 0.64, 8.841) gyroscope (-0.891, -1.141, -0.953) magnetic field (-35.182, 19.364, -27.11)\n",
"2021/08/30 11:12:10 accelerometer (9.876, 2.169, 4.724)\n",
"2021/08/30 11:12:10 accelerometer (11.927, 4.6, -4.422)\n",
"2021/08/30 11:12:11 accelerometer (7.065, 6.457, 2.298) gyroscope (0.642, 0.771, -0.659) magnetic field (-38.147, 16.896, -24.237)\n",
"2021/08/30 11:12:11 accelerometer (3.627, 1.885, 7.171)\n",
"2021/08/30 11:12:11 accelerometer (6.57, 3.178, 9.881)\n",
"2021/08/30 11:12:11 accelerometer (9.869, 4.155, 9.857) gyroscope (1.548, 1.454, 2.115) magnetic field (-36.504, 18.199, -29.77)\n",
"2021/08/30 11:12:11 accelerometer (11.284, 2.076, 10.932)\n",
"2021/08/30 11:12:11 accelerometer (10.97, 2.358, 1.086)\n",
"2021/08/30 11:12:11 accelerometer (6.047, 0.463, 2.163) gyroscope (2.495, 0.891, 2.444) magnetic field (-32.638, 18.213, -35.937)\n",
"2021/08/30 11:12:11 accelerometer (5.092, -1.488, 3.515)\n",
"2021/08/30 11:12:11 accelerometer (6.29, -1.803, 3.345)\n",
"2021/08/30 11:12:11 accelerometer (9.886, -0.304, 5.772) gyroscope (2.873, -3.289, 4.972) magnetic field (-32.485, 21.724, -34.873)\n",
"2021/08/30 11:12:11 accelerometer (9.571, -0.848, 5.157)\n",
"2021/08/30 11:12:11 accelerometer (5.608, -3.737, 2.045)\n",
"2021/08/30 11:12:11 accelerometer (0.856, -6.986, -4.278) gyroscope (4.359, -3.193, 4.463) magnetic field (-34.067, 23.233, -34.567)\n",
"2021/08/30 11:12:11 accelerometer (2.211, -7.263, -5.334)\n",
"2021/08/30 11:12:11 accelerometer (5.228, -6.455, -0.553)\n",
"2021/08/30 11:12:11 accelerometer (8.656, -5.616, 2.162) gyroscope (2.433, -3.519, 6.249) magnetic field (-32.399, 28.348, -32.152)\n",
"2021/08/30 11:12:11 accelerometer (9.023, -5.49, 3.001)\n",
"2021/08/30 11:12:11 accelerometer (7.053, -6.771, -0.332)\n",
"2021/08/30 11:12:11 accelerometer (6.789, -8.045, -2.297) gyroscope (1.281, 0.926, 4.938) magnetic field (-26.888, 32.683, -32.849)\n",
"2021/08/30 11:12:11 accelerometer (7.031, -8.288, -1.138)\n",
"2021/08/30 11:12:11 accelerometer (7.124, -8.552, 1.122)\n",
"2021/08/30 11:12:11 accelerometer (7.459, -8.596, 2.897) gyroscope (0.936, -0.774, 3.813) magnetic field (-15.728, 35.654, -34.732)\n",
"2021/08/30 11:12:11 accelerometer (6.521, -8.842, -0.2)\n",
"2021/08/30 11:12:11 accelerometer (5.259, -8.695, -0.4)\n",
"2021/08/30 11:12:11 accelerometer (4.549, -8.033, 0.97) gyroscope (-0.119, 1.065, 2.623) magnetic field (-8.623, 37.059, -36.837)\n",
"2021/08/30 11:12:11 accelerometer (2.415, -8.893, 0.786)\n",
"2021/08/30 11:12:11 accelerometer (2.046, -9.09, 0.529)\n",
"2021/08/30 11:12:11 accelerometer (1.575, -9.166, 0.863) gyroscope (-0.167, 0.066, 1.93) magnetic field (-0.449, 37.464, -37.751)\n",
"2021/08/30 11:12:11 accelerometer (1.075, -9.481, 2.436)\n",
"2021/08/30 11:12:11 accelerometer (0.536, -9.793, 1.215)\n",
"2021/08/30 11:12:11 accelerometer (2.306, -9.182, 0.931) gyroscope (-0.131, 0.036, 1.964) magnetic field (3.321, 38.065, -38.362)\n",
"2021/08/30 11:12:11 accelerometer (3.913, -8.941, 0.882)\n",
"2021/08/30 11:12:11 accelerometer (5.43, -8.408, 1.183)\n",
"2021/08/30 11:12:11 accelerometer (6.337, -7.864, 0.499) gyroscope (-0.187, 0.491, 0.678) magnetic field (9.341, 37.756, -36.254)\n",
"2021/08/30 11:12:11 accelerometer (7.84, -7.274, 0.126)\n",
"2021/08/30 11:12:11 accelerometer (8.381, -7.858, 0.166)\n",
"2021/08/30 11:12:11 accelerometer (9.662, -7.318, -1.417) gyroscope (-0.254, 0.976, -2.268) magnetic field (8.23, 39.135, -34.51)\n",
"2021/08/30 11:12:11 accelerometer (11.845, -6.252, -2.649)\n",
"2021/08/30 11:12:11 accelerometer (13.115, -6.985, -3.351)\n",
"2021/08/30 11:12:11 accelerometer (13.137, -8.789, -2.986) gyroscope (-1.087, -0.033, -6.394) magnetic field (0.207, 41.548, -33.149)\n",
"2021/08/30 11:12:11 accelerometer (15.605, -9.188, -2.634)\n",
"2021/08/30 11:12:11 accelerometer (15.08, -12.288, -3.798)\n",
"2021/08/30 11:12:11 accelerometer (14.246, -13.722, -4.022) gyroscope (-2.225, 0.608, -9.089) magnetic field (-15.119, 41.65, -31.356)\n",
"2021/08/30 11:12:11 accelerometer (15.185, -11.309, -3.472)\n",
"2021/08/30 11:12:11 accelerometer (18.464, -9.272, -3.353)\n",
"2021/08/30 11:12:11 accelerometer (18.141, -12.747, -1.66) gyroscope (-2.468, -1.284, -10.808) magnetic field (-36.914, 29.592, -25.563)\n",
"2021/08/30 11:12:11 accelerometer (12.787, -14.211, -1.842)\n",
"2021/08/30 11:12:11 accelerometer (14.534, -6.126, -0.968)\n",
"2021/08/30 11:12:11 accelerometer (16.587, -3.189, -3.455) gyroscope (-2.76, -0.65, -9.424) magnetic field (-48.88, 8.867, -20.237)\n",
"2021/08/30 11:12:12 accelerometer (17.084, -4.457, -2.034)\n",
"2021/08/30 11:12:12 accelerometer (5.515, -8.356, -0.577)\n",
"2021/08/30 11:12:12 accelerometer (1.368, -4.865, -4.634) gyroscope (-1.932, 0.078, -9.59) magnetic field (-45.114, -21.829, -20.338)\n",
"2021/08/30 11:12:12 accelerometer (-0.473, 0.04, -3.475)\n",
"2021/08/30 11:12:12 accelerometer (1.211, 4.36, -5.429)\n",
"2021/08/30 11:12:12 accelerometer (2.265, 4.101, 0.441) gyroscope (-3.418, -0.469, -6.999) magnetic field (-32.771, -36.052, -24.023)\n",
"2021/08/30 11:12:12 accelerometer (0.832, 2.917, 7.051)\n",
"2021/08/30 11:12:12 accelerometer (-2.282, 3.317, 5.77)\n",
"2021/08/30 11:12:12 accelerometer (-5.409, 4.395, 3.978) gyroscope (-2.42, 0.62, -6.039) magnetic field (-13.064, -41.384, -32.491)\n",
"2021/08/30 11:12:12 accelerometer (-7.003, 4.701, 3.391)\n",
"2021/08/30 11:12:12 accelerometer (-9.266, 4.481, 5.031)\n",
"2021/08/30 11:12:12 accelerometer (-9.136, 4.885, 6.226) gyroscope (-0.507, -1.129, -4.025) magnetic field (-0.926, -40.398, -35.931)\n",
"2021/08/30 11:12:12 accelerometer (-8.114, 5.855, 7.151)\n",
"2021/08/30 11:12:12 accelerometer (-7.658, 6.309, 6.991)\n",
"2021/08/30 11:12:12 accelerometer (-8.655, 5.632, 5.557) gyroscope (-0.002, 0.712, -2.32) magnetic field (7.459, -39.149, -37.613)\n",
"2021/08/30 11:12:12 accelerometer (-6.683, 5.417, 4.258)\n",
"2021/08/30 11:12:12 accelerometer (-5.279, 4.568, 5.841)\n",
"2021/08/30 11:12:12 accelerometer (-5.822, 3.752, 7.385) gyroscope (1.13, -1.23, -2.817) magnetic field (13.422, -37.974, -36.917)\n",
"2021/08/30 11:12:12 accelerometer (-5.946, 2.844, 4.911)\n",
"2021/08/30 11:12:12 accelerometer (-6.621, 1.659, 2.502)\n",
"2021/08/30 11:12:12 accelerometer (-6.748, 0.098, 2.379) gyroscope (0.729, -1.34, -3.604) magnetic field (18.582, -36.725, -31.685)\n",
"2021/08/30 11:12:12 accelerometer (-7.879, -0.454, 6.122)\n",
"2021/08/30 11:12:12 accelerometer (-9.589, -0.994, 5.528)\n",
"2021/08/30 11:12:12 accelerometer (-7.004, -2.465, 5.084) gyroscope (0.969, -1.143, -3.082) magnetic field (23.474, -33.929, -34.931)\n",
"2021/08/30 11:12:12 accelerometer (-6.161, -2.048, 6.766)\n",
"2021/08/30 11:12:12 accelerometer (-5.976, -1.961, 9.258)\n",
"2021/08/30 11:12:12 accelerometer (-6.759, -3.081, 4.857) gyroscope (1.461, -1.526, -3.583) magnetic field (26.025, -28.626, -34.273)\n",
"2021/08/30 11:12:12 accelerometer (-7.122, -4.044, 2.473)\n",
"2021/08/30 11:12:12 accelerometer (-6.923, -4.508, 5.048)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021/08/30 11:12:12 accelerometer (-6.099, -4.749, 6.367) gyroscope (0.008, -1.097, -3.336) magnetic field (29.29, -25.234, -35.126)\n",
"2021/08/30 11:12:12 accelerometer (-8.019, -5.485, 8.38)\n",
"2021/08/30 11:12:12 accelerometer (-8.961, -6.632, 7.949)\n",
"2021/08/30 11:12:12 accelerometer (-9.499, -7.315, 8.321) gyroscope (0.577, -0.356, -2.326) magnetic field (32.859, -19.544, -38.664)\n",
"2021/08/30 11:12:12 accelerometer (-9.814, -7.611, 8.197)\n",
"2021/08/30 11:12:12 accelerometer (-9.505, -7.132, 8.161)\n",
"2021/08/30 11:12:12 accelerometer (-9.237, -7.064, 7.013) gyroscope (1.141, 0.007, -0.501) magnetic field (33.15, -17.254, -36.274)\n",
"2021/08/30 11:12:12 accelerometer (-8.91, -6.559, 7.298)\n",
"2021/08/30 11:12:12 accelerometer (-9.051, -5.801, 8.334)\n",
"2021/08/30 11:12:12 accelerometer (-9.202, -5.65, 8.25) gyroscope (0.807, 0.609, 0.877) magnetic field (33.595, -19.571, -35.989)\n",
"2021/08/30 11:12:12 accelerometer (-8.596, -4.665, 8.016)\n",
"2021/08/30 11:12:12 accelerometer (-8.124, -3.546, 7.948)\n",
"2021/08/30 11:12:12 accelerometer (-7.427, -2.373, 7.827) gyroscope (0.852, 1.071, 1.761) magnetic field (34.814, -23.199, -32.792)\n",
"2021/08/30 11:12:12 accelerometer (-7.211, -1.741, 7.197)\n",
"2021/08/30 11:12:12 accelerometer (-7.264, -0.852, 7.371)\n",
"2021/08/30 11:12:12 accelerometer (-7.563, -0.34, 7.766) gyroscope (0.874, 1.367, 1.825) magnetic field (32.44, -28.095, -29.753)\n",
"2021/08/30 11:12:12 accelerometer (-7.451, -0.04, 6.976)\n",
"2021/08/30 11:12:12 accelerometer (-8.183, 0.01, 6.756)\n",
"2021/08/30 11:12:12 accelerometer (-9.355, -0.378, 6.925) gyroscope (0.822, 1.845, 1.982) magnetic field (31.683, -32.567, -24.913)\n",
"2021/08/30 11:12:12 accelerometer (-9.365, -0.011, 5.891)\n",
"2021/08/30 11:12:12 accelerometer (-9.978, 0.086, 5.006)\n",
"2021/08/30 11:12:12 accelerometer (-10.251, 0.426, 4.964) gyroscope (0.883, 2.562, 2.698) magnetic field (29.29, -37.83, -18.822)\n",
"2021/08/30 11:12:13 accelerometer (-10.894, 0.69, 4.878)\n",
"2021/08/30 11:12:13 accelerometer (-10.651, 0.766, 4.395)\n",
"2021/08/30 11:12:13 accelerometer (-9.409, 1.743, 4.179) gyroscope (0.716, 3.468, 4.108) magnetic field (24.903, -42.918, -14.052)\n",
"2021/08/30 11:12:13 accelerometer (-7.622, 2.78, 3.657)\n",
"2021/08/30 11:12:13 accelerometer (-7.971, 3.308, 3.2)\n",
"2021/08/30 11:12:13 accelerometer (-7.836, 3.182, 0.372) gyroscope (1.039, 4.127, 4.785) magnetic field (11.755, -49.301, -6.833)\n",
"2021/08/30 11:12:13 accelerometer (-6.513, 3.783, -0.619)\n",
"2021/08/30 11:12:13 accelerometer (-3.657, 4.817, -0.098)\n",
"2021/08/30 11:12:13 accelerometer (-2.859, 5.401, 0.713) gyroscope (0.816, 3.576, 5.301) magnetic field (-2.895, -49.964, -1.569)\n",
"2021/08/30 11:12:13 accelerometer (-3.13, 4.79, 0.239)\n",
"2021/08/30 11:12:13 accelerometer (-2.144, 4.136, -1.279)\n",
"2021/08/30 11:12:13 accelerometer (1.567, 6.584, -2.365) gyroscope (0.574, 4.04, 5.823) magnetic field (-22.324, -45.755, -1.604)\n",
"2021/08/30 11:12:13 accelerometer (0.942, 7.647, -2.737)\n",
"2021/08/30 11:12:13 accelerometer (0.104, 5.479, -3.624)\n",
"2021/08/30 11:12:13 accelerometer (-0.819, 2.558, -1.079) gyroscope (0.069, 2.805, 5.674) magnetic field (-35.266, -38.852, -6.194)\n",
"2021/08/30 11:12:13 accelerometer (1.264, -1.289, 1.024)\n",
"2021/08/30 11:12:13 accelerometer (5.47, 0.917, 3.16)\n",
"2021/08/30 11:12:13 accelerometer (7.624, 1.409, -1.397) gyroscope (1.777, 1.796, 7.431) magnetic field (-47.897, -19.833, -13.245)\n",
"2021/08/30 11:12:13 accelerometer (7.312, -0.991, -3.349)\n",
"2021/08/30 11:12:13 accelerometer (6.685, -5.027, -3.284)\n",
"2021/08/30 11:12:13 accelerometer (7.909, -7.56, -2.831) gyroscope (1.168, 1.066, 8.333) magnetic field (-51.378, -3.065, -14.765)\n",
"2021/08/30 11:12:13 accelerometer (12.662, -7.633, -0.713)\n",
"2021/08/30 11:12:13 accelerometer (14.238, -6.984, -1.437)\n",
"2021/08/30 11:12:13 accelerometer (14.131, -6.464, -2.556) gyroscope (2.07, -0.389, 8.301) magnetic field (-46.226, 24.478, -19.471)\n",
"2021/08/30 11:12:13 accelerometer (13.631, -7.092, -4.603)\n",
"2021/08/30 11:12:13 accelerometer (12.771, -7.761, -6.197)\n",
"2021/08/30 11:12:13 accelerometer (11.329, -7.701, -4.405) gyroscope (0.681, -0.166, 5.983) magnetic field (-29.148, 40.565, -21.473)\n",
"2021/08/30 11:12:13 accelerometer (10.983, -6.962, -3.907)\n",
"2021/08/30 11:12:13 accelerometer (8.503, -8.501, -4.384)\n",
"2021/08/30 11:12:13 accelerometer (7.323, -9.621, -6.928) gyroscope (1.926, -4.417, 4.117) magnetic field (-19.847, 46.717, -20.413)\n",
"2021/08/30 11:12:13 accelerometer (5.461, -10.075, -8.349)\n",
"2021/08/30 11:12:13 accelerometer (4.599, -9.59, -7.032)\n",
"2021/08/30 11:12:13 accelerometer (3.071, -10.017, -6.419) gyroscope (-0.246, -3.934, 3.46) magnetic field (-12.802, 48.696, -19.093)\n",
"2021/08/30 11:12:13 accelerometer (0.985, -11.36, -7.643)\n",
"2021/08/30 11:12:13 accelerometer (-0.164, -12.103, -7.408)\n",
"2021/08/30 11:12:13 accelerometer (-0.736, -12.042, -7.608) gyroscope (-0.523, -5.411, 3.742) magnetic field (-10.32, 51.262, -18.451)\n",
"2021/08/30 11:12:13 accelerometer (-0.941, -11.728, -9.377)\n",
"2021/08/30 11:12:13 accelerometer (-2.014, -11.961, -8.797)\n",
"2021/08/30 11:12:13 accelerometer (-3.642, -12.006, -7.468) gyroscope (-1.616, -5.819, 3.768) magnetic field (-4.19, 51.14, -10.103)\n",
"2021/08/30 11:12:13 accelerometer (-4.041, -11.642, -6.238)\n",
"2021/08/30 11:12:13 accelerometer (-4.61, -10.999, -4.592)\n",
"2021/08/30 11:12:13 accelerometer (-3.784, -9.475, -2.269) gyroscope (-2.485, -4.219, 3.471) magnetic field (2.892, 53.535, -3.037)\n",
"2021/08/30 11:12:13 accelerometer (-3.285, -7.584, -1.304)\n",
"2021/08/30 11:12:13 accelerometer (-3.314, -6.203, -2.173)\n",
"2021/08/30 11:12:13 accelerometer (-4.347, -6.6, -1.903) gyroscope (-1.552, -4.772, 1.842) magnetic field (13.068, 51.422, 3.448)\n",
"2021/08/30 11:12:13 accelerometer (-4.621, -6.742, -2.404)\n",
"2021/08/30 11:12:13 accelerometer (-3.74, -5.582, -2.128)\n",
"2021/08/30 11:12:13 accelerometer (-4.508, -5.546, -3.236) gyroscope (-2.705, -3.849, 1.288) magnetic field (18.289, 48.427, 1.383)\n",
"2021/08/30 11:12:13 accelerometer (-6.591, -7.711, -1.986)\n",
"2021/08/30 11:12:13 accelerometer (-6.998, -8.258, -4.229)\n",
"2021/08/30 11:12:14 accelerometer (-6.269, -8.288, -6.153) gyroscope (-5.766, -1.855, 1.756) magnetic field (26.367, 40.116, 8.674)\n",
"2021/08/30 11:12:14 accelerometer (-3.9, -9.912, -6.549)\n",
"2021/08/30 11:12:14 accelerometer (-4.676, -13.753, -3.682)\n",
"2021/08/30 11:12:14 accelerometer (-7.582, -16.143, -3.308) gyroscope (-8.514, -2.552, 1.237) magnetic field (32.132, 28.367, 16.571)\n",
"2021/08/30 11:12:14 accelerometer (-5.596, -15.071, -0.127)\n",
"2021/08/30 11:12:14 accelerometer (-5.857, -13.792, 5.783)\n",
"2021/08/30 11:12:14 accelerometer (-10.988, -14.54, 8.788) gyroscope (-8.204, -1.772, 1.261) magnetic field (37.845, 15.623, 27.193)\n",
"2021/08/30 11:12:14 accelerometer (-14.487, -13.335, 9.992)\n",
"2021/08/30 11:12:14 accelerometer (-12.908, -10.439, 4.606)\n",
"2021/08/30 11:12:14 accelerometer (-10.08, -9.872, -0.238) gyroscope (-6.378, 2.07, 4.726) magnetic field (39.243, 0.664, 30.955)\n",
"2021/08/30 11:12:14 accelerometer (-9.146, -8.474, 1.589)\n",
"2021/08/30 11:12:14 accelerometer (-10.608, -8.141, 1.381)\n",
"2021/08/30 11:12:14 accelerometer (-11.274, -7.336, -1.585) gyroscope (-8.753, 3.036, 4.825) magnetic field (30.049, -27.511, 34.213)\n",
"2021/08/30 11:12:14 accelerometer (-7.749, -5.307, 0.468)\n",
"2021/08/30 11:12:14 accelerometer (-5.018, -2.871, 2.44)\n",
"2021/08/30 11:12:14 accelerometer (-5.411, -0.533, 1.32) gyroscope (-8.633, 3.228, 4.577) magnetic field (18.227, -47.067, 21.075)\n",
"2021/08/30 11:12:14 accelerometer (-4.126, 0.494, -3.748)\n",
"2021/08/30 11:12:14 accelerometer (-2.987, -0.948, -1.284)\n",
"2021/08/30 11:12:14 accelerometer (-4.256, -2.167, 4.541) gyroscope (-10.003, 1.504, 2.498) magnetic field (2.569, -53.852, -7.613)\n",
"2021/08/30 11:12:14 accelerometer (-6.049, -1.536, 6.564)\n",
"2021/08/30 11:12:14 accelerometer (-5.1, 1.047, 9.256)\n",
"2021/08/30 11:12:14 accelerometer (-1.867, 1.299, 7.916) gyroscope (-7.774, 1.45, 2.015) magnetic field (-2.949, -44.712, -28.017)\n",
"2021/08/30 11:12:14 accelerometer (-2.555, 1.28, 9.079)\n",
"2021/08/30 11:12:14 accelerometer (-6.002, 0.433, 9.167)\n",
"2021/08/30 11:12:14 accelerometer (-6.59, 0.423, 8.598) gyroscope (-4.794, 1.033, 1.12) magnetic field (-5.563, -27.505, -46.249)\n",
"2021/08/30 11:12:14 accelerometer (-5.561, 0.571, 5.297)\n",
"2021/08/30 11:12:14 accelerometer (-0.843, 1.186, 4.324)\n",
"2021/08/30 11:12:14 accelerometer (0.341, 0.626, 6.652) gyroscope (-5.654, 0.77, 0.202) magnetic field (-2.806, -13.448, -50.368)\n",
"2021/08/30 11:12:14 accelerometer (-4.014, -2.175, 9.205)\n",
"2021/08/30 11:12:14 accelerometer (-7.538, -3.788, 11.337)\n",
"2021/08/30 11:12:14 accelerometer (-8.732, -3.139, 13.089) gyroscope (-3.277, -0.285, -0.9) magnetic field (-3.764, 2.341, -53.718)\n",
"2021/08/30 11:12:14 accelerometer (-8.446, -3.066, 11.526)\n",
"2021/08/30 11:12:14 accelerometer (-8.679, -2.757, 10.794)\n",
"2021/08/30 11:12:14 accelerometer (-9.141, -2.158, 10.021) gyroscope (-0.493, 0.061, 0.025) magnetic field (-6.07, 7.018, -51.048)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021/08/30 11:12:14 accelerometer (-12.226, -2.32, 11.275)\n",
"2021/08/30 11:12:14 accelerometer (-15.415, -2.823, 13.165)\n",
"2021/08/30 11:12:14 accelerometer (-15.423, -2.51, 15.402) gyroscope (1.269, -1.596, 2.069) magnetic field (-6.672, 5.573, -51.69)\n",
"2021/08/30 11:12:14 accelerometer (-11.459, -1.541, 14.077)\n",
"2021/08/30 11:12:14 accelerometer (-9.145, -0.982, 11.927)\n",
"2021/08/30 11:12:14 accelerometer (-10.484, -2.777, 10.02) gyroscope (4.155, -2.24, 4.777) magnetic field (-12.208, 0.45, -51.798)\n",
"2021/08/30 11:12:14 accelerometer (-10.669, -3.482, 7.678)\n",
"2021/08/30 11:12:14 accelerometer (-10.094, -5.404, 5.788)\n",
"2021/08/30 11:12:14 accelerometer (-2.929, -3.6, 2.274) gyroscope (5.847, -4.532, 8.127) magnetic field (-26.67, -7.044, -49.628)\n",
"2021/08/30 11:12:14 accelerometer (-2.267, -2.8, -1.368)\n",
"2021/08/30 11:12:14 accelerometer (1.214, -3.834, -2.376)\n",
"2021/08/30 11:12:14 accelerometer (7.677, -1.654, 4.456) gyroscope (4.253, -5.775, 9.567) magnetic field (-38.037, -2.692, -43.493)\n",
"2021/08/30 11:12:14 accelerometer (9.493, -1.426, -1.221)\n",
"2021/08/30 11:12:14 accelerometer (12.273, -1.537, -10.391)\n",
"2021/08/30 11:12:14 accelerometer (12.722, -1.561, -4.665) gyroscope (3.533, -2.268, 8.393) magnetic field (-44.286, 8.344, -30.741)\n",
"2021/08/30 11:12:14 accelerometer (10.378, -4.338, 2.697)\n",
"2021/08/30 11:12:15 accelerometer (9.875, -5.647, -1.362)\n",
"2021/08/30 11:12:15 accelerometer (10.421, -7.341, -3.408) gyroscope (2.927, -2.21, 7.075) magnetic field (-40.191, 21.202, -26.222)\n",
"2021/08/30 11:12:15 accelerometer (11.194, -7.679, -0.217)\n",
"2021/08/30 11:12:15 accelerometer (10.092, -7.61, 1.189)\n",
"2021/08/30 11:12:15 accelerometer (6.357, -9.372, 0.092) gyroscope (1.726, 0.027, 6.036) magnetic field (-29.57, 32.393, -23.614)\n",
"2021/08/30 11:12:15 accelerometer (5.046, -10.751, 1.046)\n",
"2021/08/30 11:12:15 accelerometer (4.363, -13.758, 2.601)\n",
"2021/08/30 11:12:15 accelerometer (5.063, -13.566, 3.456) gyroscope (1.645, 0.576, 6.277) magnetic field (-15.194, 37.38, -24.837)\n",
"2021/08/30 11:12:15 accelerometer (3.056, -12.711, 1.49)\n",
"2021/08/30 11:12:15 accelerometer (0.433, -13.813, -1.426)\n",
"2021/08/30 11:12:15 accelerometer (-1.907, -15.923, 2.033) gyroscope (1.293, 0.189, 6.502) magnetic field (2.077, 35.185, -28.106)\n",
"2021/08/30 11:12:15 accelerometer (-2.775, -18.228, 4.606)\n",
"2021/08/30 11:12:15 accelerometer (-2.954, -17.964, 4.366)\n",
"2021/08/30 11:12:15 accelerometer (-2.379, -17.559, 1.909) gyroscope (2.389, -1.006, 7.373) magnetic field (11.937, 31.856, -30.002)\n",
"2021/08/30 11:12:15 accelerometer (-2.356, -17.073, 1.079)\n",
"2021/08/30 11:12:15 accelerometer (-2.932, -18.061, 4.517)\n",
"2021/08/30 11:12:15 accelerometer (-4.577, -18.316, 6.754) gyroscope (1.649, 0.57, 5.658) magnetic field (24.066, 21.924, -34.906)\n",
"2021/08/30 11:12:15 accelerometer (-6.006, -18.715, 6.432)\n",
"2021/08/30 11:12:15 accelerometer (-6.321, -17.748, 6.497)\n",
"2021/08/30 11:12:15 accelerometer (-6.145, -15.285, 3.924) gyroscope (1.205, 1.78, 4.386) magnetic field (34.753, 15.615, -36.892)\n",
"2021/08/30 11:12:15 accelerometer (-8.277, -13.737, 4.493)\n",
"2021/08/30 11:12:15 accelerometer (-10.04, -14.054, 2.207)\n",
"2021/08/30 11:12:15 accelerometer (-10.501, -13.475, -2.108) gyroscope (-2.126, 3.699, 2.737) magnetic field (43.766, 5.486, -30.112)\n",
"2021/08/30 11:12:15 accelerometer (-10.385, -16.182, -3.976)\n",
"2021/08/30 11:12:15 accelerometer (-10.752, -20.03, -3.755)\n",
"2021/08/30 11:12:15 accelerometer (-10.847, -19.914, -3.221) gyroscope (-5.944, 2.449, 2.014) magnetic field (49.55, 5.682, -22.455)\n",
"2021/08/30 11:12:15 accelerometer (-7.157, -17.654, -9.313)\n",
"2021/08/30 11:12:15 accelerometer (-4.432, -18.772, -14.874)\n",
"2021/08/30 11:12:15 accelerometer (-3.704, -21.172, -9.084) gyroscope (-9.473, 1.75, 1.903) magnetic field (53.469, 7.223, -13.623)\n",
"2021/08/30 11:12:15 accelerometer (-4.812, -17.99, -3.496)\n",
"2021/08/30 11:12:15 accelerometer (-7.489, -14.517, -0.081)\n",
"2021/08/30 11:12:15 accelerometer (-5.398, -11.082, -1.196) gyroscope (-9.441, 2.565, 2.59) magnetic field (54.049, 6.067, -6.372)\n",
"2021/08/30 11:12:15 accelerometer (-1.98, -7.918, 2.343)\n",
"2021/08/30 11:12:15 accelerometer (-5.016, -5.666, 3.032)\n",
"2021/08/30 11:12:15 accelerometer (-6.918, -3.982, -0.083) gyroscope (-8.089, 3.229, 2.323) magnetic field (54.245, 0.64, 1.448)\n",
"2021/08/30 11:12:15 accelerometer (-5.132, -1.304, 3.19)\n",
"2021/08/30 11:12:15 accelerometer (-5.072, -0.52, 1.998)\n",
"2021/08/30 11:12:15 accelerometer (-4.683, 0.375, 3.223) gyroscope (-6.802, 3.482, 2.482) magnetic field (52.773, -7.277, 8.625)\n",
"2021/08/30 11:12:15 accelerometer (-4.808, 1.347, 3.774)\n",
"2021/08/30 11:12:15 accelerometer (-4.92, 1.026, 3.996)\n",
"2021/08/30 11:12:15 accelerometer (-3.582, 3.048, 5.903) gyroscope (-6.437, 4.139, 2.618) magnetic field (48.228, -19.979, 12.449)\n",
"2021/08/30 11:12:15 accelerometer (-1.471, 4.963, 5.082)\n",
"2021/08/30 11:12:15 accelerometer (-1.069, 6.093, 5.039)\n",
"2021/08/30 11:12:15 accelerometer (-0.996, 6.603, 5.54) gyroscope (-4.506, 3.485, 1.0) magnetic field (40.595, -27.974, 12.958)\n",
"2021/08/30 11:12:15 accelerometer (-2.205, 6.501, 4.798)\n",
"2021/08/30 11:12:15 accelerometer (-2.454, 5.948, 5.641)\n",
"2021/08/30 11:12:15 accelerometer (-1.771, 6.202, 5.582) gyroscope (-3.405, 2.947, -0.134) magnetic field (37.296, -33.02, 12.348)\n",
"2021/08/30 11:12:15 accelerometer (-1.597, 6.523, 4.272)\n",
"2021/08/30 11:12:15 accelerometer (-1.939, 6.26, 6.154)\n",
"2021/08/30 11:12:15 accelerometer (-3.619, 4.869, 6.983) gyroscope (-2.851, 2.663, -1.184) magnetic field (36.503, -33.38, 9.987)\n",
"2021/08/30 11:12:16 accelerometer (-5.466, 4.451, 7.79)\n",
"2021/08/30 11:12:16 accelerometer (-6.104, 4.374, 5.234)\n",
"2021/08/30 11:12:16 accelerometer (-6.786, 3.928, 4.046) gyroscope (-2.507, 3.917, -0.895) magnetic field (35.994, -33.093, 11.227)\n",
"2021/08/30 11:12:16 accelerometer (-7.878, 3.401, 4.503)\n",
"2021/08/30 11:12:16 accelerometer (-8.86, 3.639, 5.142)\n",
"2021/08/30 11:12:16 accelerometer (-8.376, 3.873, 4.984) gyroscope (-1.93, 2.881, -0.06) magnetic field (34.932, -33.314, 10.966)\n",
"2021/08/30 11:12:16 accelerometer (-8.756, 3.955, 3.869)\n",
"2021/08/30 11:12:16 accelerometer (-7.253, 4.887, 2.184)\n",
"2021/08/30 11:12:16 accelerometer (-6.896, 5.789, 2.594) gyroscope (-1.744, 2.037, 0.359) magnetic field (32.754, -36.017, 11.863)\n",
"2021/08/30 11:12:16 accelerometer (-7.305, 5.473, 2.519)\n",
"2021/08/30 11:12:16 accelerometer (-8.248, 4.884, -0.157)\n",
"2021/08/30 11:12:16 accelerometer (-7.615, 4.632, -1.292) gyroscope (-3.554, 3.204, 0.51) magnetic field (24.515, -37.572, 11.892)\n",
"2021/08/30 11:12:16 accelerometer (-6.648, 5.35, -0.673)\n",
"2021/08/30 11:12:16 accelerometer (-7.459, 4.756, 1.384)\n",
"2021/08/30 11:12:16 accelerometer (-7.351, 3.979, 3.417) gyroscope (-4.22, 1.62, -0.233) magnetic field (22.43, -40.239, 4.927)\n",
"2021/08/30 11:12:16 accelerometer (-7.762, 4.046, 5.654)\n",
"2021/08/30 11:12:16 accelerometer (-8.317, 3.924, 4.707)\n",
"2021/08/30 11:12:16 accelerometer (-8.286, 3.389, 3.543) gyroscope (-2.157, 1.272, -0.272) magnetic field (22.796, -39.967, -0.889)\n",
"2021/08/30 11:12:16 accelerometer (-7.266, 3.442, 1.669)\n",
"2021/08/30 11:12:16 accelerometer (-6.604, 4.037, 2.57)\n",
"2021/08/30 11:12:16 accelerometer (-8.857, 3.018, 3.657) gyroscope (-1.712, -0.023, -0.906) magnetic field (23.497, -39.156, -4.415)\n",
"2021/08/30 11:12:16 accelerometer (-7.658, 2.737, 3.188)\n",
"2021/08/30 11:12:16 accelerometer (-5.124, 3.103, 3.013)\n",
"2021/08/30 11:12:16 accelerometer (-3.996, 3.692, 1.72) gyroscope (-1.206, -0.505, -1.128) magnetic field (31.296, -36.389, -4.246)\n",
"2021/08/30 11:12:16 accelerometer (-5.328, 2.435, 2.423)\n",
"2021/08/30 11:12:16 accelerometer (-9.033, -0.596, 3.278)\n",
"2021/08/30 11:12:16 accelerometer (-10.306, -2.873, 4.302) gyroscope (-1.9, -1.633, -2.024) magnetic field (33.054, -33.073, -7.828)\n",
"2021/08/30 11:12:16 accelerometer (-8.495, -2.532, 7.225)\n",
"2021/08/30 11:12:16 accelerometer (-5.76, -1.168, 10.003)\n",
"2021/08/30 11:12:16 accelerometer (-4.864, -1.16, 11.212) gyroscope (-1.25, -1.231, -1.135) magnetic field (34.738, -27.837, -15.622)\n",
"2021/08/30 11:12:16 accelerometer (-7.794, -3.111, 9.074)\n",
"2021/08/30 11:12:16 accelerometer (-9.999, -4.031, 7.126)\n",
"2021/08/30 11:12:16 accelerometer (-9.268, -3.39, 6.856) gyroscope (-0.174, 0.258, 0.252) magnetic field (36.426, -24.845, -19.563)\n",
"2021/08/30 11:12:16 accelerometer (-7.408, -2.755, 7.634)\n",
"2021/08/30 11:12:16 accelerometer (-4.541, -0.917, 8.789)\n",
"2021/08/30 11:12:16 accelerometer (-6.165, -1.454, 8.765) gyroscope (0.71, 0.096, 0.637) magnetic field (34.903, -26.028, -17.217)\n",
"2021/08/30 11:12:16 accelerometer (-8.124, -3.104, 8.147)\n",
"2021/08/30 11:12:16 accelerometer (-8.223, -2.854, 8.587)\n",
"2021/08/30 11:12:16 accelerometer (-6.371, -1.816, 8.639) gyroscope (0.924, 1.261, 2.169) magnetic field (33.768, -29.632, -14.736)\n",
"2021/08/30 11:12:16 accelerometer (-4.536, -0.909, 7.602)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021/08/30 11:12:16 accelerometer (-3.95, -0.959, 5.905)\n",
"2021/08/30 11:12:16 accelerometer (-8.051, -1.104, 6.491) gyroscope (0.756, 1.861, 2.609) magnetic field (31.094, -34.76, -11.433)\n",
"2021/08/30 11:12:16 accelerometer (-10.353, -3.545, 6.588)\n",
"2021/08/30 11:12:16 accelerometer (-8.612, -4.29, 4.911)\n",
"2021/08/30 11:12:16 accelerometer (-7.136, -1.605, 4.119) gyroscope (-0.316, 3.077, 5.133) magnetic field (25.091, -40.566, -8.588)\n",
"2021/08/30 11:12:16 accelerometer (-7.721, -2.737, 6.063)\n",
"2021/08/30 11:12:16 accelerometer (-8.709, -2.534, 6.505)\n",
"2021/08/30 11:12:16 accelerometer (-4.932, -1.921, 6.451) gyroscope (-0.412, 2.44, 6.221) magnetic field (10.402, -45.861, -5.765)\n",
"2021/08/30 11:12:16 accelerometer (-0.994, -0.876, 5.612)\n",
"2021/08/30 11:12:16 accelerometer (-0.939, 0.694, 2.549)\n",
"2021/08/30 11:12:17 accelerometer (-0.195, 4.584, 6.495) gyroscope (-2.015, 2.094, 5.971) magnetic field (-6.561, -44.358, -9.88)\n",
"2021/08/30 11:12:17 accelerometer (4.181, 6.703, 14.2)\n",
"2021/08/30 11:12:17 accelerometer (6.163, 6.025, 8.867)\n",
"2021/08/30 11:12:17 accelerometer (0.892, 10.156, 1.31) gyroscope (-0.547, 4.237, 4.643) magnetic field (-22.514, -35.451, -17.817)\n",
"2021/08/30 11:12:17 accelerometer (7.715, 15.423, 3.199)\n",
"2021/08/30 11:12:17 accelerometer (10.819, 17.054, 4.64)\n",
"2021/08/30 11:12:17 accelerometer (1.629, 14.694, -0.505) gyroscope (-3.216, 3.39, 1.918) magnetic field (-26.223, -25.218, -26.914)\n",
"2021/08/30 11:12:17 accelerometer (6.851, 14.491, 3.187)\n",
"2021/08/30 11:12:17 accelerometer (12.134, 17.554, 12.297)\n",
"2021/08/30 11:12:17 accelerometer (5.467, 13.406, 12.262) gyroscope (-4.541, 1.901, 0.572) magnetic field (-20.219, -10.393, -38.891)\n",
"2021/08/30 11:12:17 accelerometer (-0.494, 7.579, 9.94)\n",
"2021/08/30 11:12:17 accelerometer (1.535, 6.084, 11.208)\n",
"2021/08/30 11:12:17 accelerometer (6.268, 8.715, 16.351) gyroscope (-2.39, 0.449, 1.568) magnetic field (-16.377, -2.081, -41.288)\n",
"2021/08/30 11:12:17 accelerometer (5.154, 8.478, 14.121)\n",
"2021/08/30 11:12:17 accelerometer (3.3, 8.177, 9.602)\n",
"2021/08/30 11:12:17 accelerometer (2.622, 7.084, 10.819) gyroscope (-1.569, 2.925, 1.651) magnetic field (-12.268, 3.732, -42.46)\n",
"2021/08/30 11:12:17 accelerometer (1.664, 5.744, 11.119)\n",
"2021/08/30 11:12:17 accelerometer (1.39, 5.584, 9.373)\n",
"2021/08/30 11:12:17 accelerometer (2.752, 8.074, 1.662) gyroscope (1.272, 0.595, 0.854) magnetic field (-6.677, 4.126, -44.522)\n",
"2021/08/30 11:12:17 accelerometer (0.658, 5.661, 7.406)\n",
"2021/08/30 11:12:17 accelerometer (-3.043, 4.426, 8.471)\n",
"2021/08/30 11:12:17 accelerometer (0.579, 5.324, 5.775) gyroscope (-0.237, 1.583, 1.878) magnetic field (-2.737, 2.858, -45.688)\n",
"2021/08/30 11:12:17 accelerometer (-0.892, 5.884, 6.596)\n",
"2021/08/30 11:12:17 accelerometer (-4.068, 6.153, 8.39)\n",
"2021/08/30 11:12:17 accelerometer (-3.652, 6.725, 12.479) gyroscope (-1.128, 2.768, 1.887) magnetic field (0.502, 5.056, -44.438)\n",
"2021/08/30 11:12:17 accelerometer (-1.987, 4.952, 13.712)\n",
"2021/08/30 11:12:17 accelerometer (2.919, 5.832, 12.893)\n",
"2021/08/30 11:12:17 accelerometer (5.028, 5.237, 9.41) gyroscope (1.296, 4.957, 2.53) magnetic field (15.384, 3.507, -43.936)\n",
"2021/08/30 11:12:17 accelerometer (1.484, 4.578, 13.208)\n",
"2021/08/30 11:12:17 accelerometer (-4.852, 5.034, 15.195)\n",
"2021/08/30 11:12:17 accelerometer (-6.081, 4.966, 11.277) gyroscope (2.711, 2.542, 0.678) magnetic field (22.422, -0.68, -41.767)\n",
"2021/08/30 11:12:17 accelerometer (-1.141, 6.603, 8.89)\n",
"2021/08/30 11:12:17 accelerometer (0.901, 7.465, 6.552)\n",
"2021/08/30 11:12:17 accelerometer (1.071, 8.04, 3.116) gyroscope (3.362, 2.563, 0.698) magnetic field (30.123, -11.554, -33.647)\n",
"2021/08/30 11:12:17 accelerometer (-1.334, 7.547, 2.871)\n",
"2021/08/30 11:12:17 accelerometer (-3.685, 7.916, 3.846)\n",
"2021/08/30 11:12:17 accelerometer (-4.191, 8.898, 1.52) gyroscope (2.481, 3.141, 0.234) magnetic field (34.634, -16.561, -27.353)\n",
"2021/08/30 11:12:17 accelerometer (-1.608, 9.149, -1.167)\n",
"2021/08/30 11:12:17 accelerometer (-0.816, 8.363, -1.045)\n",
"2021/08/30 11:12:17 accelerometer (-1.002, 8.061, 2.216) gyroscope (1.431, 2.521, -0.674) magnetic field (39.004, -20.634, -20.968)\n",
"2021/08/30 11:12:17 accelerometer (-1.39, 8.295, 3.109)\n",
"2021/08/30 11:12:17 accelerometer (-1.16, 7.349, 1.255)\n",
"2021/08/30 11:12:17 accelerometer (0.903, 6.741, -2.301) gyroscope (3.318, 4.673, -1.333) magnetic field (44.853, -20.764, -9.985)\n",
"2021/08/30 11:12:17 accelerometer (0.933, 6.595, -5.156)\n",
"2021/08/30 11:12:17 accelerometer (-3.675, 5.31, -6.95)\n",
"2021/08/30 11:12:17 accelerometer (-4.952, 5.636, -7.32) gyroscope (2.393, 2.612, -2.795) magnetic field (48.706, -15.18, 4.934)\n",
"2021/08/30 11:12:17 accelerometer (-3.169, 6.009, -8.033)\n",
"2021/08/30 11:12:17 accelerometer (-1.392, 6.235, -7.408)\n",
"2021/08/30 11:12:17 accelerometer (-5.075, 5.1, -6.054) gyroscope (0.088, -1.091, -3.145) magnetic field (51.441, -8.205, 11.132)\n",
"2021/08/30 11:12:17 accelerometer (-6.749, 4.644, -2.537)\n",
"2021/08/30 11:12:18 accelerometer (-9.017, 6.602, -0.201)\n",
"2021/08/30 11:12:18 accelerometer (-8.594, 5.901, -0.247) gyroscope (-0.198, -4.481, -2.399) magnetic field (52.809, 1.98, 3.704)\n",
"2021/08/30 11:12:18 accelerometer (-4.496, 4.325, -2.928)\n",
"2021/08/30 11:12:18 accelerometer (-1.306, 2.844, -0.068)\n",
"2021/08/30 11:12:18 accelerometer (-4.304, 1.635, 4.221) gyroscope (-0.62, -4.826, -3.578) magnetic field (51.584, 7.413, -8.919)\n",
"2021/08/30 11:12:18 accelerometer (-8.868, 0.158, 5.774)\n",
"2021/08/30 11:12:18 accelerometer (-8.469, -1.035, 5.613)\n",
"2021/08/30 11:12:18 accelerometer (-7.19, -3.287, 2.576) gyroscope (1.547, -0.719, -4.189) magnetic field (41.644, 15.917, -26.093)\n",
"2021/08/30 11:12:18 accelerometer (-7.977, -5.17, 1.744)\n",
"2021/08/30 11:12:18 accelerometer (-11.023, -6.205, 0.723)\n",
"2021/08/30 11:12:18 accelerometer (-12.471, -6.499, -0.582) gyroscope (2.39, 1.052, -5.058) magnetic field (39.422, 21.308, -27.571)\n",
"2021/08/30 11:12:18 accelerometer (-12.104, -5.819, -1.44)\n",
"2021/08/30 11:12:18 accelerometer (-11.654, -7.099, -0.274)\n",
"2021/08/30 11:12:18 accelerometer (-10.634, -7.642, 1.385) gyroscope (1.523, 0.378, -3.991) magnetic field (32.94, 27.71, -27.969)\n",
"2021/08/30 11:12:18 accelerometer (-12.711, -7.961, 2.625)\n",
"2021/08/30 11:12:18 accelerometer (-14.977, -6.803, 2.126)\n",
"2021/08/30 11:12:18 accelerometer (-16.38, -5.733, 0.034) gyroscope (1.602, 0.222, -2.415) magnetic field (26.852, 31.407, -30.189)\n",
"2021/08/30 11:12:18 accelerometer (-15.068, -3.929, -1.701)\n",
"2021/08/30 11:12:18 accelerometer (-15.31, -4.323, -1.135)\n",
"2021/08/30 11:12:18 accelerometer (-16.141, -3.248, 1.123) gyroscope (0.03, -0.987, 0.392) magnetic field (24.642, 30.639, -32.968)\n",
"2021/08/30 11:12:18 accelerometer (-16.588, -3.363, 1.304)\n",
"2021/08/30 11:12:18 accelerometer (-13.72, -4.043, 1.337)\n",
"2021/08/30 11:12:18 accelerometer (-10.659, -4.435, 0.968) gyroscope (-0.467, -0.995, 4.401) magnetic field (24.821, 29.007, -35.999)\n",
"2021/08/30 11:12:18 accelerometer (-10.438, -5.131, 1.873)\n",
"2021/08/30 11:12:18 accelerometer (-11.082, -4.154, 3.555)\n",
"2021/08/30 11:12:18 accelerometer (-12.269, -4.058, 3.932) gyroscope (-0.797, -1.231, 5.96) magnetic field (29.99, 22.523, -36.542)\n",
"2021/08/30 11:12:18 accelerometer (-10.454, -6.419, 2.811)\n",
"2021/08/30 11:12:18 accelerometer (-5.772, -5.577, 0.723)\n",
"2021/08/30 11:12:18 accelerometer (-3.427, -3.767, 0.029) gyroscope (-0.57, -2.446, 6.499) magnetic field (32.966, 14.451, -36.787)\n",
"2021/08/30 11:12:18 accelerometer (-3.644, -0.413, 1.111)\n",
"2021/08/30 11:12:18 accelerometer (-5.503, 1.519, 2.163)\n",
"2021/08/30 11:12:18 accelerometer (-5.742, 0.487, 2.133) gyroscope (-1.341, -0.962, 4.91) magnetic field (32.877, 3.527, -39.617)\n",
"2021/08/30 11:12:18 accelerometer (-5.191, 1.208, 2.861)\n",
"2021/08/30 11:12:18 accelerometer (-4.818, 2.509, 5.578)\n",
"2021/08/30 11:12:18 accelerometer (-5.298, 4.231, 8.031) gyroscope (-1.901, -0.976, 4.207) magnetic field (29.082, 0.674, -43.176)\n",
"2021/08/30 11:12:18 accelerometer (-5.535, 5.528, 8.866)\n",
"2021/08/30 11:12:18 accelerometer (-4.602, 5.438, 7.685)\n",
"2021/08/30 11:12:18 accelerometer (-4.407, 5.058, 7.639) gyroscope (-0.511, -1.001, 3.439) magnetic field (26.534, -4.14, -44.258)\n",
"2021/08/30 11:12:18 accelerometer (-3.533, 5.45, 8.217)\n",
"2021/08/30 11:12:18 accelerometer (-2.523, 7.18, 7.728)\n",
"2021/08/30 11:12:18 accelerometer (-2.893, 7.124, 6.361) gyroscope (-0.102, -0.334, 3.091) magnetic field (23.754, -7.265, -45.043)\n",
"2021/08/30 11:12:18 accelerometer (-3.656, 6.28, 5.549)\n",
"2021/08/30 11:12:18 accelerometer (-2.324, 6.542, 6.147)\n",
"2021/08/30 11:12:18 accelerometer (0.158, 6.944, 5.942) gyroscope (-0.343, -1.589, 2.89) magnetic field (18.881, -9.998, -47.59)\n",
"2021/08/30 11:12:18 accelerometer (1.782, 7.004, 5.759)\n",
"2021/08/30 11:12:18 accelerometer (3.068, 7.272, 7.005)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021/08/30 11:12:18 accelerometer (3.111, 7.813, 7.799) gyroscope (-0.421, -1.119, 2.155) magnetic field (11.962, -10.837, -49.249)\n",
"2021/08/30 11:12:18 accelerometer (2.186, 7.397, 7.825)\n",
"2021/08/30 11:12:18 accelerometer (2.283, 6.877, 6.889)\n",
"2021/08/30 11:12:18 accelerometer (3.746, 6.922, 6.402) gyroscope (0.223, -0.313, 1.144) magnetic field (6.945, -10.014, -51.154)\n",
"2021/08/30 11:12:19 accelerometer (4.004, 6.79, 6.319)\n",
"2021/08/30 11:12:19 accelerometer (2.386, 6.336, 6.584)\n",
"2021/08/30 11:12:19 accelerometer (1.293, 6.068, 7.209) gyroscope (-0.133, -0.326, 0.351) magnetic field (6.395, -11.488, -51.774)\n",
"2021/08/30 11:12:19 accelerometer (1.997, 6.267, 7.155)\n",
"2021/08/30 11:12:19 accelerometer (3.48, 6.518, 6.931)\n",
"2021/08/30 11:12:19 accelerometer (4.001, 6.492, 6.882) gyroscope (-0.009, -0.21, 0.521) magnetic field (4.875, -11.092, -51.519)\n",
"2021/08/30 11:12:19 accelerometer (3.387, 6.598, 7.007)\n",
"2021/08/30 11:12:19 accelerometer (1.836, 6.645, 7.802)\n",
"2021/08/30 11:12:19 accelerometer (1.715, 7.049, 8.203) gyroscope (0.16, -0.108, 0.209) magnetic field (4.683, -10.984, -51.822)\n",
"2021/08/30 11:12:19 accelerometer (2.587, 7.843, 7.791)\n",
"2021/08/30 11:12:19 accelerometer (3.208, 8.169, 6.931)\n",
"2021/08/30 11:12:19 accelerometer (2.867, 7.812, 6.22) gyroscope (0.513, 0.054, -0.002) magnetic field (4.692, -12.024, -52.405)\n",
"2021/08/30 11:12:19 accelerometer (3.296, 7.646, 6.472)\n",
"2021/08/30 11:12:19 accelerometer (4.344, 7.967, 7.07)\n",
"2021/08/30 11:12:19 accelerometer (3.11, 7.491, 7.59) gyroscope (0.264, -0.132, -0.763) magnetic field (4.672, -13.177, -53.215)\n",
"2021/08/30 11:12:19 accelerometer (4.354, 7.469, 8.447)\n",
"2021/08/30 11:12:19 accelerometer (7.311, 8.037, 7.539)\n",
"2021/08/30 11:12:19 accelerometer (7.926, 6.87, 5.346) gyroscope (1.135, 2.059, -2.101) magnetic field (7.0, -14.795, -50.784)\n",
"2021/08/30 11:12:19 accelerometer (6.017, 4.927, 4.304)\n",
"2021/08/30 11:12:19 accelerometer (5.374, 4.973, 4.418)\n",
"2021/08/30 11:12:19 accelerometer (3.851, 3.646, 4.005) gyroscope (1.086, 3.968, -4.509) magnetic field (13.247, -15.787, -49.062)\n",
"2021/08/30 11:12:19 accelerometer (1.945, 2.72, 2.382)\n",
"2021/08/30 11:12:19 accelerometer (-1.053, 1.307, -0.116)\n",
"2021/08/30 11:12:19 accelerometer (-6.571, -0.194, -0.816) gyroscope (1.204, 3.226, -6.918) magnetic field (30.007, -13.003, -41.262)\n",
"2021/08/30 11:12:19 accelerometer (-12.966, 0.444, 3.147)\n",
"2021/08/30 11:12:19 accelerometer (-12.103, 3.451, 3.862)\n",
"2021/08/30 11:12:19 accelerometer (-11.866, 0.481, 2.703) gyroscope (1.284, 1.689, -5.134) magnetic field (40.133, -2.457, -32.108)\n",
"2021/08/30 11:12:19 accelerometer (-9.391, 1.283, 2.015)\n",
"2021/08/30 11:12:19 accelerometer (-10.495, 0.488, 2.022)\n",
"2021/08/30 11:12:19 accelerometer (-13.837, 0.36, 2.415) gyroscope (1.587, 1.416, -4.801) magnetic field (42.624, 9.95, -28.016)\n",
"2021/08/30 11:12:19 accelerometer (-12.571, -0.063, 0.447)\n",
"2021/08/30 11:12:19 accelerometer (-12.304, -1.755, -1.051)\n",
"2021/08/30 11:12:19 accelerometer (-11.893, -1.132, -1.59) gyroscope (1.882, 2.33, -3.755) magnetic field (41.824, 17.601, -23.928)\n",
"2021/08/30 11:12:19 accelerometer (-10.971, -1.439, -1.884)\n",
"2021/08/30 11:12:19 accelerometer (-10.411, -1.808, -1.938)\n",
"2021/08/30 11:12:19 accelerometer (-10.88, -2.142, -1.545) gyroscope (1.389, 1.268, -3.526) magnetic field (40.03, 24.339, -21.424)\n",
"2021/08/30 11:12:19 accelerometer (-11.366, -2.844, -1.32)\n",
"2021/08/30 11:12:19 accelerometer (-9.359, -3.122, -2.097)\n",
"2021/08/30 11:12:19 accelerometer (-7.829, -4.014, -2.699) gyroscope (0.938, 1.379, -2.933) magnetic field (36.243, 29.76, -19.895)\n",
"2021/08/30 11:12:19 accelerometer (-5.564, -5.106, -1.668)\n",
"2021/08/30 11:12:19 accelerometer (-3.923, -6.511, -0.251) gyroscope (0.05, 0.725, -3.028) magnetic field (31.233, 34.844, -20.5)\n",
"2021/08/30 11:12:19 accelerometer (-4.071, -9.335, 1.142)\n",
"2021/08/30 11:12:19 accelerometer (-6.738, -10.995, -1.119)\n",
"2021/08/30 11:12:19 accelerometer (-9.36, -10.005, -3.602) gyroscope (0.964, 1.242, -3.994) magnetic field (25.524, 39.981, -17.539)\n",
"2021/08/30 11:12:19 accelerometer (-11.736, -8.502, -4.984)\n",
"2021/08/30 11:12:19 accelerometer (-12.85, -8.187, -4.859)\n",
"2021/08/30 11:12:19 accelerometer (-12.183, -7.564, -3.689) gyroscope (-0.415, 0.308, -1.631) magnetic field (16.834, 43.513, -19.145)\n",
"2021/08/30 11:12:19 accelerometer (-11.497, -7.057, -2.587)\n",
"2021/08/30 11:12:19 accelerometer (-11.196, -6.572, -1.943)\n",
"2021/08/30 11:12:20 accelerometer (-11.629, -6.414, -2.248) gyroscope (-0.821, -0.246, 1.413) magnetic field (15.616, 45.573, -17.93)\n",
"2021/08/30 11:12:20 accelerometer (-11.609, -6.521, -2.612)\n",
"2021/08/30 11:12:20 accelerometer (-9.76, -6.668, -3.452)\n",
"2021/08/30 11:12:20 accelerometer (-7.354, -7.124, -3.205) gyroscope (-1.307, -0.808, 4.577) magnetic field (22.776, 42.943, -16.618)\n",
"2021/08/30 11:12:20 accelerometer (-7.866, -6.741, -1.696)\n",
"2021/08/30 11:12:20 accelerometer (-8.764, -6.369, -2.265)\n",
"2021/08/30 11:12:20 accelerometer (-9.524, -8.636, -3.116) gyroscope (-1.383, -1.538, 6.197) magnetic field (34.91, 34.239, -12.917)\n",
"2021/08/30 11:12:20 accelerometer (-9.331, -7.647, -0.9)\n",
"2021/08/30 11:12:20 accelerometer (-6.537, -3.13, -2.788)\n",
"2021/08/30 11:12:20 accelerometer (-9.139, -3.485, -6.94) gyroscope (-1.135, -2.011, 6.748) magnetic field (43.053, 22.845, -13.683)\n",
"2021/08/30 11:12:20 accelerometer (-6.535, -5.267, -10.381)\n",
"2021/08/30 11:12:20 accelerometer (-4.955, -3.972, -6.479)\n",
"2021/08/30 11:12:20 accelerometer (-9.167, -1.326, 2.915) gyroscope (-4.929, -2.647, 5.167) magnetic field (47.609, 5.719, -17.362)\n",
"2021/08/30 11:12:20 accelerometer (-10.506, 2.064, 8.565)\n",
"2021/08/30 11:12:20 accelerometer (-10.353, 2.508, 6.357)\n",
"2021/08/30 11:12:20 accelerometer (-7.916, 1.575, 1.452) gyroscope (-0.859, -1.948, 6.445) magnetic field (44.943, -5.303, -25.416)\n",
"2021/08/30 11:12:20 accelerometer (-2.829, 2.799, -1.083)\n",
"2021/08/30 11:12:20 accelerometer (0.042, 5.99, -0.828)\n",
"2021/08/30 11:12:20 accelerometer (-1.715, 8.388, 2.938) gyroscope (-2.074, -2.75, 4.123) magnetic field (35.122, -19.211, -32.276)\n",
"2021/08/30 11:12:20 accelerometer (-3.487, 8.005, 5.345)\n"
]
},
{
"ename": "KeyboardInterrupt",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-6-23adbe509b4c>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mwhile\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mmessage\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maddress\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0ms\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrecvfrom\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m8192\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m \u001b[0mprint_sensor_data\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmessage\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;32mexcept\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mKeyboardInterrupt\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mSystemExit\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mKeyboardInterrupt\u001b[0m: "
]
}
],
"source": [
"while 1:\n",
" try:\n",
" message, address = s.recvfrom(8192)\n",
" print_sensor_data(message)\n",
" except (KeyboardInterrupt, SystemExit):\n",
" raise\n",
" except:\n",
" traceback.print_exc()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Податоците кои се вчитуваат може и да се зачувуваат за понатамошна обработка. Со следните наредби се читаат податоците на истиот начин како досега и се запишуваат во .csv датотека. Податоците во датотеката се организирани во следните колони:\n",
"1. време\n",
"2. aкселерометар - x координата\n",
"3. aкселерометар - y координата\n",
"4. aкселерометар - z координата\n",
"5. жироскоп - x координата\n",
"6. жироскоп - y координата\n",
"7. жироскоп - z координата\n",
"8. магнетно поле - x координата\n",
"9. магнетно поле - y координата\n",
"10. магнетно поле - z координата\n",
"\n",
"Доколку во некој момент се праќаат податоци од само дел од овие сензори, соодветната колона е празна"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"#time, accelerometer_x, accelerometer_y, accelerometer_z, gyroscope_x, gyroscope_y, gyroscope_z, magnetic_field_x, magnetic_field_y, magnetic_field_z\n",
"f = open(\"mobile_sensor_data.csv\", \"w\")"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"def write_to_file(sensor_message, f):\n",
" sensor_message = sensor_message.decode()\n",
" sensor_data = re.split(\"[ ]+|,[ ]+|,\", sensor_message)\n",
" \n",
" sensor_names = {3: \"accelerometer\", 4: \"gyroscope\", 5: \"magnetic field\"}\n",
" \n",
" sensor_len = {3: 3, 4: 3, 5: 3}\n",
" \n",
" line = time.strftime(\"%Y/%m/%d %H:%M:%S\")\n",
" \n",
" i = 1\n",
" \n",
" accelerator = False\n",
" gyroscope = False\n",
" magnetic = False\n",
" \n",
" while i < len(sensor_data):\n",
" sensor = int(sensor_data[i])\n",
" sensor_name = sensor_names[sensor]\n",
"\n",
" if sensor == 3:\n",
" line += \", \" + sensor_data[i+1] + \", \" + sensor_data[i+2] + \", \" + sensor_data[i+3] + \", \"\n",
" accelerator = True\n",
" if sensor == 4:\n",
" if not accelerator:\n",
" line += \",,,\"\n",
" line += sensor_data[i+1] + \", \" + sensor_data[i+2] + \", \" + sensor_data[i+3] + \", \"\n",
" gyroscope = True\n",
" if sensor == 5:\n",
" if not accelerator:\n",
" line += \",,,\"\n",
" if not gyroscope:\n",
" line += \",,,\"\n",
" line += sensor_data[i+1] + \", \" + sensor_data[i+2] + \", \" + sensor_data[i+3]\n",
" magnetic = True\n",
" i += 4 \n",
"\n",
" if not magnetic:\n",
" line += \",,\"\n",
" if not gyroscope and not magnetic:\n",
" line += \",,,\"\n",
" \n",
" f.write(line)\n",
" f.write(\"\\n\")"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"ename": "KeyboardInterrupt",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-9-723ce5c47ff5>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mwhile\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mmessage\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maddress\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0ms\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrecvfrom\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m8192\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m \u001b[0mwrite_to_file\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmessage\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mf\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;32mexcept\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mKeyboardInterrupt\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mSystemExit\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mKeyboardInterrupt\u001b[0m: "
]
}
],
"source": [
"while 1:\n",
" try:\n",
" message, address = s.recvfrom(8192)\n",
" write_to_file(message, f)\n",
" except (KeyboardInterrupt, SystemExit):\n",
" raise\n",
" except:\n",
" traceback.print_exc()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"f.close()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Давање на наредби на актуатори"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Пример со контрола на звучникот на мобилен уред со Android преку Android Debug Bridge"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"За овој пример потребно е прво да се поврзе мобилниот уред со компјутерот од кој се дава наредбата. \n",
"\n",
"**За уреди со Android 11+**\n",
"1. Преземете ја најновата верзија на SDK Platform Tools (https://developer.android.com/studio/releases/platform-tools).\n",
"2. На мобилниот уред, овозможете ја опцијата developer options.\n",
"3. Овозможете ја опцијата Wireless debugging.\n",
"3. Стиснете Allow на прозорецот Allow wireless debugging on this network?\n",
"4. Изберете Pair device with pairing code. Зачувајте го кодот за спарување, IP адресата, и бројот на поратата прикажани на екранот.\n",
"5. На компјутертот, отворете терминал и навигирајте до android_sdk/platform-tools.\n",
"6. Извршете ја наредбата `adb pair ipaddr:port`. Користете ги IP адресата и бројот на порта од чекор 4.\n",
"7. Кога ќе ви биде побаран, внесете го кодот за спарување од чекор 4. Треба да добиете порака дека уредите се успешно поврзани.\n",
"\n",
"**За уреди со Android 10 или пониска верзија**\n",
"1. Преземете ја најновата верзија на SDK Platform Tools (https://developer.android.com/studio/releases/platform-tools).\n",
"2. Поврзете ги компјутерот и Android уредот на иста Wi-Fi мрежа.\n",
"3. Поврзете го мобилниот уред со компјутерот преку USB кабел.\n",
"4. Извршете ја наредбата `adb tcpip 5555` за уредот за слуша за TCP/IP конекција на портата 5555.\n",
"5. Дисконектирајте го USB кабелот.\n",
"6. Најдете ја IP адреста на Android уредот. Пример за кај би можела да биде: Settings > About phone > Status > IP address.\n",
"7. Поврзете се со уредот со неговата IP адреса со наредбата `adb connect device_ip_address:5555`.\n",
"8. Потврдете дека конекцијата е успешно остварена со наредбата `adb devices`."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"За следните наредби потребно е да го инсталирате пакетот adb-shell: `pip install adb-shell`"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"from adb_shell.adb_device import AdbDeviceTcp, AdbDeviceUsb\n",
"from adb_shell.auth.sign_pythonrsa import PythonRSASigner"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"adbkey = 'C:\\\\Users\\\\PC\\\\.android\\\\adbkey' # патека до клучот за поврзување"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Со следната наредба се извршува поврзување со уредот од Python апликацијата"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"with open(adbkey) as f:\n",
" priv = f.read()\n",
"with open(adbkey + '.pub') as f:\n",
" pub = f.read()\n",
"signer = PythonRSASigner(pub, priv)\n",
"\n",
"# Connect\n",
"device1 = AdbDeviceTcp('192.168.100.4', 5555, default_transport_timeout_s=9.)\n",
"device1.connect(rsa_keys=[signer], auth_timeout_s=0.1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Следната функција ја отвара датотеката дадена со патеката `file:///storage/emulated/0/Shrink_ray.ogg` и го активира звукот на мобилниот уред."
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"def play_sound(device):\n",
" device.shell('am start -a android.intent.action.VIEW -d file:///storage/emulated/0/Shrink_ray.ogg -t audio/ogg')"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"play_sound(device1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Поврзување на сензори и актуатори"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Со следните наредби се поврзуваат податоците од сензорите со контролата на актуаторот - звучникот на мобилниот уред. Доколку апсолутната вредност на х координатата на акселерометарот надмине 3, се активира звукот на мобилниот уред."
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"def get_accelerometer(sensor_message):\n",
" sensor_message = sensor_message.decode()\n",
" sensor_data = re.split(\"[ ]+|,[ ]+|,\", sensor_message)\n",
" \n",
" res = time.strftime(\"%Y/%m/%d %H:%M:%S\")\n",
" \n",
" i = 1\n",
"\n",
" while i < len(sensor_data):\n",
" try:\n",
" sensor = int(sensor_data[i])\n",
" if sensor == 3:\n",
" accelerometer = (float(sensor_data[i+1]), float(sensor_data[i+2]), float(sensor_data[i+3]))\n",
" res += str(accelerometer)\n",
" print (res)\n",
" return accelerometer\n",
" i += 1\n",
" except:\n",
" i += 1"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021/08/30 12:06:22(0.414, 3.214, 9.973)\n",
"2021/08/30 12:06:22(1.501, 3.451, 12.437)\n",
"2021/08/30 12:06:22(0.172, 3.389, 8.805)\n",
"2021/08/30 12:06:22(-0.066, 3.727, 8.183)\n",
"2021/08/30 12:06:22(-0.694, 3.873, 8.018)\n",
"2021/08/30 12:06:22(-1.016, 3.895, 8.541)\n",
"2021/08/30 12:06:22(-0.901, 3.934, 8.997)\n",
"2021/08/30 12:06:22(-0.702, 3.798, 8.995)\n",
"2021/08/30 12:06:22(-0.28, 3.687, 9.054)\n",
"2021/08/30 12:06:22(0.018, 3.53, 9.31)\n",
"2021/08/30 12:06:22(-0.087, 3.418, 9.682)\n",
"2021/08/30 12:06:22(-0.135, 3.5, 9.847)\n",
"2021/08/30 12:06:22(-0.249, 3.618, 9.901)\n",
"2021/08/30 12:06:22(-0.335, 3.59, 9.805)\n",
"2021/08/30 12:06:22(-0.253, 3.594, 9.401)\n",
"2021/08/30 12:06:22(-0.194, 3.584, 9.093)\n",
"2021/08/30 12:06:22(-0.183, 3.676, 9.09)\n",
"2021/08/30 12:06:22(-0.297, 3.723, 9.24)\n",
"2021/08/30 12:06:22(-0.438, 3.766, 9.346)\n",
"2021/08/30 12:06:22(-0.419, 3.783, 9.194)\n",
"2021/08/30 12:06:22(-0.484, 3.713, 9.244)\n",
"2021/08/30 12:06:22(-0.523, 3.68, 9.51)\n",
"2021/08/30 12:06:22(-0.099, 3.785, 9.61)\n",
"2021/08/30 12:06:22(0.024, 3.715, 9.51)\n",
"2021/08/30 12:06:22(-0.097, 3.644, 9.434)\n",
"2021/08/30 12:06:22(-0.142, 3.691, 9.427)\n",
"2021/08/30 12:06:22(-0.342, 3.774, 9.68)\n",
"2021/08/30 12:06:22(-0.646, 3.891, 9.957)\n",
"2021/08/30 12:06:22(-0.554, 3.958, 10.026)\n",
"2021/08/30 12:06:22(-0.321, 3.992, 9.862)\n",
"2021/08/30 12:06:22(-0.008, 3.915, 9.724)\n",
"2021/08/30 12:06:22(0.041, 3.862, 9.543)\n",
"2021/08/30 12:06:22(0.163, 4.081, 9.072)\n",
"2021/08/30 12:06:22(-0.051, 4.319, 8.856)\n",
"2021/08/30 12:06:22(-0.013, 4.441, 8.425)\n",
"2021/08/30 12:06:22(0.214, 4.581, 8.301)\n",
"2021/08/30 12:06:22(0.323, 4.714, 8.645)\n",
"2021/08/30 12:06:22(-0.352, 4.773, 9.063)\n",
"2021/08/30 12:06:22(-0.892, 4.689, 8.707)\n",
"2021/08/30 12:06:22(-0.852, 4.749, 8.6)\n",
"2021/08/30 12:06:22(-0.25, 4.918, 8.411)\n",
"2021/08/30 12:06:22(-0.3, 4.782, 8.107)\n",
"2021/08/30 12:06:22(-0.347, 4.852, 7.927)\n",
"2021/08/30 12:06:22(-0.565, 5.023, 7.757)\n",
"2021/08/30 12:06:22(-0.736, 5.16, 7.643)\n",
"2021/08/30 12:06:22(-0.654, 5.209, 8.153)\n",
"2021/08/30 12:06:22(-0.423, 5.145, 8.909)\n",
"2021/08/30 12:06:22(-0.594, 4.969, 9.527)\n",
"2021/08/30 12:06:22(-0.492, 4.876, 9.493)\n",
"2021/08/30 12:06:22(-0.492, 4.736, 9.006)\n",
"2021/08/30 12:06:22(-0.358, 4.641, 9.112)\n",
"2021/08/30 12:06:22(0.184, 4.749, 9.333)\n",
"2021/08/30 12:06:22(0.186, 4.678, 9.355)\n",
"2021/08/30 12:06:22(0.426, 4.743, 9.05)\n",
"2021/08/30 12:06:22(0.3, 4.681, 8.795)\n",
"2021/08/30 12:06:22(-0.068, 4.732, 8.508)\n",
"2021/08/30 12:06:22(0.099, 4.958, 8.082)\n",
"2021/08/30 12:06:22(0.062, 5.06, 7.881)\n",
"2021/08/30 12:06:22(-0.019, 5.033, 8.106)\n",
"2021/08/30 12:06:22(-0.01, 4.932, 8.472)\n",
"2021/08/30 12:06:22(-0.071, 4.84, 8.935)\n",
"2021/08/30 12:06:22(-0.086, 4.837, 8.926)\n",
"2021/08/30 12:06:22(-0.023, 4.957, 8.721)\n",
"2021/08/30 12:06:22(-0.029, 4.938, 8.93)\n",
"2021/08/30 12:06:22(-0.205, 4.805, 9.337)\n",
"2021/08/30 12:06:22(0.113, 4.763, 9.293)\n",
"2021/08/30 12:06:22(0.227, 4.73, 9.021)\n",
"2021/08/30 12:06:22(0.018, 4.713, 8.807)\n",
"2021/08/30 12:06:22(-0.095, 4.797, 8.723)\n",
"2021/08/30 12:06:22(0.001, 4.852, 8.746)\n",
"2021/08/30 12:06:22(0.056, 4.884, 8.732)\n",
"2021/08/30 12:06:22(0.023, 4.931, 8.539)\n",
"2021/08/30 12:06:22(-0.102, 4.914, 8.396)\n",
"2021/08/30 12:06:22(-0.154, 4.875, 8.511)\n",
"2021/08/30 12:06:22(-0.306, 4.839, 8.58)\n",
"2021/08/30 12:06:22(-0.091, 4.887, 8.599)\n",
"2021/08/30 12:06:22(-0.047, 4.775, 8.741)\n",
"2021/08/30 12:06:22(0.075, 4.737, 8.956)\n",
"2021/08/30 12:06:22(0.184, 4.671, 9.058)\n",
"2021/08/30 12:06:22(0.323, 4.61, 9.074)\n",
"2021/08/30 12:06:22(-0.102, 4.515, 9.105)\n",
"2021/08/30 12:06:22(0.086, 4.614, 9.07)\n",
"2021/08/30 12:06:22(0.242, 4.615, 9.244)\n",
"2021/08/30 12:06:22(0.188, 4.571, 9.342)\n",
"2021/08/30 12:06:22(0.109, 4.548, 9.158)\n",
"2021/08/30 12:06:22(0.007, 4.598, 8.964)\n",
"2021/08/30 12:06:22(0.016, 4.675, 8.877)\n",
"2021/08/30 12:06:22(0.047, 4.673, 8.751)\n",
"2021/08/30 12:06:22(-0.363, 4.705, 8.689)\n",
"2021/08/30 12:06:22(0.019, 4.794, 8.613)\n",
"2021/08/30 12:06:22(-0.032, 4.639, 8.833)\n",
"2021/08/30 12:06:22(-0.121, 4.639, 8.923)\n",
"2021/08/30 12:06:22(0.332, 4.683, 8.884)\n",
"2021/08/30 12:06:22(0.043, 4.557, 9.116)\n",
"2021/08/30 12:06:22(0.189, 4.618, 9.043)\n",
"2021/08/30 12:06:22(0.198, 4.611, 8.922)\n",
"2021/08/30 12:06:22(-0.184, 4.623, 8.813)\n",
"2021/08/30 12:06:22(-0.089, 4.693, 8.807)\n",
"2021/08/30 12:06:22(0.053, 4.726, 8.92)\n",
"2021/08/30 12:06:22(-0.042, 4.662, 8.964)\n",
"2021/08/30 12:06:22(-0.013, 4.685, 8.866)\n",
"2021/08/30 12:06:22(-0.077, 4.666, 8.811)\n",
"2021/08/30 12:06:22(0.038, 4.691, 8.801)\n",
"2021/08/30 12:06:22(-0.026, 4.645, 8.861)\n",
"2021/08/30 12:06:22(0.069, 4.657, 8.881)\n",
"2021/08/30 12:06:22(0.15, 4.64, 8.898)\n",
"2021/08/30 12:06:22(-0.077, 4.628, 9.023)\n",
"2021/08/30 12:06:22(-0.068, 4.73, 8.969)\n",
"2021/08/30 12:06:22(-0.073, 4.743, 8.942)\n",
"2021/08/30 12:06:22(0.127, 4.646, 8.916)\n",
"2021/08/30 12:06:22(0.018, 4.575, 8.903)\n",
"2021/08/30 12:06:22(0.142, 4.693, 8.724)\n",
"2021/08/30 12:06:22(0.007, 4.709, 8.839)\n",
"2021/08/30 12:06:22(-0.113, 4.687, 8.896)\n",
"2021/08/30 12:06:22(-0.056, 4.711, 8.813)\n",
"2021/08/30 12:06:22(-0.079, 4.671, 8.868)\n",
"2021/08/30 12:06:22(-0.018, 4.648, 9.045)\n",
"2021/08/30 12:06:22(0.133, 4.685, 8.975)\n",
"2021/08/30 12:06:22(0.03, 4.683, 8.869)\n",
"2021/08/30 12:06:22(0.063, 4.662, 8.792)\n",
"2021/08/30 12:06:22(0.045, 4.665, 8.932)\n",
"2021/08/30 12:06:22(-0.14, 4.626, 9.039)\n",
"2021/08/30 12:06:22(-0.02, 4.747, 9.024)\n",
"2021/08/30 12:06:22(-0.055, 4.723, 9.021)\n",
"2021/08/30 12:06:22(0.128, 4.706, 9.097)\n",
"2021/08/30 12:06:22(0.059, 4.677, 9.236)\n",
"2021/08/30 12:06:22(0.043, 4.723, 9.44)\n",
"2021/08/30 12:06:22(0.284, 4.647, 9.43)\n",
"2021/08/30 12:06:22(0.429, 4.769, 9.19)\n",
"2021/08/30 12:06:22(0.152, 4.8, 8.867)\n",
"2021/08/30 12:06:22(0.306, 4.926, 8.288)\n",
"2021/08/30 12:06:23(0.196, 4.889, 8.751)\n",
"2021/08/30 12:06:23(0.406, 4.9, 9.574)\n",
"2021/08/30 12:06:23(0.522, 5.107, 8.607)\n",
"2021/08/30 12:06:23(0.278, 5.309, 8.623)\n",
"2021/08/30 12:06:23(0.002, 5.619, 8.728)\n",
"2021/08/30 12:06:23(0.03, 6.043, 9.328)\n",
"2021/08/30 12:06:23(0.912, 6.334, 8.88)\n",
"2021/08/30 12:06:23(2.399, 6.749, 8.001)\n",
"2021/08/30 12:06:23(2.648, 6.977, 8.733)\n",
"2021/08/30 12:06:23(-0.198, 6.864, 9.846)\n",
"2021/08/30 12:06:23(0.15, 6.723, 9.522)\n",
"2021/08/30 12:06:23(0.814, 6.613, 9.789)\n",
"2021/08/30 12:06:23(0.079, 5.884, 11.752)\n",
"2021/08/30 12:06:23(1.939, 5.586, 10.975)\n",
"2021/08/30 12:06:23(1.875, 4.787, 8.777)\n",
"2021/08/30 12:06:23(-0.945, 3.6, 8.459)\n",
"2021/08/30 12:06:23(-1.64, 2.959, 7.36)\n",
"2021/08/30 12:06:23(-1.475, 2.485, 5.223)\n",
"2021/08/30 12:06:23(-1.107, 1.681, 2.447)\n",
"2021/08/30 12:06:23(-3.762, 0.156, 1.567)\n",
"2021/08/30 12:06:23(-10.482, -0.754, 6.367)\n",
"2021/08/30 12:06:23(-10.798, 0.871, 7.933)\n",
"2021/08/30 12:06:23(-6.92, 0.567, 5.019)\n",
"2021/08/30 12:06:23(-3.585, -3.409, 3.004)\n",
"2021/08/30 12:06:23(-3.42, -5.539, 2.95)\n",
"2021/08/30 12:06:24(-6.711, -7.493, 4.533)\n",
"2021/08/30 12:06:24(-8.728, -7.451, 5.592)\n",
"2021/08/30 12:06:24(-9.673, -7.086, 3.912)\n",
"2021/08/30 12:06:24(-9.131, -6.867, -1.117)\n",
"2021/08/30 12:06:24(-8.167, -8.139, -5.833)\n",
"2021/08/30 12:06:24(-9.254, -9.288, -1.672)\n",
"2021/08/30 12:06:24(-7.916, -9.631, 3.68)\n",
"2021/08/30 12:06:24(-4.894, -9.834, 5.589)\n",
"2021/08/30 12:06:25(-2.913, -11.088, 5.861)\n",
"2021/08/30 12:06:25(-1.741, -11.437, 3.926)\n",
"2021/08/30 12:06:25(-1.559, -11.016, 2.121)\n",
"2021/08/30 12:06:25(-2.498, -10.548, 2.193)\n",
"2021/08/30 12:06:25(-2.424, -10.69, 3.008)\n",
"2021/08/30 12:06:25(-2.559, -10.991, 3.355)\n",
"2021/08/30 12:06:25(-1.427, -11.117, 2.61)\n",
"2021/08/30 12:06:25(0.121, -10.59, 2.361)\n",
"2021/08/30 12:06:25(0.826, -10.086, 1.423)\n",
"2021/08/30 12:06:25(0.491, -9.957, 0.363)\n",
"2021/08/30 12:06:25(-0.012, -10.052, -0.69)\n",
"2021/08/30 12:06:25(2.207, -9.732, -0.935)\n",
"2021/08/30 12:06:25(1.914, -10.144, 0.488)\n",
"2021/08/30 12:06:25(0.359, -10.412, 1.529)\n",
"2021/08/30 12:06:25(-0.274, -10.283, 1.233)\n",
"2021/08/30 12:06:25(0.442, -9.328, 2.393)\n",
"2021/08/30 12:06:25(1.742, -8.786, 3.214)\n",
"2021/08/30 12:06:25(2.465, -8.973, 2.257)\n",
"2021/08/30 12:06:25(2.934, -9.267, 0.85)\n",
"2021/08/30 12:06:25(4.239, -9.029, 1.35)\n",
"2021/08/30 12:06:25(4.821, -8.595, 2.676)\n",
"2021/08/30 12:06:25(4.373, -8.417, 2.559)\n",
"2021/08/30 12:06:25(5.177, -8.278, 0.727)\n",
"2021/08/30 12:06:25(5.94, -8.515, -1.183)\n",
"2021/08/30 12:06:25(6.218, -8.48, -0.526)\n",
"2021/08/30 12:06:25(6.17, -8.271, 1.259)\n",
"2021/08/30 12:06:25(5.637, -8.485, 1.0)\n",
"2021/08/30 12:06:26(4.72, -8.66, 0.354)\n",
"2021/08/30 12:06:26(4.44, -8.569, -1.514)\n",
"2021/08/30 12:06:26(3.316, -8.501, -2.179)\n",
"2021/08/30 12:06:26(1.446, -8.371, -1.908)\n",
"2021/08/30 12:06:26(0.964, -8.796, -2.474)\n",
"2021/08/30 12:06:26(1.623, -8.677, -1.179)\n",
"2021/08/30 12:06:26(-0.543, -8.821, 1.383)\n",
"2021/08/30 12:06:26(-4.871, -9.954, 1.446)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021/08/30 12:06:26(-7.439, -11.671, -1.365)\n",
"2021/08/30 12:06:26(-5.3, -13.103, -5.209)\n",
"2021/08/30 12:06:26(-2.349, -15.771, -7.645)\n",
"2021/08/30 12:06:26(-1.757, -18.623, -3.753)\n",
"2021/08/30 12:06:26(-5.686, -19.112, 1.761)\n",
"2021/08/30 12:06:27(-8.067, -21.354, -0.873)\n",
"2021/08/30 12:06:27(-5.102, -21.166, -6.488)\n",
"2021/08/30 12:06:27(-2.938, -16.716, -4.78)\n",
"2021/08/30 12:06:27(-6.181, -11.277, -0.127)\n",
"2021/08/30 12:06:27(-10.309, -12.176, -4.46)\n",
"2021/08/30 12:06:27(-8.345, -10.538, -8.349)\n"
]
},
{
"ename": "KeyboardInterrupt",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-17-87597a95b260>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[0macc\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mget_accelerometer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmessage\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mabs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0macc\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m>\u001b[0m \u001b[1;36m3\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 6\u001b[1;33m \u001b[0mplay_sound\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdevice1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 7\u001b[0m \u001b[1;32mexcept\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mKeyboardInterrupt\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mSystemExit\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 8\u001b[0m \u001b[1;32mraise\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m<ipython-input-14-559b28ce4d62>\u001b[0m in \u001b[0;36mplay_sound\u001b[1;34m(device)\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mplay_sound\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdevice\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[0mdevice\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mshell\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'am start -a android.intent.action.VIEW -d file:///storage/emulated/0/Shrink_ray.ogg -t audio/ogg'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\adb_shell\\adb_device.py\u001b[0m in \u001b[0;36mshell\u001b[1;34m(self, command, transport_timeout_s, read_timeout_s, timeout_s, decode)\u001b[0m\n\u001b[0;32m 790\u001b[0m \u001b[1;32mraise\u001b[0m \u001b[0mexceptions\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mAdbConnectionError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"ADB command not sent because a connection to the device has not been established. (Did you call `AdbDevice.connect()`?)\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 791\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 792\u001b[1;33m \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_service\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34mb'shell'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcommand\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mencode\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'utf8'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtransport_timeout_s\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mread_timeout_s\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtimeout_s\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdecode\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 793\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 794\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mstreaming_shell\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcommand\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtransport_timeout_s\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mread_timeout_s\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mconstants\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mDEFAULT_READ_TIMEOUT_S\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdecode\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\adb_shell\\adb_device.py\u001b[0m in \u001b[0;36m_service\u001b[1;34m(self, service, command, transport_timeout_s, read_timeout_s, timeout_s, decode)\u001b[0m\n\u001b[0;32m 679\u001b[0m \"\"\"\n\u001b[0;32m 680\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mdecode\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 681\u001b[1;33m \u001b[1;32mreturn\u001b[0m \u001b[1;34mb''\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_streaming_command\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mservice\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcommand\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtransport_timeout_s\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mread_timeout_s\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtimeout_s\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdecode\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'utf8'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 682\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[1;34mb''\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_streaming_command\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mservice\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcommand\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtransport_timeout_s\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mread_timeout_s\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtimeout_s\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 683\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\adb_shell\\adb_device.py\u001b[0m in \u001b[0;36m_streaming_command\u001b[1;34m(self, service, command, transport_timeout_s, read_timeout_s, timeout_s)\u001b[0m\n\u001b[0;32m 1236\u001b[0m \u001b[0madb_info\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_open\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34mb'%s:%s'\u001b[0m \u001b[1;33m%\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mservice\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcommand\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtransport_timeout_s\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mread_timeout_s\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtimeout_s\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1237\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1238\u001b[1;33m \u001b[1;32mfor\u001b[0m \u001b[0mdata\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_read_until_close\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0madb_info\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 1239\u001b[0m \u001b[1;32myield\u001b[0m \u001b[0mdata\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1240\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\adb_shell\\adb_device.py\u001b[0m in \u001b[0;36m_read_until_close\u001b[1;34m(self, adb_info)\u001b[0m\n\u001b[0;32m 1189\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1190\u001b[0m \u001b[1;32mwhile\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1191\u001b[1;33m \u001b[0mcmd\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdata\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_read_until\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mconstants\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mCLSE\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mconstants\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mWRTE\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0madb_info\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 1192\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1193\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mcmd\u001b[0m \u001b[1;33m==\u001b[0m \u001b[0mconstants\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mCLSE\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\adb_shell\\adb_device.py\u001b[0m in \u001b[0;36m_read_until\u001b[1;34m(self, expected_cmds, adb_info)\u001b[0m\n\u001b[0;32m 1159\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1160\u001b[0m \"\"\"\n\u001b[1;32m-> 1161\u001b[1;33m \u001b[0mcmd\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0m_\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0m_\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdata\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_io_manager\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mread\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mexpected_cmds\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0madb_info\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mallow_zeros\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 1162\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1163\u001b[0m \u001b[1;31m# Acknowledge write packets\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\adb_shell\\adb_device.py\u001b[0m in \u001b[0;36mread\u001b[1;34m(self, expected_cmds, adb_info, allow_zeros)\u001b[0m\n\u001b[0;32m 308\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 309\u001b[0m \u001b[1;31m# Read from the device\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 310\u001b[1;33m \u001b[0mcmd\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0marg0\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0marg1\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdata\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_read_packet_from_device\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0madb_info\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 311\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 312\u001b[0m \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0madb_info\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0margs_match\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0marg0\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0marg1\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mallow_zeros\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\adb_shell\\adb_device.py\u001b[0m in \u001b[0;36m_read_packet_from_device\u001b[1;34m(self, adb_info)\u001b[0m\n\u001b[0;32m 455\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 456\u001b[0m \"\"\"\n\u001b[1;32m--> 457\u001b[1;33m \u001b[0mmsg\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_read_bytes_from_device\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mconstants\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mMESSAGE_SIZE\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0madb_info\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 458\u001b[0m \u001b[0mcmd\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0marg0\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0marg1\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdata_length\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdata_checksum\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0munpack\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmsg\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 459\u001b[0m \u001b[0mcommand\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mconstants\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mWIRE_TO_ID\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mcmd\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\adb_shell\\adb_device.py\u001b[0m in \u001b[0;36m_read_bytes_from_device\u001b[1;34m(self, length, adb_info)\u001b[0m\n\u001b[0;32m 411\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 412\u001b[0m \u001b[1;32mwhile\u001b[0m \u001b[0mlength\u001b[0m \u001b[1;33m>\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 413\u001b[1;33m \u001b[0mtemp\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_transport\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mbulk_read\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlength\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0madb_info\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtransport_timeout_s\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 414\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mtemp\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 415\u001b[0m \u001b[1;31m# Only log if `temp` is not empty\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\adb_shell\\transport\\tcp_transport.py\u001b[0m in \u001b[0;36mbulk_read\u001b[1;34m(self, numbytes, transport_timeout_s)\u001b[0m\n\u001b[0;32m 113\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 114\u001b[0m \"\"\"\n\u001b[1;32m--> 115\u001b[1;33m \u001b[0mreadable\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0m_\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0m_\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mselect\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mselect\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_connection\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m[\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m[\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtransport_timeout_s\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 116\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mreadable\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 117\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_connection\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrecv\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mnumbytes\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mKeyboardInterrupt\u001b[0m: "
]
}
],
"source": [
"while 1:\n",
" try:\n",
" message, address = s.recvfrom(8192)\n",
" acc = get_accelerometer(message)\n",
" if abs(acc[0]) > 3:\n",
" play_sound(device1)\n",
" except (KeyboardInterrupt, SystemExit):\n",
" raise\n",
" except:\n",
" traceback.print_exc()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment