Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable Message lenght GSV, add field GNSS Signal ID #108

Open
martiinz opened this issue May 5, 2020 · 1 comment
Open

Variable Message lenght GSV, add field GNSS Signal ID #108

martiinz opened this issue May 5, 2020 · 1 comment
Labels

Comments

@martiinz
Copy link

martiinz commented May 5, 2020

Any Way to add support for variable Message lenght?

When refering to the ublox ZED-F9P Manual Chapter 4.2.14 'GSV', the GSV has variable message lenght. Does look like NMEA 4.10 not proprietary.

An example GSV Output Set from this module

$GPGSV,3,1,11,04,06,317,21,05,17,057,34,09,00,348,,12,01,118,,1*68
$GPGSV,3,2,11,16,17,300,17,18,57,162,38,21,57,173,37,25,29,121,33,1*6A
$GPGSV,3,3,11,26,49,301,08,29,58,056,37,31,50,235,22,1*55

The 3rd Message is interpreted as

<GSV(num_messages='3', msg_num='3', num_sv_in_view='11', sv_prn_num_1='26', elevation_deg_1='49', azimuth_1='301', snr_1='21', sv_prn_num_2='29', elevation_deg_2='58', azimuth_2='056', snr_2='36', sv_prn_num_3='31', elevation_deg_3='50', azimuth_3='235', snr_3='23', sv_prn_num_4='1')>

But the '1' just before checksum (Pos 16, 12 respectively) is supposed to be GNSS Signal ID instead of sv_prn_num_4='1'

@fohrloop
Copy link

fohrloop commented Jul 9, 2020

Hi,

I implemented some sort of fix to this in #115 (described there in more detail). Also available in the master branch of my fork.

You can see that using the GSV_signal_id=True removes the erroneus key sv_prn_num_# and adds signal_id.

Example 1

In [1]: pynmea2.parse("$GPGSV,3,3,09,25,,,40,1*6E")
Out[1]: <GSV(num_messages='3', msg_num='3', num_sv_in_view='09', sv_prn_num_1='25', elevation_deg_1='', azimuth_1='', snr_1='40', sv_prn_num_2='1')>

In [2]: pynmea2.parse("$GPGSV,3,3,09,25,,,40,1*6E", GSV_signal_id=True)
Out[2]: <GSV(num_messages='3', msg_num='3', num_sv_in_view='09', sv_prn_num_1='25', elevation_deg_1='', azimuth_1='', snr_1='40', signal_id='1')>

Example 2

In [1]: pynmea2.parse("$GPGSV,3,3,11,26,49,301,08,29,58,056,37,31,50,235,22,1*55")
Out[1]: <GSV(num_messages='3', msg_num='3', num_sv_in_view='11', sv_prn_num_1='26', elevation_deg_1='49', azimuth_1='301', snr_1='08', sv_prn_num_2='29', elevation_deg_2='58', azimuth_2='056', snr_2='37', sv_prn_num_3='31', elevation_deg_3='50', azimuth_3='235', snr_3='22', sv_prn_num_4='1')>

In [2]: pynmea2.parse("$GPGSV,3,3,11,26,49,301,08,29,58,056,37,31,50,235,22,1*55", GSV_signal_id=True)
Out[2]: <GSV(num_messages='3', msg_num='3', num_sv_in_view='11', sv_prn_num_1='26', elevation_deg_1='49', azimuth_1='301', snr_1='08', sv_prn_num_2='29', elevation_deg_2='58', azimuth_2='056', snr_2='37', sv_prn_num_3='31', elevation_deg_3='50', azimuth_3='235', snr_3='22', signal_id='1')>

Example 3

In [1]: pynmea2.parse('$GAGSV,1,1,00,2*76\r\n')
Out[1]: <GSV(num_messages='1', msg_num='1', num_sv_in_view='00', sv_prn_num_1='2')>

In [2]: pynmea2.parse('$GAGSV,1,1,00,2*76\r\n', GSV_signal_id=True)
Out[2]: <GSV(num_messages='1', msg_num='1', num_sv_in_view='00', signal_id='2')>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants