Spaces:
Sleeping
Sleeping
| import numpy as np | |
| import time | |
| EARTH_FIELD = np.array([22.0, 0.0, -44.0]) | |
| NOISE_STD = 0.2 | |
| def read(x, y, z): | |
| noise = np.random.normal(0, NOISE_STD, 3) | |
| field = EARTH_FIELD + noise | |
| return { | |
| "Bx": float(field[0]), | |
| "By": float(field[1]), | |
| "Bz": float(field[2]), | |
| "timestamp": time.time() | |
| } |