Skip to content

Commit be5dd71

Browse files
committed
rename IMU Monitor to Attitude Monitor
1 parent 486214a commit be5dd71

15 files changed

Lines changed: 95 additions & 39 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ For more comprehensive installation instructions, please refer to [INSTALLATION.
181181
---
182182
| Widget | To show or hide the various widgets, go to Menu..View and click on the relevant hide/show option. |
183183
|---------------------------|---------------------------------------------------------------------------------------------------|
184-
|![banner widget](https://github.com/semuconsulting/PyGPSClient/blob/master/images/banner_widget.png?raw=true)| Expandable banner showing key navigation status information based on messages received from receiver. To expand or collapse the banner or serial port configuration widgets, click the ![expand icon](https://github.com/semuconsulting/PyGPSClient/blob/master/src/pygpsclient/resources/iconmonstr-arrow-80-16.png?raw=true)/![expand icon](https://github.com/semuconsulting/PyGPSClient/blob/master/src/pygpsclient/resources/iconmonstr-triangle-1-16.png?raw=true) buttons. **NB**: some fields (e.g. hdop/vdop, hacc/vacc) are only available from proprietary NMEA or UBX messages and may not be output by default. The minimum messages required to populate all available fields are: NMEA: GGA, GSA, GSV, RMC, UBX00 (proprietary); UBX: NAV-DOP, NAV-PVT, NAV-SAT; UNI: BESTNAV, SATSINFO, STADOP |
184+
|![banner widget](https://github.com/semuconsulting/PyGPSClient/blob/master/images/banner_widget.png?raw=true)| Expandable banner showing key navigation status information based on messages received from receiver. To expand or collapse the banner or serial port configuration widgets, click the ![expand icon](https://github.com/semuconsulting/PyGPSClient/blob/master/src/pygpsclient/resources/iconmonstr-arrow-80-16.png?raw=true)/![expand icon](https://github.com/semuconsulting/PyGPSClient/blob/master/src/pygpsclient/resources/iconmonstr-triangle-1-16.png?raw=true) buttons. Ordinarily 'track:' represents heading of motion (aka course over ground), but the field will display 'hdg:' where static heading (yaw) is available. **NB**: some fields (e.g. hdop/vdop, hacc/vacc) are only available from proprietary NMEA or UBX messages and may not be output by default. The minimum messages required to populate all available fields are: NMEA: GGA, GSA, GSV, RMC, UBX00 (proprietary); UBX: NAV-DOP, NAV-PVT, NAV-SAT; UNI: BESTNAV, SATSINFO, STADOP. |
185185
|![console widget](https://github.com/semuconsulting/PyGPSClient/blob/master/images/console_widget.png?raw=true)| Configurable serial console widget showing incoming GNSS data streams in either parsed, binary or tabular hexadecimal formats. Double-right-click to copy contents of console to the clipboard. The scroll behaviour and number of lines retained in the console can be configured via the settings panel. Supports user-configurable color tagging of selected strings for easy identification. Color tags are loaded from the `"colortag_b":` value (`0` = disable, `1` = enable) and `"colortags_l":` list (`[string, color]` pairs) in your json configuration file (see example provided). If color is set to "HALT", streaming will halt on any match and a warning displayed. NB: color tagging does impose a small performance overhead - turning it off will improve console response times at very high transaction rates.|
186186
|![skyview widget](https://github.com/semuconsulting/PyGPSClient/blob/master/images/skyview_widget.png?raw=true)| Skyview widget showing current satellite visibility and position (elevation / azimuth). Satellite icon borders are colour-coded to distinguish between different GNSS constellations. For consistency between NMEA and UBX data sources, will display GLONASS NMEA SVID (65-96) rather than slot (1-24). |
187187
|![levelsview widget](https://github.com/semuconsulting/PyGPSClient/blob/master/images/graphview_widget.png?raw=true)| Levels view widget showing current satellite carrier-to-noise (C/No) levels for each GNSS constellation. Double-click to toggle legend. Double-right-click to toggle levels where C/No = 0 dbHz. |
@@ -195,7 +195,7 @@ For more comprehensive installation instructions, please refer to [INSTALLATION.
195195
|![scatterplot widget](https://github.com/semuconsulting/PyGPSClient/blob/master/images/scatterplot_widget.png?raw=true)| Scatterplot widget showing variability in position reporting over time. (Optional) Enter fixed reference position. Select Average to center plot on dynamic average position (*displayed at top left*), or Fixed to center on fixed reference position (*if entered*). Check Autorange to set plot range automatically. Set the update interval (e.g. 4 = every 4th navigation solution). Use the range slider or mouse wheel to adjust plot range. Right-click to set fixed reference point to the current mouse cursor position. Double-click to clear the existing data. |
196196
|![rover widget](https://github.com/semuconsulting/PyGPSClient/blob/master/images/rover_widget.png?raw=true) | Rover widget plots the relative 2D position, track and status information for the roving receiver in a fixed or moving base / rover RTK configuration. Can also display relative position of NTRIP mountpoint and receiver in a static RTK configuration. Double-click to clear existing plot. |
197197
|![chart view](https://github.com/semuconsulting/PyGPSClient/blob/master/images/chart_widget.png?raw=true) | Chart widget acts as a multi-channel "plotter", allowing the user to plot a series of named numeric data attributes from any parsed GNSS data source, with configurable y (value) and x (time) axes. By default, the number of channels is set to 4, but this can be manually edited by the user via the json configuration file setting `chartsettings_d["numchn_n"]`. For each channel, user can select: (*optional*) identity of message source e.g. `NAV-PVT`; attribute name e.g. `hAcc`; scaling factor (divisor) e.g. 1000; y axis range e.g. 0 - 5. Wildcards are available for attribute groups - "\*" (average of group values), "+" (maximum of group values), "-" (minimum of group values) e.g. `cno*` will plot the average `cno` value for a group of satellites. Double-click to clear the existing data. Double-right-click to save the current chart data to the clipboard in CSV format, which can be directly pasted into a spreadsheet application. |
198-
|![IMU widget](https://github.com/semuconsulting/PyGPSClient/blob/master/images/imu_widget.png?raw=true) | IMU (Inertial Management Unit) Monitor widget showing current orientation/attitude (roll, pitch, yaw) and status of IMU from any IMU/Dead Reckoning message source. Select range in degrees (from ±1 to ±180 degrees). |
198+
|![attitude widget](https://github.com/semuconsulting/PyGPSClient/blob/master/images/attitude_widget.png?raw=true) | Attitude Monitor widget (*formerly "IMU Monitor"*) showing current orientation/attitude (roll, pitch, yaw *aka 'static heading'*) and status from a variety of IMU, Dead Reckoning, Dual Antenna or other 2D/3D attitude message sources. Select range in degrees (from ±1 to ±180 degrees). |
199199

200200
---
201201
## <a name="ubxconfig">UBX Configuration Facilities</a>

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### RELEASE 1.6.9
44

55
1. Add manually-editable `resizeable_dialog_b` configuration setting as a workaround for screen scaling issues on some platforms (e.g. Ubuntu Wayland). Fixes #250.
6+
1. IMU Monitor renamed to Attitude Monitor, and various internal enhancements including explicit display of NAV-PVT `headVehValid` status.
67

78
### RELEASE 1.6.8
89

docs/pygpsclient.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ pygpsclient.app module
2020
:undoc-members:
2121
:show-inheritance:
2222

23+
pygpsclient.attitude\_frame module
24+
----------------------------------
25+
26+
.. automodule:: pygpsclient.attitude_frame
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
2331
pygpsclient.banner\_frame module
2432
--------------------------------
2533

@@ -148,14 +156,6 @@ pygpsclient.importmap\_dialog module
148156
:undoc-members:
149157
:show-inheritance:
150158

151-
pygpsclient.imu\_frame module
152-
-----------------------------
153-
154-
.. automodule:: pygpsclient.imu_frame
155-
:members:
156-
:undoc-members:
157-
:show-inheritance:
158-
159159
pygpsclient.init\_presets module
160160
--------------------------------
161161

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""
2-
imu_frame.py
2+
attitude_frame.py
33
4-
IMU (Inertial Management Unit) frame class for PyGPSClient Application.
4+
Attitude (3D orientation) frame class for PyGPSClient Application.
55
66
This show orientiation (Pitch, Roll, Yaw) and calibration status of
7-
any UBX or NMEA IMU source.
7+
a variety of sources.
88
99
Created 23 March 2023
1010
@@ -43,7 +43,7 @@
4343
WIDGETU2,
4444
)
4545
from pygpsclient.helpers import rgb2str, scale_font
46-
from pygpsclient.strings import DLGWAITIMU
46+
from pygpsclient.strings import DLGWAITATTITUDE
4747

4848
OFFSETX = 5
4949
OFFSETY = 10
@@ -68,9 +68,9 @@
6868
OPTIONS = ("N/A",)
6969

7070

71-
class IMUFrame(Frame):
71+
class AttitudeFrame(Frame):
7272
"""
73-
IMU (Inertial Management Unit) frame class.
73+
Attitude (3D orientation) frame class.
7474
"""
7575

7676
def __init__(self, app: Frame, parent: Frame, *args, **kwargs):
@@ -403,7 +403,7 @@ def _on_waiting(self):
403403
"""
404404

405405
if self._waiting:
406-
self._canvas.create_alert(DLGWAITIMU, tags=TAG_WAIT)
406+
self._canvas.create_alert(DLGWAITATTITUDE, tags=TAG_WAIT)
407407

408408
def get_size(self) -> tuple:
409409
"""

src/pygpsclient/banner_frame.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,8 @@ def _update_track(self, units):
453453
else:
454454
self._lbl_spd.config(text=NA)
455455
track = self.__app.gnss_status.track
456+
# ltrk = " hdg:" if self.__app.gnss_status.headvehvalid else " track:"
457+
# self._lbl_ltrk.config(text=ltrk)
456458
if isinstance(track, (int, float)):
457459
self._lbl_trk.config(text=f"{track:05.1f} °")
458460
else:

src/pygpsclient/gnss_status.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def reset(self):
4141
self.alt = 0.0 # height above sea level m
4242
self.hae = 0.0 # height above ellipsoid m
4343
self.speed = 0.0 # speed m/s
44-
self.track = 0.0 # track degrees
44+
self.track = 0.0 # track (heading of motion or course over ground) degrees
45+
self.headvehvalid = 0 # 0 = heading of motion, 1 = static heading (yaw)
4546
self.fix = "NO FIX" # fix type e.g. "3D"
4647
self.siv = 0 # satellites in view
4748
self.sip = 0 # satellites in position solution

src/pygpsclient/helpers.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,21 @@ def get_units(units: str) -> tuple:
684684
return dst_u, dst_c, ele_u, ele_c, spd_u, spd_c
685685

686686

687+
def hdg2yaw(heading: float) -> float:
688+
"""
689+
Convert heading (0 - 360) to yaw (-180 - 180)
690+
691+
:param float heading: heading in range 0 - 360
692+
:return: yaw in range -180 to 180
693+
:rtype: float
694+
"""
695+
696+
heading %= 360
697+
if heading > 180:
698+
heading -= 360
699+
return heading
700+
701+
687702
def hsv2rgb(h: float, s: float, v: float) -> str:
688703
"""
689704
Convert HSV values (in range 0-1) to RGB color string.

src/pygpsclient/nmea_handler.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
from pygpsclient.dialog_state import DLGTSERVER
2727
from pygpsclient.globals import SAT_EXPIRY, TKGN
28-
from pygpsclient.helpers import fix2desc, kmph2ms, knots2ms, svid2gnssid
28+
from pygpsclient.helpers import fix2desc, hdg2yaw, kmph2ms, knots2ms, svid2gnssid
2929
from pygpsclient.strings import DLGTNMEA, NA
3030

3131

@@ -152,6 +152,7 @@ def _process_RMC(self, data: NMEAMessage):
152152
self.__app.gnss_status.speed = knots2ms(data.spd) # convert to m/s
153153
if data.cog != "":
154154
self.__app.gnss_status.track = data.cog
155+
self.__app.gnss_status.headvehvalid = 0
155156

156157
def _process_GGA(self, data: NMEAMessage):
157158
"""
@@ -289,6 +290,7 @@ def _process_VTG(self, data: NMEAMessage):
289290
if data.sogk is not None:
290291
self.__app.gnss_status.speed = kmph2ms(data.sogk) # convert to m/s
291292
self.__app.gnss_status.fix = fix2desc("VTG", data.posMode)
293+
self.__app.gnss_status.headvehvalid = 0
292294
# only works for NMEA 4.10 and later...
293295
# self.__app.gnss_status.diff_corr = 1 if data.posMode == "D" else 0
294296

@@ -518,7 +520,7 @@ def _process_IMU(self, data: NMEAMessage):
518520
ims["pitch"] = round(getattr(data, "pitch", 0), 4)
519521
ims["yaw"] = round(getattr(data, "yaw", 0), 4)
520522
if hasattr(data, "heading"): # range 0 - 360
521-
ims["yaw"] = round(data.heading - 180, 4)
523+
ims["yaw"] = round(hdg2yaw(data.heading), 4)
522524
ims["status"] = str(getattr(data, "quality", ""))
523525
except (TypeError, KeyError, AttributeError):
524526
pass

src/pygpsclient/rinex_dialog.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
:license: BSD 3-Clause
1111
"""
1212

13+
# pylint: disable=use-implicit-booleaness-not-comparison
14+
1315
from datetime import datetime, timezone
1416
from logging import getLogger
1517
from pathlib import Path
@@ -829,7 +831,7 @@ def _do_conversion(self, **kwargs):
829831
]
830832
observer = self._observer.get()
831833
doi = self._doi.get()
832-
license = self._license.get()
834+
licen = self._license.get()
833835
station = self._station.get()
834836
comments = ["PyGPSClient RINEX Converter Dialog"]
835837
country = self._countrycode.get()
@@ -859,7 +861,7 @@ def _do_conversion(self, **kwargs):
859861
comments=comments,
860862
protfilter=protfilter,
861863
doi=doi,
862-
license=license,
864+
license=licen,
863865
station=station,
864866
country=country,
865867
**kwargs,

0 commit comments

Comments
 (0)