flightplotting 0.2.5__tar.gz → 0.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flightplotting-0.2.5 → flightplotting-0.2.7}/PKG-INFO +4 -4
- {flightplotting-0.2.5 → flightplotting-0.2.7}/flightplotting/plots.py +28 -8
- {flightplotting-0.2.5 → flightplotting-0.2.7}/flightplotting/traces.py +10 -5
- {flightplotting-0.2.5 → flightplotting-0.2.7}/flightplotting.egg-info/PKG-INFO +4 -4
- flightplotting-0.2.7/flightplotting.egg-info/requires.txt +6 -0
- flightplotting-0.2.7/requirements.txt +6 -0
- flightplotting-0.2.5/flightplotting.egg-info/requires.txt +0 -6
- flightplotting-0.2.5/requirements.txt +0 -6
- {flightplotting-0.2.5 → flightplotting-0.2.7}/.github/workflows/publish_pypi.yml +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/.gitignore +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/.vscode/settings.json +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/COPYING +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/MANIFEST.in +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/README.md +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/flightplotting/__init__.py +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/flightplotting/data/ColdDraftF3APlane.obj +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/flightplotting/data/__init__.py +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/flightplotting/model.py +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/flightplotting/templates.py +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/flightplotting/titlerenderer.py +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/flightplotting.egg-info/SOURCES.txt +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/flightplotting.egg-info/dependency_links.txt +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/flightplotting.egg-info/top_level.txt +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/pyproject.toml +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/setup.cfg +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/tests/__init__.py +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/tests/data/__init__.py +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/tests/data/p23_flight.json +0 -0
- {flightplotting-0.2.5 → flightplotting-0.2.7}/tests/test_plots.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: flightplotting
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: Tools for Plotting Flight Data in Plotly
|
|
5
5
|
Author-email: Thomas David <thomasdavid0@gmail.com>
|
|
6
6
|
License: GNU GPL v3
|
|
@@ -11,9 +11,9 @@ License-File: COPYING
|
|
|
11
11
|
Requires-Dist: numpy
|
|
12
12
|
Requires-Dist: pandas
|
|
13
13
|
Requires-Dist: plotly
|
|
14
|
-
Requires-Dist: pfc-geometry>=0.2.
|
|
15
|
-
Requires-Dist: flightdata>=0.2.
|
|
16
|
-
Requires-Dist: flightanalysis>=0.2.
|
|
14
|
+
Requires-Dist: pfc-geometry>=0.2.8
|
|
15
|
+
Requires-Dist: flightdata>=0.2.16
|
|
16
|
+
Requires-Dist: flightanalysis>=0.2.17
|
|
17
17
|
|
|
18
18
|
# FlightPlotting
|
|
19
19
|
|
|
@@ -17,35 +17,55 @@ from flightplotting.traces import (
|
|
|
17
17
|
from flightdata import State
|
|
18
18
|
from flightdata.base.labeling import get_appended_id
|
|
19
19
|
from geometry import Coord
|
|
20
|
-
from flightplotting.model import obj
|
|
20
|
+
from flightplotting.model import obj
|
|
21
21
|
import numpy as np
|
|
22
22
|
from typing import List, Union
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
def plotsec(secs:
|
|
26
|
-
color: Union[str, list[str]]=None,
|
|
25
|
+
def plotsec(secs: State | list[State] | dict[str, State], scale=5, nmodels=0, fig=None,
|
|
26
|
+
color: Union[str, list[str]]=None, cg=False, width=None,
|
|
27
27
|
height=None, show_axes=False, ribb: bool=False, tips: bool=True, origin=False):
|
|
28
28
|
|
|
29
29
|
traces = []
|
|
30
|
-
|
|
30
|
+
keys = None
|
|
31
31
|
if isinstance(secs, State):
|
|
32
32
|
secs = [secs]
|
|
33
33
|
|
|
34
|
+
if isinstance(secs, dict):
|
|
35
|
+
keys = list(secs.keys())
|
|
36
|
+
secs = list(secs.values())
|
|
37
|
+
showkeys=True
|
|
38
|
+
else:
|
|
39
|
+
keys = list(range(len(secs)))
|
|
40
|
+
showkeys=False
|
|
41
|
+
|
|
34
42
|
for i, sec in enumerate(secs):
|
|
35
43
|
text = ["{:.1f}".format(val) for val in sec.data.index]
|
|
36
44
|
_color = color if color is not None else px.colors.qualitative.Plotly[i]
|
|
37
45
|
if ribb:
|
|
38
|
-
traces += ribbon(sec, scale * 1.85, _color)
|
|
46
|
+
traces += ribbon(sec, scale * 1.85, _color, name=keys[i])
|
|
39
47
|
if tips:
|
|
40
|
-
traces += tiptrace(sec, scale * 1.85, text=text)
|
|
48
|
+
traces += tiptrace(sec, scale * 1.85, text=text, name=keys[i])
|
|
41
49
|
if nmodels > 0:
|
|
42
|
-
traces += meshes(nmodels, sec, _color,
|
|
50
|
+
traces += meshes(nmodels, sec, _color, scale)
|
|
43
51
|
if cg:
|
|
44
|
-
traces.append(cgtrace(sec, line=dict(color=_color, width=2)))
|
|
52
|
+
traces.append(cgtrace(sec, line=dict(color=_color, width=2), name=keys[i]))
|
|
45
53
|
|
|
46
54
|
if origin:
|
|
47
55
|
traces += axestrace(Coord.zero(), 50)
|
|
48
56
|
|
|
57
|
+
if showkeys:
|
|
58
|
+
for i, key in enumerate(keys):
|
|
59
|
+
traces.append(go.Scatter3d(
|
|
60
|
+
x=[],
|
|
61
|
+
y=[],
|
|
62
|
+
z=[],
|
|
63
|
+
mode='markers',
|
|
64
|
+
marker=dict(size=5, color=px.colors.qualitative.Plotly[i]),
|
|
65
|
+
name=key,
|
|
66
|
+
showlegend=True
|
|
67
|
+
))
|
|
68
|
+
|
|
49
69
|
if fig is None:
|
|
50
70
|
|
|
51
71
|
fig = go.Figure(
|
|
@@ -24,14 +24,18 @@ def boxtrace():
|
|
|
24
24
|
)]
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
def meshes(npoints, seq: State, colour,
|
|
27
|
+
def meshes(npoints, seq: State, colour, scale=1, _obj: OBJ=None):
|
|
28
|
+
_obj = obj if _obj is None else _obj
|
|
29
|
+
if scale != 1:
|
|
30
|
+
_obj = _obj.scale(scale)
|
|
28
31
|
step = int(len(seq.data) / max(npoints, 1))
|
|
29
32
|
|
|
30
33
|
ms = []
|
|
31
34
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
for st in seq[::step]:
|
|
36
|
+
ms.append(_obj.transform(
|
|
37
|
+
Transformation(st.pos, st.att)
|
|
38
|
+
).create_mesh(colour,f"{st.time.t[0]:.1f}"))
|
|
35
39
|
return ms
|
|
36
40
|
|
|
37
41
|
def vector(origin, direction, **kwargs):
|
|
@@ -154,11 +158,12 @@ def axis_rate_traces(sts: dict[str, State], cols='pqr'):
|
|
|
154
158
|
cols = px.colors.qualitative.D3
|
|
155
159
|
traces = []
|
|
156
160
|
dashes = ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot']
|
|
161
|
+
st0 = list(sts.values())[0]
|
|
157
162
|
for i, rv in enumerate(list('pqr')):
|
|
158
163
|
for k, st in sts.items():
|
|
159
164
|
|
|
160
165
|
traces.append(go.Scatter(
|
|
161
|
-
x=
|
|
166
|
+
x=st0.data.index - st0.data.index[0], y=getattr(st, rv), name=f'{k} {rv}', line=dict(color=cols[i], dash=dashes[list(sts.keys()).index(k)])
|
|
162
167
|
))
|
|
163
168
|
return traces
|
|
164
169
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: flightplotting
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: Tools for Plotting Flight Data in Plotly
|
|
5
5
|
Author-email: Thomas David <thomasdavid0@gmail.com>
|
|
6
6
|
License: GNU GPL v3
|
|
@@ -11,9 +11,9 @@ License-File: COPYING
|
|
|
11
11
|
Requires-Dist: numpy
|
|
12
12
|
Requires-Dist: pandas
|
|
13
13
|
Requires-Dist: plotly
|
|
14
|
-
Requires-Dist: pfc-geometry>=0.2.
|
|
15
|
-
Requires-Dist: flightdata>=0.2.
|
|
16
|
-
Requires-Dist: flightanalysis>=0.2.
|
|
14
|
+
Requires-Dist: pfc-geometry>=0.2.8
|
|
15
|
+
Requires-Dist: flightdata>=0.2.16
|
|
16
|
+
Requires-Dist: flightanalysis>=0.2.17
|
|
17
17
|
|
|
18
18
|
# FlightPlotting
|
|
19
19
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|