|
2 | 2 | import matplotlib.pyplot as plt |
3 | 3 | from numpy.polynomial import Chebyshev as T |
4 | 4 | from utils import create_toy_data |
| 5 | +from skylynx.utils import cli_args |
5 | 6 |
|
6 | 7 | if __name__ == "__main__": |
| 8 | + # argparse |
| 9 | + cli_params = dict( |
| 10 | + DT=5, |
| 11 | + ) |
| 12 | + |
| 13 | + args = cli_args(cli_params) |
| 14 | + |
7 | 15 | velocity = 1 # m/s |
8 | | - DT = 5 # sec |
| 16 | + DT = int(args['DT']) # sec |
9 | 17 | start_pos = 0 # meters |
10 | 18 | time = 0.0 |
11 | 19 |
|
|
53 | 61 | ax.fill_between(lx, ly - std, ly + std, |
54 | 62 | color="gray", label="std.", alpha=0.5) |
55 | 63 |
|
56 | | - # noise within std |
57 | | - |
58 | | - ax.scatter(lx, y_sine_noise, c='b', marker='*', lw=0.5) |
59 | | - |
60 | 64 | # Plot plane route |
61 | 65 | ax.axhline(y=plane_height, xmin=0, xmax=1, |
62 | 66 | c='r', ls='--', lw=1) |
63 | 67 | # plane current pos |
64 | 68 | ax.scatter(pos, plane_height, c='r', lw=3, marker='>') |
65 | 69 |
|
66 | 70 | # distance to current height |
| 71 | + ax.scatter(pos, ly[pos], c='k', lw=2) |
| 72 | + |
| 73 | + # noise within std |
| 74 | + ax.scatter(lx, y_sine_noise, c='b', marker='*', lw=0.5, alpha=0.5) |
67 | 75 |
|
68 | | - ax.scatter(pos, ly[pos], c='k', lw=3) |
| 76 | + # current noisy distance sample |
| 77 | + ax.scatter(pos, y_sine_noise[pos], c='k', marker='*', lw=0.5) |
69 | 78 |
|
70 | 79 | # settings |
71 | 80 | ax.grid(True) |
|
0 commit comments