id
int64
0
843k
repository_name
stringlengths
7
55
file_path
stringlengths
9
332
class_name
stringlengths
3
290
human_written_code
stringlengths
12
4.36M
class_skeleton
stringlengths
19
2.2M
total_program_units
int64
1
9.57k
total_doc_str
int64
0
4.2k
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
300
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
176
CountClassBase
float64
0
48
CountClassCoupled
float64
0
589
CountClassCoupledModified
float64
0
581
CountClassDerived
float64
0
5.37k
CountDeclInstanceMethod
float64
0
4.2k
CountDeclInstanceVariable
float64
0
299
CountDeclMethod
float64
0
4.2k
CountDeclMethodAll
float64
0
4.2k
CountLine
float64
1
115k
CountLineBlank
float64
0
9.01k
CountLineCode
float64
0
94.4k
CountLineCodeDecl
float64
0
46.1k
CountLineCodeExe
float64
0
91.3k
CountLineComment
float64
0
27k
CountStmt
float64
1
93.2k
CountStmtDecl
float64
0
46.1k
CountStmtExe
float64
0
90.2k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
6k
142,948
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.select
class select(html_tag): ''' The select element represents a control for selecting amongst a set of options. ''' pass
class select(html_tag): ''' The select element represents a control for selecting amongst a set of options. ''' pass
1
1
0
0
0
0
0
2
1
0
0
0
0
0
0
31
6
0
2
1
1
4
2
1
1
0
3
0
0
142,949
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.section
class section(html_tag): ''' The section element represents a generic section of a document or application. A section, in this context, is a thematic grouping of content, typically with a heading. ''' pass
class section(html_tag): ''' The section element represents a generic section of a document or application. A section, in this context, is a thematic grouping of content, typically with a heading. ''' pass
1
1
0
0
0
0
0
2.5
1
0
0
0
0
0
0
31
7
0
2
1
1
5
2
1
1
0
3
0
0
142,950
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.script
class script(html_tag): ''' The script element allows authors to include dynamic script and data blocks in their documents. The element does not represent content for the user. ''' is_pretty = False
class script(html_tag): ''' The script element allows authors to include dynamic script and data blocks in their documents. The element does not represent content for the user. ''' pass
1
1
0
0
0
0
0
2
1
0
0
0
0
0
0
31
6
0
2
2
1
4
2
2
1
0
3
0
0
142,951
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.samp
class samp(html_tag): ''' The samp element represents (sample) output from a program or computing system. ''' pass
class samp(html_tag): ''' The samp element represents (sample) output from a program or computing system. ''' pass
1
1
0
0
0
0
0
2
1
0
0
0
0
0
0
31
6
0
2
1
1
4
2
1
1
0
3
0
0
142,952
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.tfoot
class tfoot(html_tag): ''' The tfoot element represents the block of rows that consist of the column summaries (footers) for the parent table element, if the tfoot element has a parent and it is a table. ''' pass
class tfoot(html_tag): ''' The tfoot element represents the block of rows that consist of the column summaries (footers) for the parent table element, if the tfoot element has a parent and it is a table. ''' pass
1
1
0
0
0
0
0
2.5
1
0
0
0
0
0
0
31
7
0
2
1
1
5
2
1
1
0
3
0
0
142,953
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.th
class th(html_tag): ''' The th element represents a header cell in a table. ''' pass
class th(html_tag): ''' The th element represents a header cell in a table. ''' pass
1
1
0
0
0
0
0
1.5
1
0
0
0
0
0
0
31
5
0
2
1
1
3
2
1
1
0
3
0
0
142,954
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.sup
class sup(html_tag): is_inline = True ''' The sup element represents a superscript. ''' pass
class sup(html_tag): pass
1
0
0
0
0
0
0
1
1
0
0
0
0
0
0
31
6
0
3
2
2
3
3
2
2
0
3
0
0
142,955
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.video
class video(html_tag): ''' A video element is used for playing videos or movies, and audio files with captions. ''' pass
class video(html_tag): ''' A video element is used for playing videos or movies, and audio files with captions. ''' pass
1
1
0
0
0
0
0
2
1
0
0
0
0
0
0
31
6
0
2
1
1
4
2
1
1
0
3
0
0
142,956
Knio/dominate
Knio_dominate/dominate/util.py
dominate.util.text
class text(dom_tag): ''' Just a string. Useful for inside context managers ''' is_pretty = False is_inline = True def __init__(self, _text, escape=True): super(text, self).__init__() self.escape = escape if escape: self.text = str_escape(_text) else: self.text = _text def _render(self, sb, *a, **kw): sb.append(self.text) return sb
class text(dom_tag): ''' Just a string. Useful for inside context managers ''' def __init__(self, _text, escape=True): pass def _render(self, sb, *a, **kw): pass
3
1
5
0
5
0
2
0.23
1
1
0
0
2
2
2
28
18
2
13
7
10
3
12
7
9
2
2
1
3
142,957
Knio/dominate
Knio_dominate/dominate/util.py
dominate.util.lazy
class lazy(dom_tag): ''' delays function execution until rendered ''' def __new__(_cls, *args, **kwargs): ''' Need to reset this special method or else dom_tag will think it's being used as a dectorator. This means lazy() can't be used as a dectorator, but thinking about when you might want that just confuses me. ''' return object.__new__(_cls) def __init__(self, func, *args, **kwargs): super(lazy, self).__init__() self.func = func self.args = args self.kwargs = kwargs def _render(self, sb, *a, **kw): r = self.func(*self.args, **self.kwargs) sb.append(str(r))
class lazy(dom_tag): ''' delays function execution until rendered ''' def __new__(_cls, *args, **kwargs): ''' Need to reset this special method or else dom_tag will think it's being used as a dectorator. This means lazy() can't be used as a dectorator, but thinking about when you might want that just confuses me. ''' pass def __init__(self, func, *args, **kwargs): pass def _render(self, sb, *a, **kw): pass
4
2
6
0
3
2
1
0.82
1
2
0
0
3
3
3
29
24
4
11
8
7
9
11
8
7
1
2
0
3
142,958
Knio/dominate
Knio_dominate/dominate/util.py
dominate.util.container
class container(dom_tag): ''' Contains multiple elements, but does not add a level ''' is_inline = True def _render(self, sb, indent_level, indent_str, pretty, xhtml): inline = self._render_children(sb, indent_level, indent_str, pretty, xhtml) if pretty and not inline: sb.append('\n') sb.append(indent_str * (indent_level - 1)) return sb
class container(dom_tag): ''' Contains multiple elements, but does not add a level ''' def _render(self, sb, indent_level, indent_str, pretty, xhtml): pass
2
1
6
0
6
0
2
0.38
1
0
0
0
1
0
1
27
11
0
8
4
6
3
8
4
6
2
2
1
2
142,959
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.wbr
class wbr(html_tag): ''' The wbr element represents a line break opportunity. ''' is_single = True is_inline = True
class wbr(html_tag): ''' The wbr element represents a line break opportunity. ''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
31
6
0
3
3
2
3
3
3
2
0
3
0
0
142,960
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.var
class var(html_tag): ''' The var element represents a variable. This could be an actual variable in a mathematical expression or programming context, an identifier representing a constant, a function parameter, or just be a term used as a placeholder in prose. ''' pass
class var(html_tag): ''' The var element represents a variable. This could be an actual variable in a mathematical expression or programming context, an identifier representing a constant, a function parameter, or just be a term used as a placeholder in prose. ''' pass
1
1
0
0
0
0
0
3
1
0
0
0
0
0
0
31
8
0
2
1
1
6
2
1
1
0
3
0
0
142,961
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.ul
class ul(html_tag): ''' The ul element represents a list of items, where the order of the items is not important - that is, where changing the order would not materially change the meaning of the document. ''' pass
class ul(html_tag): ''' The ul element represents a list of items, where the order of the items is not important - that is, where changing the order would not materially change the meaning of the document. ''' pass
1
1
0
0
0
0
0
2.5
1
0
0
0
0
0
0
31
7
0
2
1
1
5
2
1
1
0
3
0
0
142,962
Knio/dominate
Knio_dominate/dominate/community/htmx.py
htmx.HtmxTag
class HtmxTag: @classmethod def clean_attribute(cls, attribute): attribute = super().clean_attribute(attribute) if attribute.startswith('hx_'): attribute = attribute.replace('_', '-') return attribute
class HtmxTag: @classmethod def clean_attribute(cls, attribute): pass
3
0
5
0
5
0
2
0
0
1
0
0
0
0
1
1
7
0
7
3
4
0
6
2
4
2
0
1
2
142,963
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.thead
class thead(html_tag): ''' The thead element represents the block of rows that consist of the column labels (headers) for the parent table element, if the thead element has a parent and it is a table. ''' pass
class thead(html_tag): ''' The thead element represents the block of rows that consist of the column labels (headers) for the parent table element, if the thead element has a parent and it is a table. ''' pass
1
1
0
0
0
0
0
2.5
1
0
0
0
0
0
0
31
7
0
2
1
1
5
2
1
1
0
3
0
0
142,964
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.track
class track(html_tag): ''' The track element allows authors to specify explicit external timed text tracks for media elements. It does not represent anything on its own. ''' is_single = True
class track(html_tag): ''' The track element allows authors to specify explicit external timed text tracks for media elements. It does not represent anything on its own. ''' pass
1
1
0
0
0
0
0
2
1
0
0
0
0
0
0
31
6
0
2
2
1
4
2
2
1
0
3
0
0
142,965
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.tr
class tr(html_tag): ''' The tr element represents a row of cells in a table. ''' pass
class tr(html_tag): ''' The tr element represents a row of cells in a table. ''' pass
1
1
0
0
0
0
0
1.5
1
0
0
0
0
0
0
31
5
0
2
1
1
3
2
1
1
0
3
0
0
142,966
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.title
class title(html_tag): ''' The title element represents the document's title or name. Authors should use titles that identify their documents even when they are used out of context, for example in a user's history or bookmarks, or in search results. The document's title is often different from its first heading, since the first heading does not have to stand alone when taken out of context. ''' def _get_text(self): return u''.join(self.get(basestring)) def _set_text(self, text): self.clear() self.add(text) text = property(_get_text, _set_text)
class title(html_tag): ''' The title element represents the document's title or name. Authors should use titles that identify their documents even when they are used out of context, for example in a user's history or bookmarks, or in search results. The document's title is often different from its first heading, since the first heading does not have to stand alone when taken out of context. ''' def _get_text(self): pass def _set_text(self, text): pass
3
1
3
0
3
0
1
1
1
0
0
0
2
0
2
33
14
0
7
4
4
7
7
4
4
1
3
0
2
142,967
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.time_
class time_(html_tag): ''' The time element represents either a time on a 24 hour clock, or a precise date in the proleptic Gregorian calendar, optionally with a time and a time-zone offset. ''' pass
class time_(html_tag): ''' The time element represents either a time on a 24 hour clock, or a precise date in the proleptic Gregorian calendar, optionally with a time and a time-zone offset. ''' pass
1
1
0
0
0
0
0
2.5
1
0
0
0
0
0
0
31
7
0
2
1
1
5
2
1
1
0
3
0
0
142,968
Knio/dominate
Knio_dominate/dominate/tags.py
dominate.tags.u
class u(html_tag): ''' The u element represents a span of text with an unarticulated, though explicitly rendered, non-textual annotation, such as labeling the text as being a proper name in Chinese text (a Chinese proper name mark), or labeling the text as being misspelt. ''' pass
class u(html_tag): ''' The u element represents a span of text with an unarticulated, though explicitly rendered, non-textual annotation, such as labeling the text as being a proper name in Chinese text (a Chinese proper name mark), or labeling the text as being misspelt. ''' pass
1
1
0
0
0
0
0
3
1
0
0
0
0
0
0
31
8
0
2
1
1
6
2
1
1
0
3
0
0
142,969
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/srf.py
pynmea2.types.proprietary.srf.SRF100
class SRF100(SRF): fields = ( ("Subtype", "subtype"), ('Protocol', 'protocol'), # 0 = SiRF Binary # 1 = NMEA ('Baud Rate', 'baud'), # 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 ('Data bits', 'databits'), # 8 (, 7 in NMEA) ('Stop bits', 'stopbits'), # 0, 1 ('Parity', 'parity'), # 0, 1=Odd, 2=Even )
class SRF100(SRF): pass
1
0
0
0
0
0
0
0.67
1
0
0
0
0
0
0
12
15
0
9
2
8
6
2
2
1
0
4
0
0
142,970
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/rdi.py
pynmea2.types.proprietary.rdi.RDID
class RDID(RDI): ''' RD Instruments heading, pitch and roll data ''' fields = ( ('Subtype', 'subtype'), ("Pitch", "pitch", float), ("Roll", "roll", float), ("Heading", "heading", float) )
class RDID(RDI): ''' RD Instruments heading, pitch and roll data ''' pass
1
1
0
0
0
0
0
0.43
1
0
0
0
0
0
0
11
10
0
7
2
6
3
2
2
1
0
4
0
0
142,971
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/rdi.py
pynmea2.types.proprietary.rdi.RDI
class RDI(nmea.ProprietarySentence): ''' RD Instruments message. Only one sentence known? ''' sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(RDI, cls).__new__(cls)
class RDI(nmea.ProprietarySentence): ''' RD Instruments message. Only one sentence known? ''' def __new__(_cls, manufacturer, data): pass
2
1
4
0
4
0
1
0.5
1
1
0
1
1
0
1
11
9
0
6
5
4
3
6
5
4
1
3
0
1
142,972
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/srf.py
pynmea2.types.proprietary.srf.SRF
class SRF(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(SRF, cls).__new__(cls) def __init__(self, manufacturer, data): self.sentence_type = manufacturer + data[0] super(SRF, self).__init__(manufacturer, data)
class SRF(nmea.ProprietarySentence): def __new__(_cls, manufacturer, data): pass def __init__(self, manufacturer, data): pass
3
0
4
0
4
0
1
0
1
1
0
2
2
1
2
12
11
2
9
7
6
0
9
7
6
1
3
0
2
142,973
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/nor.py
pynmea2.types.proprietary.nor.NORBT9
class NORBT9(NOR): # Bottom Track DF358/DF359 - NMEA $PNORBT8/$PNORBT9 # Example: $PNORBT9,1452244916.7508,1.234,-1.234,0.1234,0.1234,0.1234,12.34,23.45,23.45,23.45,23.45,23.4,1567.8,1.2,12.3,0x000FFFFF*1E fields = ( ('Ping Time', 'timestamp', lambda x: datetime.utcfromtimestamp(float(x))), ('Time (Trigger)', 'dt1', float), ('Time (NMEA)', 'dt2', float), ('Velocity X', 'vx', float), ('Velocity Y', 'vy', float), ('Velocity Z', 'vz', float), ('Figure of Merit', 'fom', float), ('Vertical Distance Beam 1', 'd1', float), ('Vertical Distance Beam 2', 'd2', float), ('Vertical Distance Beam 3', 'd3', float), ('Vertical Distance Beam 4', 'd4', float), ('Battery Voltage', 'battery_voltage', float), ('Speed of Sound', 'sound_speed', float), ('Pressure', 'pressure', float), ('Temperature', 'temp', float), ('Status ', 'stat'), )
class NORBT9(NOR): pass
1
0
0
0
0
0
0
0.11
1
2
0
0
0
0
0
13
22
1
19
2
18
2
2
2
1
0
4
0
0
142,974
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/srf.py
pynmea2.types.proprietary.srf.SRF103
class SRF103(SRF): fields = ( ("Subtype", "subtype"), ('Sentence type', 'sentence'), # 00=GGA # 01=GLL # 02=GSA # 03=GSV # 04=RMC # 05=VTG ('Command', 'command'), # 0=Set # 1=Query ('Rate', 'rate'), ('Checksum', 'checksum'), # 0=No, 1=Yes )
class SRF103(SRF): pass
1
0
0
0
0
0
0
1.13
1
0
0
0
0
0
0
12
17
0
8
2
7
9
2
2
1
0
4
0
0
142,975
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/sxn.py
pynmea2.types.proprietary.sxn.SXN
class SXN(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[1] cls = _cls.sentence_types.get(name, _cls) return super(SXN, cls).__new__(cls)
class SXN(nmea.ProprietarySentence): def __new__(_cls, manufacturer, data): pass
2
0
4
0
4
0
1
0
1
1
0
5
1
0
1
11
7
1
6
5
4
0
6
5
4
1
3
0
1
142,976
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/sxn.py
pynmea2.types.proprietary.sxn.SXN20
class SXN20(SXN): fields = ( ('Blank', '_blank'), ('Message Type', 'message_type', int), ('Horizontal position and velocity quality', 'horiz_qual', int), ('Height and vertical velocity quality', 'hgt_qual', int), ('Heading quality', 'head_qual', int), ('Roll and pitch quality', 'rp_qual', int), )
class SXN20(SXN): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
11
9
0
9
2
8
0
2
2
1
0
4
0
0
142,977
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/nor.py
pynmea2.types.proprietary.nor.NORWT9
class NORWT9(NOR): # Water Track DF408/DF409 - NMEA $PNORWT8/$PNORWT9 # Example: $PNORWT9,1452244916.7508,1.234,-1.234,0.1234,0.1234,0.1234,12.34,23.45,23.45,23.45,23.45,23.4,1567.8,1.2,12.3,0x000FFFFF*0B fields = ( ('Ping Time', 'timestamp', lambda x: datetime.utcfromtimestamp(float(x))), ('Time (Trigger)', 'dt1', float), ('Time (NMEA)', 'dt2', float), ('Velocity X', 'vx', float), ('Velocity Y', 'vy', float), ('Velocity Z', 'vz', float), ('Figure of Merit', 'fom', float), ('Vertical Distance Beam 1', 'd1', float), ('Vertical Distance Beam 2', 'd2', float), ('Vertical Distance Beam 3', 'd3', float), ('Vertical Distance Beam 4', 'd4', float), ('Battery Voltage', 'battery_voltage', float), ('Speed of Sound', 'sound_speed', float), ('Pressure', 'pressure', float), ('Temperature', 'temp', float), ('Status ', 'stat'), )
class NORWT9(NOR): pass
1
0
0
0
0
0
0
0.11
1
2
0
0
0
0
0
13
22
1
19
2
18
2
2
2
1
0
4
0
0
142,978
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/nor.py
pynmea2.types.proprietary.nor.NORWT7
class NORWT7(NOR): # Water Track DF406/DF407 - NMEA $PNORWT6/$PNORWT7 # Example: $PNORWT7,1452244916.7508,1.234,-1.234,0.1234,0.1234,0.1234,12.34,23.45,23.45,23.45,23.45*2C fields = ( ('Ping Time', 'timestamp', lambda x: datetime.utcfromtimestamp(float(x))), ('Time (Trigger)', 'dt1', float), ('Time (NMEA)', 'dt2', float), ('Velocity X', 'vx', float), ('Velocity Y', 'vy', float), ('Velocity Z', 'vz', float), ('Figure of Merit', 'fom', float), ('Vertical Distance Beam 1', 'd1', float), ('Vertical Distance Beam 2', 'd2', float), ('Vertical Distance Beam 3', 'd3', float), ('Vertical Distance Beam 4', 'd4', float), )
class NORWT7(NOR): pass
1
0
0
0
0
0
0
0.14
1
2
0
0
0
0
0
13
17
1
14
2
13
2
2
2
1
0
4
0
0
142,979
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/nor.py
pynmea2.types.proprietary.nor.NORBT7
class NORBT7(NOR): # Bottom Track DF356/DF357 - NMEA $PNORBT6/$PNORBT7 # Example: $PNORBT7,1452244916.7508,1.234,-1.234,0.1234,0.1234,0.1234,12.34,23.45,23.45,23.45,23.45*39 fields = ( ('Ping Time', 'timestamp', lambda x: datetime.utcfromtimestamp(float(x))), ('Time (Trigger)', 'dt1', float), ('Time (NMEA)', 'dt2', float), ('Velocity X', 'vx', float), ('Velocity Y', 'vy', float), ('Velocity Z', 'vz', float), ('Figure of Merit', 'fom', float), ('Vertical Distance Beam 1', 'd1', float), ('Vertical Distance Beam 2', 'd2', float), ('Vertical Distance Beam 3', 'd3', float), ('Vertical Distance Beam 4', 'd4', float), )
class NORBT7(NOR): pass
1
0
0
0
0
0
0
0.14
1
2
0
0
0
0
0
13
17
1
14
2
13
2
2
2
1
0
4
0
0
142,980
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/nor.py
pynmea2.types.proprietary.nor.NORS4
class NORS4(NOR, nmea_utils.DatetimeFix): # Sensors Data DF103/DF104 # Example: $PNORS4,23.6,1530.2,0.0,0.0,0.0,0.000,23.30*66 fields = ( ('Battery Voltage', 'battery_voltage', float), ('Speed of Sound', 'sound_speed', float), ('Heading', 'heading', float), ('Pitch', 'pitch', float), ('Roll', 'roll', float), ('Pressure', 'pressure', float), ('Temperature', 'temp', float), )
class NORS4(NOR, nmea_utils.DatetimeFix): pass
1
0
0
0
0
0
0
0.2
2
0
0
0
0
0
0
13
13
1
10
2
9
2
2
2
1
0
4
0
0
142,981
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/nor.py
pynmea2.types.proprietary.nor.NORS1
class NORS1(NOR, nmea_utils.DatetimeFix): # Sensors Data DF101/DF102 - NMEA Format 1 and 2 # Example: $PNORS1,161109,132455,0,34000034,23.9,1500.0,123.4,0.02,45.6,0.02,23.4,0.02,123.456,0.02,24.56*51 fields = ( ('Date', 'datestamp', nmea_utils.datestamp), ('Time', 'timestamp', nmea_utils.timestamp), ('Error Code', 'ec', int), ('Status Code', 'sc'), ('Battery Voltage', 'battery_voltage', float), ('Speed of Sound', 'sound_speed', float), ('Heading', 'heading', float), ('Heading Std. Dev.', 'heading_std', float), ('Pitch', 'pitch', float), ('Pitch Std. Dev.', 'pitch_std', float), ('Roll', 'roll', float), ('Roll Std. Dev.', 'roll_std', float), ('Pressure', 'pressure', float), ('Pressure Std. Dev.', 'pressure_std', float), ('Temperature', 'temp', float), )
class NORS1(NOR, nmea_utils.DatetimeFix): pass
1
0
0
0
0
0
0
0.11
2
0
0
0
0
0
0
13
21
1
18
2
17
2
2
2
1
0
4
0
0
142,982
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/nor.py
pynmea2.types.proprietary.nor.NORI1
class NORI1(NOR): # Information Data DF101/DF102 - NMEA Format 1 and 2 # Example: $PNORI1,4,123456,3,30,1.00,5.00,BEAM*5B fields = ( ('Instrument type', 'it', int), ('Head ID', 'sn', int), ('Number of Beams', 'nb', int), ('Number of Cells', 'nc', int), ('Blanking Distance', 'bd', float), ('Cell Size', 'cs', float), ('Coordinate System', 'cy', str), )
class NORI1(NOR): pass
1
0
0
0
0
0
0
0.2
1
0
0
0
0
0
0
13
13
1
10
2
9
2
2
2
1
0
4
0
0
142,983
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/nor.py
pynmea2.types.proprietary.nor.NORH4
class NORH4(NOR, nmea_utils.DatetimeFix): # Header Data DF103/DF104 # Example: $PNORH4,161109,143459,0,204C0002*38 fields = ( ('Date', 'datestamp', nmea_utils.datestamp), ('Time', 'timestamp', nmea_utils.timestamp), ('Error Code', 'ec', int), ('Status Code', 'sc'), )
class NORH4(NOR, nmea_utils.DatetimeFix): pass
1
0
0
0
0
0
0
0.29
2
0
0
0
0
0
0
13
10
1
7
2
6
2
2
2
1
0
4
0
0
142,984
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/nor.py
pynmea2.types.proprietary.nor.NORBT0
class NORBT0(NOR, nmea_utils.DatetimeFix): # Bottom Track DF350/DF351 - NMEA $PNORBT1/$PNORBT0 # Example: $PNORBT0,1,040721,131335.3341,23.961,-48.122,-32.76800,10.00000,0.00,0x00000000*48 fields = ( ('Beam number', 'beam', int), ('Date', 'datestamp', nmea_utils.datestamp), ('Time', 'timestamp', nmea_utils.timestamp), ('Time (Trigger)', 'dt1', float), ('Time (NMEA)', 'dt2', float), ('Beam Velocity', 'bv', float), ('Figure of Merit', 'fom', float), ('Vertical Distance', 'dist', float), ('Status ', 'stat'), )
class NORBT0(NOR, nmea_utils.DatetimeFix): pass
1
0
0
0
0
0
0
0.17
2
0
0
0
0
0
0
13
15
1
12
2
11
2
2
2
1
0
4
0
0
142,985
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/nor.py
pynmea2.types.proprietary.nor.NORBT4
class NORBT4(NOR, nmea_utils.DatetimeFix): # Bottom Track DF354/DF355 - NMEA $PNORBT3/$PNORBT4 # Example: $PNORBT4,1.234,-1.234,1.234,23.4,12.34567,12.3*09 fields = ( ('Time (Trigger)', 'dt1', float), ('Time (NMEA)', 'dt2', float), ('Speed of Sound', 'sound_speed', float), ('Direction', 'dir', float), ('Figure of Merit', 'fom', float), ('Vertical Distance', 'dist', float), )
class NORBT4(NOR, nmea_utils.DatetimeFix): pass
1
0
0
0
0
0
0
0.22
2
0
0
0
0
0
0
13
12
1
9
2
8
2
2
2
1
0
4
0
0
142,986
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/sxn.py
pynmea2.types.proprietary.sxn.SXN21
class SXN21(SXN): fields = ( ('Blank', '_blank'), ('Message Type', 'message_type', int), ('Event code: 1 = system restart.', 'event', int), )
class SXN21(SXN): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
11
6
0
6
2
5
0
2
2
1
0
4
0
0
142,987
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/nor.py
pynmea2.types.proprietary.nor.NORC4
class NORC4(NOR, nmea_utils.DatetimeFix): # Current Data DF103/DF104 # Example: $PNORC4,1.5,1.395,227.1,32,32*7A fields = ( ('Cell Position', 'cp', float), ('Speed', 'sp', float), ('Direction', 'dir', float), ('Correlation', 'r', int), ('Amplitude', 'amp', int), )
class NORC4(NOR, nmea_utils.DatetimeFix): pass
1
0
0
0
0
0
0
0.25
2
0
0
0
0
0
0
13
11
1
8
2
7
2
2
2
1
0
4
0
0
142,988
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/nor.py
pynmea2.types.proprietary.nor.NORC1
class NORC1(NOR, nmea_utils.DatetimeFix): # Current Data DF101/DF102 - NMEA Format 1 and 2 # Example: $PNORC1,083013,132455,3,11.0,0.332,0.332,0.332,78.9,78.9,78.9,78,78,78*46 fields = ( ('Date', 'datestamp', nmea_utils.datestamp), ('Time', 'timestamp', nmea_utils.timestamp), ('Cell Number', 'cn', int), ('Cell Position', 'cp', float), ('Velocity X', 'vx', float), ('Velocity Y', 'vy', float), ('Velocity Z', 'vz', float), ('Velocity Z2', 'vz2', float), ('Amplitude Beam 1', 'amp1', float), ('Amplitude Beam 2', 'amp2', float), ('Amplitude Beam 3', 'amp3', float), ('Amplitude Beam 4', 'amp4', float), ('Correlation Beam 1', 'r1', int), ('Correlation Beam 2', 'r2', int), ('Correlation Beam 3', 'r3', int), ('Correlation Beam 4', 'r4', int), ('Correlation Beam 4', 'r5', int), )
class NORC1(NOR, nmea_utils.DatetimeFix): pass
1
0
0
0
0
0
0
0.1
2
0
0
0
0
0
0
13
23
1
20
2
19
2
2
2
1
0
4
0
0
142,989
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/nor.py
pynmea2.types.proprietary.nor.NORWT4
class NORWT4(NOR): # Water Track DF404/DF405 - NMEA $PNORWT3/$PNORWT4 # Example: $PNORWT4,1.2345,-1.2345,1.234,23.4,12.34,12.3*1C fields = ( ('Time Trigger ', 'dt1', float), ('Time NMEA', 'dt2', float), ('Speed of sound', 'sound_speed', float), ('Direction', 'dir', float), ('Figure of Merit', 'fom', float), ('Vertical Distance', 'dist', float), )
class NORWT4(NOR): pass
1
0
0
0
0
0
0
0.22
1
0
0
0
0
0
0
13
12
1
9
2
8
2
2
2
1
0
4
0
0
142,990
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/sxn.py
pynmea2.types.proprietary.sxn.SXN22
class SXN22(SXN): fields = ( ('Blank', '_blank'), ('Message Type', 'message_type', int), ('Gyro calibration value since system start-up in degrees', 'gyro_calib', float), ('Short-term gyro offset in degrees', 'gyro_ffs', float), )
class SXN22(SXN): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
11
7
0
7
2
6
0
2
2
1
0
4
0
0
142,991
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/ash.py
pynmea2.types.proprietary.ash.ASH
class ASH(nmea.ProprietarySentence): ''' Generic Ashtech Response Message ''' sentence_types = {} def __new__(_cls, manufacturer, data): ''' Return the correct sentence type based on the first field ''' sentence_type = data[1] name = manufacturer + 'R' + sentence_type if name not in _cls.sentence_types: # ASHRATT does not have a sentence type if ASHRATT.match(data): return super(ASH, ASHRATT).__new__(ASHRATT) cls = _cls.sentence_types.get(name, ASH) return super(ASH, cls).__new__(cls)
class ASH(nmea.ProprietarySentence): ''' Generic Ashtech Response Message ''' def __new__(_cls, manufacturer, data): ''' Return the correct sentence type based on the first field ''' pass
2
2
12
0
8
4
3
0.7
1
2
1
5
1
0
1
11
17
0
10
6
8
7
10
6
8
3
3
2
3
142,992
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/sxn.py
pynmea2.types.proprietary.sxn.SXN24
class SXN24(SXN): fields = ( ('Blank', '_blank'), ('Message Type', 'message_type', int), ('Roll rate in degrees/second. Positive when port side is moving upwards.', 'roll_rate', float), ('Pitch rate in degrees/second. Positive when bow is moving upwards.', 'pitch_rate', float), ('Yaw rate in degrees/second. Positive when bow is moving towards starboard.', 'yaw_rate', float), ('Vertical velocity in metres/second. Positive when moving downwards.', 'vertical_vel', float) )
class SXN24(SXN): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
11
9
0
9
2
8
0
2
2
1
0
4
0
0
142,993
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/vtx.py
pynmea2.types.proprietary.vtx.VTX0020
class VTX0020(VTX, LatLonFix): """ Vectronix self location: lat, long, altitude """ fields = ( ("Message Placeholder", "mplaceholder"), ("Subtype", "subtype"), ("Measurement ID", "measurement_id", int), ('Latitude', 'lat'), ('Latitude Direction', 'lat_dir'), ('Longitude', 'lon'), ('Longitude Direction', 'lon_dir'), ('Altitude above WGS84 ellipsoid, meters', 'altitude', float), ('Altitude units', 'altitude_units') )
class VTX0020(VTX, LatLonFix): ''' Vectronix self location: lat, long, altitude ''' pass
1
1
0
0
0
0
0
0.17
2
0
0
0
0
0
0
20
14
0
12
2
11
2
2
2
1
0
4
0
0
142,994
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/vtx.py
pynmea2.types.proprietary.vtx.VTX0012
class VTX0012(VTX, LatLonFix): """ Vectronix target location: lat, long, altitude, gain """ fields = ( ("Message Placeholder", "mplaceholder"), ("Subtype", "subtype"), ("Measurement ID", "measurement_id", int), ('Latitude', 'lat'), ('Latitude Direction', 'lat_dir'), ('Longitude', 'lon'), ('Longitude Direction', 'lon_dir'), ('Altitude above WGS84 ellipsoid, meters', 'altitude', float), ('Altitude units', 'altitude_units'), ('Gain (meters)', 'gain', float), ('Gain units', 'gain_units') )
class VTX0012(VTX, LatLonFix): ''' Vectronix target location: lat, long, altitude, gain ''' pass
1
1
0
0
0
0
0
0.14
2
0
0
0
0
0
0
20
16
0
14
2
13
2
2
2
1
0
4
0
0
142,995
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/vtx.py
pynmea2.types.proprietary.vtx.VTX0002
class VTX0002(VTX): """ Vectronix measurement: laser distance and angles (degrees) with declination """ fields = ( ("Message Placeholder", "mplaceholder"), ("Subtype", "subtype"), ("Measurement ID", "measurement_id", int), ("Distance (meters)", "dist", float), ("Distance unit", "dist_unit"), ("Direction (degrees)", "direction", float), ("Direction unit", "direction_unit"), ("Vertical angle (degrees)", "va", float), ("Magnetic declination (degrees)", "decl", float), ("Magnetic declination ref (E/W)", "decl_ref") )
class VTX0002(VTX): ''' Vectronix measurement: laser distance and angles (degrees) with declination ''' pass
1
1
0
0
0
0
0
0.15
1
0
0
0
0
0
0
12
15
0
13
2
12
2
2
2
1
0
4
0
0
142,996
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/vtx.py
pynmea2.types.proprietary.vtx.VTX0000
class VTX0000(VTX): """ Vectronix raw measurement: laser distance and angles (radians) without declination """ fields = ( ("Message Placeholder", "mplaceholder"), ("Subtype", "subtype"), ("Distance (meters)", "dist", float), ("Distance unit", "dist_unit"), ("Direction (radians)", "direction", float), ("Roll angle (radians)", "roll", float), ("Vertical angle (radians)", "va", float), ("Angular units type", "angle_units") )
class VTX0000(VTX): ''' Vectronix raw measurement: laser distance and angles (radians) without declination ''' pass
1
1
0
0
0
0
0
0.18
1
0
0
0
0
0
0
12
13
0
11
2
10
2
2
2
1
0
4
0
0
142,997
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/vtx.py
pynmea2.types.proprietary.vtx.VTX
class VTX(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[1] cls = _cls.sentence_types.get(name, _cls) return super(VTX, cls).__new__(cls) def __init__(self, manufacturer, data): self.sentence_type = manufacturer + data[0] super(VTX, self).__init__(manufacturer, data)
class VTX(nmea.ProprietarySentence): def __new__(_cls, manufacturer, data): pass def __init__(self, manufacturer, data): pass
3
0
4
0
4
0
1
0
1
1
0
4
2
1
2
12
11
2
9
7
6
0
9
7
6
1
3
0
2
142,998
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/ubx.py
pynmea2.types.proprietary.ubx.UBX04
class UBX04(UBX): """ Time and Day Clock Information """ fields = ( ("Blank", "_blank"), ("UBX Type", "ubx_type"), ("UTC Time", "time", timestamp), ("UTC Date", "date", datestamp), ("UTC Time of Week", "utc_tow"), ("UTC Week Number", "utc_wk"), ("Leap Seconds", "leap_sec"), ("Receiver Clock Bias", "clk_bias", int), ("Receiver Clock Drift", "clk_drift", Decimal), ("Time Pulse Granularity", "tp_gran", int), )
class UBX04(UBX): ''' Time and Day Clock Information ''' pass
1
1
0
0
0
0
0
0.15
1
0
0
0
0
0
0
11
15
0
13
2
12
2
2
2
1
0
4
0
0
142,999
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/nor.py
pynmea2.types.proprietary.nor.NOR
class NOR(ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(NOR, cls).__new__(cls) def __init__(self, manufacturer, data): self.sentence_type = manufacturer + data[0] super(NOR, self).__init__(manufacturer, data[1:]) def identifier(self): return 'P%s,' % (self.sentence_type)
class NOR(ProprietarySentence): def __new__(_cls, manufacturer, data): pass def __init__(self, manufacturer, data): pass def identifier(self): pass
4
0
3
0
3
0
1
0
1
1
0
13
3
1
3
13
14
3
11
8
7
0
11
8
7
1
3
0
3
143,000
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/ubx.py
pynmea2.types.proprietary.ubx.UBX03
class UBX03(UBX): """ Satellite Status """ fields = ( ("Blank", "_blank"), ("UBX Type", "ubx_type"), ("Number of GNSS Satellites Tracked", "num_sv", int), ) @property def satellite_list(self): return self.data[1:]
class UBX03(UBX): ''' Satellite Status ''' @property def satellite_list(self): pass
3
1
2
0
2
0
1
0.22
1
0
0
0
1
0
1
12
12
1
9
4
6
2
4
3
2
1
4
0
1
143,001
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/ubx.py
pynmea2.types.proprietary.ubx.UBX00
class UBX00(UBX, LatLonFix): """ Lat/Long Position Data """ fields = ( ("Blank", "_blank"), ("UBX Type", "ubx_type"), ("Timestamp (UTC)", "timestamp", timestamp), ("Latitude", "lat"), ("Latitude Direction", "lat_dir"), ("Longitude", "lon"), ("Longitude Direction", "lon_dir"), ("Altitude above user datum ellipsoid", "alt_ref"), ("Navigation Status", "nav_stat"), ("Horizontal Accuracy Estimate", "h_acc"), ("Vertical Accuracy Estimate", "v_acc"), ("Speed over Ground", "sog"), ("Course over Ground", "cog"), ("Vertical Velocity", "v_vel"), ("Age of Differential Corrections", "diff_age"), ("Horizontal Dilution of Precision", "hdop"), ("Vertical Dilution of Precision", "vdop"), ("Time Dilution of Precision", "tdop"), ("Number of Satellites Used", "num_svs"), ("Reserved", "reserved") )
class UBX00(UBX, LatLonFix): ''' Lat/Long Position Data ''' pass
1
1
0
0
0
0
0
0.09
2
0
0
0
0
0
0
19
25
0
23
2
22
2
2
2
1
0
4
0
0
143,002
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/sxn.py
pynmea2.types.proprietary.sxn.SXN23
class SXN23(SXN): fields = ( ('Blank', '_blank'), ('Message Type', 'message_type', int), ('Roll in degrees. Positive with port side up.', 'roll', float), ('Pitch in degrees. Positive with bow up.', 'pitch', float), ('Heading, degrees true (0.00 - 359.99).', 'head', float), ('Heave in metres. Positive down.', 'heave', float) )
class SXN23(SXN): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
11
9
0
9
2
8
0
2
2
1
0
4
0
0
143,003
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/ubx.py
pynmea2.types.proprietary.ubx.UBX
class UBX(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[1] cls = _cls.sentence_types.get(name, _cls) return super(UBX, cls).__new__(cls)
class UBX(nmea.ProprietarySentence): def __new__(_cls, manufacturer, data): pass
2
0
4
0
4
0
1
0
1
1
0
3
1
0
1
11
7
1
6
5
4
0
6
5
4
1
3
0
1
143,004
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/tnl.py
pynmea2.types.proprietary.tnl.TNLVGK
class TNLVGK(TNL, DatetimeFix): """ Trimble VGK (vector information) message """ fields = ( ('Empty', '_'), ('Sentence Type', 'type'), ('Timestamp', 'timestamp', timestamp), ('Datestamp', 'datestamp', datestamp), ('East component', 'east', float), ('North component', 'north', float), ('Up component', 'up', float), ('GPS Quality', 'gps_quality'), ('Number of satelites', 'num_sats', Decimal), ('DOP of fix', 'dop', float), ('Meters', 'meters'), )
class TNLVGK(TNL, DatetimeFix): ''' Trimble VGK (vector information) message ''' pass
1
1
0
0
0
0
0
0.21
2
0
0
0
0
0
0
12
17
0
14
2
13
3
2
2
1
0
4
0
0
143,005
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/tnl.py
pynmea2.types.proprietary.tnl.TNLPJT
class TNLPJT(TNL): """ Trimble PJT Message """ fields = ( ('Empty', '_'), ('Sentence Type', 'type'), ('Coordinate System', 'coord_name'), ('Project Name', 'project_name'), )
class TNLPJT(TNL): ''' Trimble PJT Message ''' pass
1
1
0
0
0
0
0
0.43
1
0
0
0
0
0
0
11
10
0
7
2
6
3
2
2
1
0
4
0
0
143,006
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/tnl.py
pynmea2.types.proprietary.tnl.TNLPJK
class TNLPJK(TNL, DatetimeFix): """ Trimble PJK message """ fields = ( ('Empty', '_'), ('Sentence Type', 'type'), ('Timestamp', 'timestamp', timestamp), ('Datestamp', 'datestamp', datestamp), ('Northing', 'northing', float), ('North', 'north'), ('Easting', 'easting', float), ('East', 'east'), ('GPS Quality', 'gps_quality'), ('Number of satellites', 'num_sats', Decimal), ('DOP of fix', 'dop', float), ('Height of antenna phase center', 'height'), ('Meters', 'meters'), )
class TNLPJK(TNL, DatetimeFix): ''' Trimble PJK message ''' pass
1
1
0
0
0
0
0
0.19
2
0
0
0
0
0
0
12
19
0
16
2
15
3
2
2
1
0
4
0
0
143,007
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/tnl.py
pynmea2.types.proprietary.tnl.TNLGGK
class TNLGGK(TNL, LatLonFix, DatetimeFix): """ Trimble GGK Message """ fields = ( ('Empty', '_'), ('Sentence Type', 'type'), ('Timestamp', 'timestamp', timestamp), ("Datestamp", "datestamp", datestamp), ("Latitude", "lat"), ("Latitude Direction", "lat_dir"), ("Longitude", "lon"), ("Longitude Direction", "lon_dir"), ('GPS Quality', 'quality'), ('Total number of satelites in use', 'num_sats'), ('DOP', 'dop'), ('Height Ellipsoid', 'height'), ('Meters', 'meters'), ('Mode fix type', 'mode_fix_type'), )
class TNLGGK(TNL, LatLonFix, DatetimeFix): ''' Trimble GGK Message ''' pass
1
1
0
0
0
0
0
0.18
3
0
0
0
0
0
0
20
20
0
17
2
16
3
2
2
1
0
4
0
0
143,008
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/tnl.py
pynmea2.types.proprietary.tnl.TNLEVT
class TNLEVT(TNL, DatetimeFix): """ Trimble EVT message (used for events like hardware triggers) 0 Talker ID $PTNL 1 Message ID EVT 2 Event time. UTC time of event in format hhmmss.ssssss 3 Port number. Port event markers receiver: "1" or "2" (optional), if two ports are available. 4 NNNNNN. Incremental number of events on each independent port. 5 WWWW. Week number of event (since 06 January 1980). 6 Day of week. Days denoted 0 = Sunday…6 = Saturday. 7 Leap second. UTC Leap Second offset from GPS time, 8 The checksum data, always begins with * Example message: $PTNL,EVT,131007.999785,2,460,2181,5,18*72 """ fields = ( ('Empty', '_'), ('Sentence Type', 'type'), ('Timestamp', 'timestamp', timestamp), ('Port Number', 'port_num', int), ('Event Number', 'event_num', int), ('GPS Week Number', 'gps_week_num', int), ('GPS Day of the Week', 'gps_day_num', int), ('Leap Seconds', 'leap_secs', int) )
class TNLEVT(TNL, DatetimeFix): ''' Trimble EVT message (used for events like hardware triggers) 0 Talker ID $PTNL 1 Message ID EVT 2 Event time. UTC time of event in format hhmmss.ssssss 3 Port number. Port event markers receiver: "1" or "2" (optional), if two ports are available. 4 NNNNNN. Incremental number of events on each independent port. 5 WWWW. Week number of event (since 06 January 1980). 6 Day of week. Days denoted 0 = Sunday…6 = Saturday. 7 Leap second. UTC Leap Second offset from GPS time, 8 The checksum data, always begins with * Example message: $PTNL,EVT,131007.999785,2,460,2181,5,18*72 ''' pass
1
1
0
0
0
0
0
1.36
2
0
0
0
0
0
0
12
28
2
11
2
10
15
2
2
1
0
4
0
0
143,009
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/tnl.py
pynmea2.types.proprietary.tnl.TNLDG
class TNLDG(TNL): """ Trimble DG message (L-band, beacon signal strength, etc) """ @staticmethod def match(data): return re.match(r'\d+\.\d{1}', data[1]) def __init__(self, *args, **kwargs): self.subtype = 'DG' super(TNLDG, self).__init__(*args, **kwargs) fields = ( ('Empty', '_'), ('Signal strength', 'strength', float), ('SNR in db', 'snr', float), ('Signal frequency in kHz', 'frequency', float), ('Bit rate', 'bitrate', Decimal), ('Channel number', 'channel_no', Decimal), ('Tracking status', 'status'), ('Channel used', 'channel_used'), ('Tracking performance indicator', 'performance', Decimal), )
class TNLDG(TNL): ''' Trimble DG message (L-band, beacon signal strength, etc) ''' @staticmethod def match(data): pass def __init__(self, *args, **kwargs): pass
4
1
3
0
3
0
1
0.17
1
1
0
0
1
1
2
13
23
2
18
6
14
3
7
5
4
1
4
0
2
143,010
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/tnl.py
pynmea2.types.proprietary.tnl.TNLBPQ
class TNLBPQ(TNL, LatLonFix, DatetimeFix): """ Trimble BPQ Message """ fields = ( ('Empty', '_'), ('Sentence Type', 'type'), ('Timestamp', 'timestamp', timestamp), ("Datestamp", "datestamp", datestamp), ("Latitude", "lat"), ("Latitude Direction", "lat_dir"), ("Longitude", "lon"), ("Longitude Direction", "lon_dir"), ('Height Ellipsoid', 'height'), ('Meters', 'meters'), ('Mode fix type', 'mode_fix_type'), ('Total number of satelites in use', 'num_sats'), )
class TNLBPQ(TNL, LatLonFix, DatetimeFix): ''' Trimble BPQ Message ''' pass
1
1
0
0
0
0
0
0.2
3
0
0
0
0
0
0
20
18
0
15
2
14
3
2
2
1
0
4
0
0
143,011
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/tnl.py
pynmea2.types.proprietary.tnl.TNLAVR
class TNLAVR(TNL): """ Trimble AVR Message """ fields = ( ('Empty', '_'), ('Sentence Type', 'type'), ('Timestamp', 'timestamp', timestamp), ('Yaw Angle', 'yaw_angle'), ('Yaw', 'yaw'), ('Tilt Angle', 'tilt_angle'), ('Tilt', 'tilt'), ('Roll Angle', 'roll_angle'), ('Roll', 'roll'), ('Baseline Range', 'baseline'), ('GPS Quality', 'gps_quality'), ('PDOP', 'pdop'), ('Total number of satelites in use', 'num_sats'), )
class TNLAVR(TNL): ''' Trimble AVR Message ''' pass
1
1
0
0
0
0
0
0.19
1
0
0
0
0
0
0
11
19
0
16
2
15
3
2
2
1
0
4
0
0
143,012
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/tnl.py
pynmea2.types.proprietary.tnl.TNL
class TNL(nmea.ProprietarySentence): sentence_types = {} """ Generic Trimble Message """ def __new__(_cls, manufacturer, data): ''' Return the correct sentence type based on the first field ''' sentence_type = data[1] name = manufacturer + sentence_type if name not in _cls.sentence_types: # TNLDG does not have a sentence type if TNLDG.match(data): return super(TNL, TNLDG).__new__(TNLDG) cls = _cls.sentence_types.get(name, TNL) return super(TNL, cls).__new__(cls)
class TNL(nmea.ProprietarySentence): def __new__(_cls, manufacturer, data): ''' Return the correct sentence type based on the first field ''' pass
2
1
12
0
8
4
3
0.7
1
2
1
9
1
0
1
11
17
0
10
6
8
7
10
6
8
3
3
2
3
143,013
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/tnl.py
pynmea2.types.proprietary.tnl.TNLVHD
class TNLVHD(TNL, DatetimeFix): """ Trimble VHD Message """ fields = ( ('Empty', '_'), ('Sentence Type', 'type'), ('Timestamp', 'timestamp', timestamp), ('Datestamp', 'datestamp', datestamp), ('Azimuth Angle', 'azimuth', float), ('AzimuthTime', 'azdt', float), ('Vertical Angle', 'vertical', float), ('VerticalTime', 'vertdt', float), ('Range', 'range', float), ('RangeTime', 'rdt', float), ('GPS Quality', 'gps_quality'), ('Total number of satelites in use', 'num_sats', Decimal), ('PDOP', 'pdop', float), )
class TNLVHD(TNL, DatetimeFix): ''' Trimble VHD Message ''' pass
1
1
0
0
0
0
0
0.19
2
0
0
0
0
0
0
12
19
0
16
2
15
3
2
2
1
0
4
0
0
143,014
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/mgn.py
pynmea2.types.proprietary.mgn.MGNWPL
class MGNWPL(MGN, nmea_utils.LatLonFix): """ Magellan Waypoint Location https://github.com/wb2osz/direwolf/blob/master/waypoint.c $PMGNWPL,ddmm.mmmm,ns,dddmm.mmmm,ew,alt,unit,wname,comment,icon,xx*99 Where, ddmm.mmmm,ns is latitude dddmm.mmmm,ew is longitude alt is altitude unit is M for meters or F for feet wname is the waypoint name comment is message or comment icon is one or two letters for icon code xx is waypoint type which is optional, not well defined, and not used in their example. *99 is checksum """ fields = ( ("Subtype", "subtype"), ("Latitude", "lat"), ("Latitude Direction", "lat_dir"), ("Longitude", "lon"), ("Longitude Direction", "lon_dir"), ("Altitude", "altitude", Decimal), ("Altitude Units (Feet/Meters)", "altitude_unit"), ("Waypoint Name", "wname"), ("Comment", "comment"), ("Icon", "icon"), ("Waypoint Type", "type") )
class MGNWPL(MGN, nmea_utils.LatLonFix): ''' Magellan Waypoint Location https://github.com/wb2osz/direwolf/blob/master/waypoint.c $PMGNWPL,ddmm.mmmm,ns,dddmm.mmmm,ew,alt,unit,wname,comment,icon,xx*99 Where, ddmm.mmmm,ns is latitude dddmm.mmmm,ew is longitude alt is altitude unit is M for meters or F for feet wname is the waypoint name comment is message or comment icon is one or two letters for icon code xx is waypoint type which is optional, not well defined, and not used in their example. *99 is checksum '''
1
1
0
0
0
0
0
1.07
2
0
0
0
0
0
0
20
31
2
14
2
13
15
2
2
1
0
4
0
0
143,015
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/fec.py
pynmea2.types.proprietary.fec.FECGPhve
class FECGPhve(FEC): """ Furuno GPatt Message $PFEC,GPhve,xx.xxx,A*hh<CR><LF> $PFEC: Talker identifier GPhve: Datagram identifier xx.xxx: Heave (Metres) A: Status *hh: Checksum """ fields = ( ("R", "_r"), ("Subtype", "subtype"), ("Heave", "heave", float), )
class FECGPhve(FEC): ''' Furuno GPatt Message $PFEC,GPhve,xx.xxx,A*hh<CR><LF> $PFEC: Talker identifier GPhve: Datagram identifier xx.xxx: Heave (Metres) A: Status *hh: Checksum ''' pass
1
1
0
0
0
0
0
1.5
1
0
0
0
0
0
0
11
17
2
6
2
5
9
2
2
1
0
4
0
0
143,016
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/kwd.py
pynmea2.types.proprietary.kwd.KWDWPL
class KWDWPL(KWD, nmea_utils.LatLonFix, nmea_utils.DatetimeFix, nmea_utils.ValidStatusFix): """ Kenwood Waypoint Location https://github.com/wb2osz/direwolf/blob/master/waypoint.c $PKWDWPL,hhmmss,v,ddmm.mm,ns,dddmm.mm,ew,speed,course,ddmmyy,alt,wname,ts*99 Where, hhmmss is time in UTC from the clock in the transceiver. This will be bogus if the clock was not set properly. It does not use the timestamp from a position report which could be useful. GPS Status A = active, V = void. It looks like this might be modeled after the GPS status values we see in $GPRMC. i.e. Does the transceiver know its location? I don't see how that information would be relevant in this context. I've observed this under various conditions (No GPS, GPS with/without fix) and it has always been "V." ddmm.mm,ns is latitude. N or S. dddmm.mm,ew is longitude. E or W. speed is speed over ground, knots. course is course over ground, degrees. ddmmyy is date. See comments for time. alt is altitude, meters above mean sea level. wname is the waypoint name. For an Object Report, the id is the object name. For a position report, it is the call of the sending station. An Object name can contain any printable characters. What if object name contains , or * characters? Those are field delimiter characters and it would be unfortunate if they appeared in a NMEA sentence data field. If there is a comma in the name, such as "test,5" the Kenwood TM-D710A displays it fine but we end up with an extra field. $PKWDWPL,150803,V,4237.14,N,07120.83,W,,,190316,,test,5,/'*30 If the name contains an asterisk, it doesn't show up on the display and no waypoint sentence is generated. Some other talkers substitute these two characters following the AvMap precedent. $PKWDWPL,204714,V,4237.1400,N,07120.8300,W,,,200316,,test|5,/'*61 $PKWDWPL,204719,V,4237.1400,N,07120.8300,W,,,200316,,test~6,/'*6D ts are the table and symbol. What happens if the symbol is comma or asterisk? , Boy Scouts / Girl Scouts * SnowMobile / Snow the D710A just pushes them thru without checking. These would not be parsed properly: $PKWDWPL,150753,V,4237.14,N,07120.83,W,,,190316,,test3,/,*1B $PKWDWPL,150758,V,4237.14,N,07120.83,W,,,190316,,test4,/ **3B Other talkers do the usual substitution and the other end would need to change them back after extracting from NMEA sentence. $PKWDWPL,204704,V,4237.1400,N,07120.8300,W,,,200316,,test3,/|*41 $PKWDWPL,204709,V,4237.1400,N,07120.8300,W,,,200316,,test4,/~*49 *99 is checksum Oddly, there is no place for comment. """ fields = ( ("Subtype", "subtype"), ("Time of Receipt", "timestamp", nmea_utils.timestamp), ("GPS Status (Void)","status"), ("Latitude", "lat"), ("Latitude Direction", "lat_dir"), ("Longitude", "lon"), ("Longitude Direction", "lon_dir"), ("Speed over Ground", "sog", float), ("Course over Ground", "cog", float), ("Date", "datestamp", nmea_utils.datestamp), ("Altitude", "altitude", Decimal), ("Waypoint Name", "wname"), ("Table and Symbol", "ts"), )
class KWDWPL(KWD, nmea_utils.LatLonFix, nmea_utils.DatetimeFix, nmea_utils.ValidStatusFix): ''' Kenwood Waypoint Location https://github.com/wb2osz/direwolf/blob/master/waypoint.c $PKWDWPL,hhmmss,v,ddmm.mm,ns,dddmm.mm,ew,speed,course,ddmmyy,alt,wname,ts*99 Where, hhmmss is time in UTC from the clock in the transceiver. This will be bogus if the clock was not set properly. It does not use the timestamp from a position report which could be useful. GPS Status A = active, V = void. It looks like this might be modeled after the GPS status values we see in $GPRMC. i.e. Does the transceiver know its location? I don't see how that information would be relevant in this context. I've observed this under various conditions (No GPS, GPS with/without fix) and it has always been "V." ddmm.mm,ns is latitude. N or S. dddmm.mm,ew is longitude. E or W. speed is speed over ground, knots. course is course over ground, degrees. ddmmyy is date. See comments for time. alt is altitude, meters above mean sea level. wname is the waypoint name. For an Object Report, the id is the object name. For a position report, it is the call of the sending station. An Object name can contain any printable characters. What if object name contains , or * characters? Those are field delimiter characters and it would be unfortunate if they appeared in a NMEA sentence data field. If there is a comma in the name, such as "test,5" the Kenwood TM-D710A displays it fine but we end up with an extra field. $PKWDWPL,150803,V,4237.14,N,07120.83,W,,,190316,,test,5,/'*30 If the name contains an asterisk, it doesn't show up on the display and no waypoint sentence is generated. Some other talkers substitute these two characters following the AvMap precedent. $PKWDWPL,204714,V,4237.1400,N,07120.8300,W,,,200316,,test|5,/'*61 $PKWDWPL,204719,V,4237.1400,N,07120.8300,W,,,200316,,test~6,/'*6D ts are the table and symbol. What happens if the symbol is comma or asterisk? , Boy Scouts / Girl Scouts * SnowMobile / Snow the D710A just pushes them thru without checking. These would not be parsed properly: $PKWDWPL,150753,V,4237.14,N,07120.83,W,,,190316,,test3,/,*1B $PKWDWPL,150758,V,4237.14,N,07120.83,W,,,190316,,test4,/ **3B Other talkers do the usual substitution and the other end would need to change them back after extracting from NMEA sentence. $PKWDWPL,204704,V,4237.1400,N,07120.8300,W,,,200316,,test3,/|*41 $PKWDWPL,204709,V,4237.1400,N,07120.8300,W,,,200316,,test4,/~*49 *99 is checksum Oddly, there is no place for comment. ''' pass
1
1
0
0
0
0
0
3.06
4
0
0
0
0
0
0
22
82
17
16
2
15
49
2
2
1
0
4
0
0
143,017
Knio/pynmea2
Knio_pynmea2/pynmea2/nmea_utils.py
pynmea2.nmea_utils.ValidVBWFix
class ValidVBWFix(object): #pylint: disable=no-member @property def is_valid(self): return self.data_validity_water_spd == self.data_validity_grnd_spd == 'A'
class ValidVBWFix(object): @property def is_valid(self): pass
3
0
2
0
2
0
1
0.25
1
0
0
1
1
0
1
1
5
0
4
3
1
1
3
2
1
1
1
0
1
143,018
Knio/pynmea2
Knio_pynmea2/pynmea2/nmea_utils.py
pynmea2.nmea_utils.ValidStatusFix
class ValidStatusFix(object): #pylint: disable=no-member @property def is_valid(self): return self.status == 'A'
class ValidStatusFix(object): @property def is_valid(self): pass
3
0
2
0
2
0
1
0.25
1
0
0
12
1
0
1
1
5
0
4
3
1
1
3
2
1
1
1
0
1
143,019
Knio/pynmea2
Knio_pynmea2/pynmea2/nmea_utils.py
pynmea2.nmea_utils.ValidRMCStatusFix
class ValidRMCStatusFix(ValidStatusFix): #pylint: disable=no-member @property def is_valid(self): status = super(ValidRMCStatusFix, self).is_valid if self.name_to_idx["mode_indicator"] < len(self.data): status &= self.mode_indicator in tuple('ADEFMPRS') if self.name_to_idx["nav_status"] < len(self.data): status &= self.nav_status in tuple('SCU') return status
class ValidRMCStatusFix(ValidStatusFix): @property def is_valid(self): pass
3
0
7
0
7
0
3
0.11
1
2
0
1
1
2
1
2
10
0
9
6
6
1
8
3
6
3
2
1
3
143,020
Knio/pynmea2
Knio_pynmea2/pynmea2/nmea_utils.py
pynmea2.nmea_utils.ValidGSAFix
class ValidGSAFix(object): #pylint: disable=no-member @property def is_valid(self): return int(self.mode_fix_type) in [2, 3]
class ValidGSAFix(object): @property def is_valid(self): pass
3
0
2
0
2
0
1
0.25
1
1
0
1
1
0
1
1
5
0
4
3
1
1
3
2
1
1
1
0
1
143,021
Knio/pynmea2
Knio_pynmea2/pynmea2/nmea_utils.py
pynmea2.nmea_utils.ValidGGAFix
class ValidGGAFix(object): #pylint: disable=no-member @property def is_valid(self): return self.gps_qual in range(1,6)
class ValidGGAFix(object): @property def is_valid(self): pass
3
0
2
0
2
0
1
0.25
1
1
0
1
1
1
1
1
5
0
4
4
1
1
3
2
1
1
1
0
1
143,022
Knio/pynmea2
Knio_pynmea2/pynmea2/nmea_utils.py
pynmea2.nmea_utils.TZInfo
class TZInfo(datetime.tzinfo): def __init__(self, hh, mm): self.hh = hh self.mm = mm super(TZInfo, self).__init__() def tzname(self, dt): return '' def dst(self, dt): return datetime.timedelta(0) def utcoffset(self, dt): return datetime.timedelta(hours=self.hh, minutes=self.mm)
class TZInfo(datetime.tzinfo): def __init__(self, hh, mm): pass def tzname(self, dt): pass def dst(self, dt): pass def utcoffset(self, dt): pass
5
0
3
0
3
0
1
0
1
2
0
0
4
2
4
9
14
3
11
7
6
0
11
7
6
1
1
0
4
143,023
Knio/pynmea2
Knio_pynmea2/pynmea2/nmea_utils.py
pynmea2.nmea_utils.LatLonFix
class LatLonFix(object): '''Mixin to add `latitude` and `longitude` properties as signed decimals to NMEA sentences which have co-ordinates given as degrees/minutes (lat, lon) and cardinal directions (lat_dir, lon_dir)''' #pylint: disable=no-member @property def latitude(self): '''Latitude in signed degrees (python float)''' sd = dm_to_sd(self.lat) if self.lat_dir == 'N': return +sd elif self.lat_dir == 'S': return -sd else: return 0. @property def longitude(self): '''Longitude in signed degrees (python float)''' sd = dm_to_sd(self.lon) if self.lon_dir == 'E': return +sd elif self.lon_dir == 'W': return -sd else: return 0. @staticmethod def _minutes(x): return abs(x * 60.) % 60. @staticmethod def _seconds(x): return abs(x * 3600.) % 60. @property def latitude_minutes(self): return self._minutes(self.latitude) @property def longitude_minutes(self): return self._minutes(self.longitude) @property def latitude_seconds(self): return self._seconds(self.latitude) @property def longitude_seconds(self): return self._seconds(self.longitude)
class LatLonFix(object): '''Mixin to add `latitude` and `longitude` properties as signed decimals to NMEA sentences which have co-ordinates given as degrees/minutes (lat, lon) and cardinal directions (lat_dir, lon_dir)''' @property def latitude(self): '''Latitude in signed degrees (python float)''' pass @property def longitude(self): '''Longitude in signed degrees (python float)''' pass @staticmethod def _minutes(x): pass @staticmethod def _seconds(x): pass @property def latitude_minutes(self): pass @property def longitude_minutes(self): pass @property def latitude_seconds(self): pass @property def longitude_seconds(self): pass
17
3
4
0
4
0
2
0.16
1
0
0
17
6
0
8
8
50
7
37
19
20
6
25
11
16
3
1
1
12
143,024
Knio/pynmea2
Knio_pynmea2/pynmea2/nmea_utils.py
pynmea2.nmea_utils.DatetimeFix
class DatetimeFix(object): #pylint: disable=no-member @property def datetime(self): return datetime.datetime.combine(self.datestamp, self.timestamp)
class DatetimeFix(object): @property def datetime(self): pass
3
0
2
0
2
0
1
0.25
1
0
0
13
1
0
1
1
5
0
4
3
1
1
3
2
1
1
1
0
1
143,025
Knio/pynmea2
Knio_pynmea2/pynmea2/nmea_file.py
pynmea2.nmea_file.NMEAFile
class NMEAFile(object): """ Reads NMEA sentences from a file similar to a standard python file object. """ def __init__(self, f, *args, **kwargs): super(NMEAFile, self).__init__() if isinstance(f, basestring) or args or kwargs: self._file = self.open(f, *args, **kwargs) else: self._file = f self._context = None def open(self, fp, mode='r'): """ Open the NMEAFile. """ self._file = open(fp, mode=mode) return self._file def close(self): """ Close the NMEAFile. """ self._file.close() def __iter__(self): """ Iterate through the file yielding NMEASentences :return: """ for line in self._file: yield self.parse(line) def __enter__(self): if hasattr(self._file, '__enter__'): self._context = self._file.__enter__() return self def __exit__(self, exc_type, exc_val, exc_tb): if self._context: ctx = self._context self._context = None ctx.__exit__(exc_type, exc_val, exc_tb) def next(self): """ Iterate through the file object returning NMEASentence objects :return: NMEASentence """ data = self._file.readline() return self.parse(data) def parse(self, s): return NMEASentence.parse(s) def readline(self): """ Return the next NMEASentence in the file object :return: NMEASentence """ data = self._file.readline() s = self.parse(data) return s def read(self): """ Return a list of NMEASentence objects for each line in the file :return: list of NMEASentence objects """ return [s for s in self]
class NMEAFile(object): ''' Reads NMEA sentences from a file similar to a standard python file object. ''' def __init__(self, f, *args, **kwargs): pass def open(self, fp, mode='r'): ''' Open the NMEAFile. ''' pass def close(self): ''' Close the NMEAFile. ''' pass def __iter__(self): ''' Iterate through the file yielding NMEASentences :return: ''' pass def __enter__(self): pass def __exit__(self, exc_type, exc_val, exc_tb): pass def next(self): ''' Iterate through the file object returning NMEASentence objects :return: NMEASentence ''' pass def parse(self, s): pass def readline(self): ''' Return the next NMEASentence in the file object :return: NMEASentence ''' pass def readline(self): ''' Return a list of NMEASentence objects for each line in the file :return: list of NMEASentence objects ''' pass
11
7
6
0
4
2
1
0.69
1
2
1
0
10
2
10
10
71
10
36
18
25
25
35
18
24
2
1
1
14
143,026
Knio/pynmea2
Knio_pynmea2/pynmea2/nmea.py
pynmea2.nmea.TalkerSentence
class TalkerSentence(NMEASentence): sentence_types = {} def __init__(self, talker, sentence_type, data): self.talker = talker self.sentence_type = sentence_type self.data = list(data) def identifier(self): return '%s%s,' % (self.talker, self.sentence_type)
class TalkerSentence(NMEASentence): def __init__(self, talker, sentence_type, data): pass def identifier(self): pass
3
0
3
0
3
0
1
0
1
1
0
64
2
3
2
10
9
1
8
7
5
0
8
7
5
1
2
0
2
143,027
Knio/pynmea2
Knio_pynmea2/pynmea2/nmea.py
pynmea2.nmea.SentenceTypeError
class SentenceTypeError(ParseError): pass
class SentenceTypeError(ParseError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
12
2
0
2
1
1
0
2
1
1
0
5
0
0
143,028
Knio/pynmea2
Knio_pynmea2/pynmea2/nmea.py
pynmea2.nmea.QuerySentence
class QuerySentence(NMEASentence): sentence_types = {} def __init__(self, talker, listener, sentence_type): self.talker = talker self.listener = listener self.sentence_type = sentence_type self.data = [] def identifier(self): return '%s%sQ,%s' % (self.talker, self.listener, self.sentence_type)
class QuerySentence(NMEASentence): def __init__(self, talker, listener, sentence_type): pass def identifier(self): pass
3
0
4
0
4
0
1
0
1
0
0
0
2
4
2
10
10
1
9
8
6
0
9
8
6
1
2
0
2
143,029
Knio/pynmea2
Knio_pynmea2/pynmea2/nmea.py
pynmea2.nmea.ProprietarySentence
class ProprietarySentence(NMEASentence): sentence_types = {} def __init__(self, manufacturer, data): self.manufacturer = manufacturer self.data = list(data) def identifier(self): return 'P%s' % (self.manufacturer)
class ProprietarySentence(NMEASentence): def __init__(self, manufacturer, data): pass def identifier(self): pass
3
0
3
0
3
0
1
0
1
1
0
17
2
2
2
10
8
1
7
6
4
0
7
6
4
1
2
0
2
143,030
Knio/pynmea2
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Knio_pynmea2/test/test_proprietary.py
test_proprietary.test_proprietary_type.ABC
class ABC(pynmea2.ProprietarySentence): fields = ( ('Empty', '_'), ('First', 'a'), ('Second', 'b'), )
class ABC(pynmea2.ProprietarySentence): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
6
0
6
2
5
0
2
2
1
0
3
0
0
143,031
Knio/pynmea2
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Knio_pynmea2/pynmea2/nmea_utils.py
pynmea2.nmea_utils.timezone
class timezone(object): utc = UTC()
class timezone(object): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
2
0
2
2
1
0
2
2
1
0
1
0
0
143,032
Knio/pynmea2
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Knio_pynmea2/pynmea2/nmea_utils.py
pynmea2.nmea_utils.UTC
class UTC(datetime.tzinfo): def utcoffset(self, dt): return datetime.timedelta(0)
class UTC(datetime.tzinfo): def utcoffset(self, dt): pass
2
0
2
0
2
0
1
0
1
1
0
0
1
0
1
6
3
0
3
2
1
0
3
2
1
1
1
0
1
143,033
Knio/pynmea2
Knio_pynmea2/pynmea2/nmea.py
pynmea2.nmea.ParseError
class ParseError(ValueError): def __init__(self, message, data): super(ParseError, self).__init__((message, data))
class ParseError(ValueError): def __init__(self, message, data): pass
2
0
2
0
2
0
1
0
1
1
0
2
1
0
1
12
3
0
3
2
1
0
3
2
1
1
4
0
1
143,034
Knio/pynmea2
Knio_pynmea2/pynmea2/nmea.py
pynmea2.nmea.NMEASentenceType
class NMEASentenceType(type): sentence_types = {} def __init__(cls, name, bases, dct): type.__init__(cls, name, bases, dct) base = bases[0] if base is object: return base.sentence_types[name] = cls cls.name_to_idx = dict((f[1], i) for i, f in enumerate(cls.fields))
class NMEASentenceType(type): def __init__(cls, name, bases, dct): pass
2
0
7
0
7
0
2
0
1
2
0
0
1
0
1
14
9
0
9
4
7
0
9
4
7
2
2
1
2
143,035
Knio/pynmea2
Knio_pynmea2/pynmea2/nmea.py
pynmea2.nmea.ChecksumError
class ChecksumError(ParseError): pass
class ChecksumError(ParseError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
12
2
0
2
1
1
0
2
1
1
0
5
0
0
143,036
Knio/pynmea2
Knio_pynmea2/pynmea2/seatalk_utils.py
pynmea2.seatalk_utils.SeaTalk
class SeaTalk(object): '''Mixin to add Seatalk functionality. Based on Thomas knauf's work http://www.thomasknauf.de/seatalk.htm''' byte_to_command = { '00': 'Depth below transducer', '01': 'Equipment ID', '05': 'Engine RPM and PITCH', '10': 'Apparent Wind Angle', '11': 'Apparent Wind Speed', '20': 'Speed through water', '50': 'LAT position', '51': 'LON position', '52': 'Speed over Ground', '53': 'Course over Ground', '82': 'Target waypoint name', '84': 'Compass heading Autopilot course and Rudder position', '9C': 'Compass heading and Rudder position' } # pylint: disable=no-member @property def command_name(self): '''Get seatalk command's meaning''' return self.byte_to_command.get(self.cmd, 'Unknown Command')
class SeaTalk(object): '''Mixin to add Seatalk functionality. Based on Thomas knauf's work http://www.thomasknauf.de/seatalk.htm''' @property def command_name(self): '''Get seatalk command's meaning''' pass
3
2
3
0
2
1
1
0.21
1
0
0
1
1
0
1
1
24
1
19
4
16
4
4
3
2
1
1
0
1
143,037
Knio/pynmea2
Knio_pynmea2/pynmea2/stream.py
pynmea2.stream.NMEAStreamReader
class NMEAStreamReader(object): ''' Reads NMEA sentences from a stream. ''' def __init__(self, stream=None, errors='raise'): ''' Create NMEAStreamReader object. `stream`: file-like object to read from, can be omitted to pass data to `next` manually. must support `.readline()` which returns a string `errors`: behaviour when a parse error is encountered. can be one of: `'raise'` (default) raise an exception immediately `'yield'` yield the ParseError as an element in the stream, and continue reading at the next line `'ignore'` completely ignore and suppress the error, and continue reading at the next line ''' if errors not in ERRORS: raise ValueError('errors must be one of {!r} (was: {!r})' .format(ERRORS, errors)) self.errors = errors self.stream = stream self.buffer = '' def next(self, data=None): ''' consume `data` (if given, or calls `stream.read()` if `stream` was given in the constructor) and yield a list of `NMEASentence` objects parsed from the stream (may be empty) ''' if data is None: if self.stream: data = self.stream.readline() else: return lines = (self.buffer + data).split('\n') self.buffer = lines.pop() for line in lines: try: msg = nmea.NMEASentence.parse(line) yield msg except nmea.ParseError as e: if self.errors == 'raise': raise e if self.errors == 'yield': yield e if self.errors == 'ignore': pass __next__ = next def __iter__(self): ''' Support the iterator protocol. This allows NMEAStreamReader object to be used in a for loop. for batch in NMEAStreamReader(stream): for msg in batch: print msg ''' return self
class NMEAStreamReader(object): ''' Reads NMEA sentences from a stream. ''' def __init__(self, stream=None, errors='raise'): ''' Create NMEAStreamReader object. `stream`: file-like object to read from, can be omitted to pass data to `next` manually. must support `.readline()` which returns a string `errors`: behaviour when a parse error is encountered. can be one of: `'raise'` (default) raise an exception immediately `'yield'` yield the ParseError as an element in the stream, and continue reading at the next line `'ignore'` completely ignore and suppress the error, and continue reading at the next line ''' pass def next(self, data=None): ''' consume `data` (if given, or calls `stream.read()` if `stream` was given in the constructor) and yield a list of `NMEASentence` objects parsed from the stream (may be empty) ''' pass def __iter__(self): ''' Support the iterator protocol. This allows NMEAStreamReader object to be used in a for loop. for batch in NMEAStreamReader(stream): for msg in batch: print msg ''' pass
4
4
20
3
9
8
4
0.9
1
3
2
0
3
3
3
3
68
11
30
12
26
27
28
11
24
8
1
3
11
143,038
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/ash.py
pynmea2.types.proprietary.ash.ASHRATT
class ASHRATT(ASH): ''' RT300 proprietary attitude sentence ''' @staticmethod def match(data): return re.match(r'^\d{6}\.\d{2,3}$', data[1]) def __init__(self, *args, **kwargs): self.subtype = 'ATT' super(ASHRATT, self).__init__(*args, **kwargs) fields = ( ('R', '_r'), ('Timestamp', 'timestamp', timestamp), ('Heading Angle', 'true_heading', float), ('Is True Heading', 'is_true_heading'), ('Roll Angle', 'roll', float), ('Pitch Angle', 'pitch', float), ('Heave', 'heave', float), ('Roll Accuracy Estimate', 'roll_accuracy', float), ('Pitch Accuracy Estimate', 'pitch_accuracy', float), ('Heading Accuracy Estimate', 'heading_accuracy', float), ('Aiding Status', 'aiding_status', Decimal), ('IMU Status', 'imu_status', Decimal), )
class ASHRATT(ASH): ''' RT300 proprietary attitude sentence ''' @staticmethod def match(data): pass def __init__(self, *args, **kwargs): pass
4
1
3
0
3
0
1
0.14
1
1
0
0
1
1
2
13
26
2
21
6
17
3
7
5
4
1
4
0
2
143,039
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/ash.py
pynmea2.types.proprietary.ash.ASHRHPR
class ASHRHPR(ASH): ''' Ashtech HPR Message ''' fields = ( ('R', '_r'), ('Subtype', 'subtype'), ('Timestamp', 'timestamp', timestamp), ('Heading Angle', 'heading', Decimal), ('Pitch Angle', 'pitch', Decimal), ('Roll Angle', 'roll', Decimal), ('Carrier measurement RMS', 'carrier_rms', Decimal), ('Baseline measurement RMS', 'baseline_rms', Decimal), ('Integer Ambiguity', 'integer_ambiguity'), ('Mode', 'mode'), ('Status', 'status'), ('PDOP', 'pdop', float), )
class ASHRHPR(ASH): ''' Ashtech HPR Message ''' pass
1
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
11
18
0
15
2
14
3
2
2
1
0
4
0
0
143,040
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/kwd.py
pynmea2.types.proprietary.kwd.KWD
class KWD(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(KWD, cls).__new__(cls) def __init__(self, manufacturer, data): self.sentence_type = manufacturer + data[0] super(KWD, self).__init__(manufacturer, data)
class KWD(nmea.ProprietarySentence): def __new__(_cls, manufacturer, data): pass def __init__(self, manufacturer, data): pass
3
0
4
0
4
0
1
0
1
1
0
1
2
1
2
12
11
2
9
7
6
0
9
7
6
1
3
0
2
143,041
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/kwd.py
pynmea2.types.proprietary.kwd.KNSH
class KNSH(KNS, nmea_utils.LatLonFix, nmea_utils.DatetimeFix, nmea_utils.ValidStatusFix): """ $PKLSH,ddmm.mm,ns,dddmm.mm,ew,hhmmss,v,svid,*99 $PKNSH,4000.0000,N,13500.0000,E,021720,A,U00001,* ?? """ fields = ( ("Subtype", "subtype"), ("Latitude", "lat"), ("Latitude Direction", "lat_dir"), ("Longitude", "lon"), ("Longitude Direction", "lon_dir"), ("Time of Receipt", "timestamp", nmea_utils.timestamp), ("GPS Status (Void)","status"), ("Sender ID", "senderid"), )
class KNSH(KNS, nmea_utils.LatLonFix, nmea_utils.DatetimeFix, nmea_utils.ValidStatusFix): ''' $PKLSH,ddmm.mm,ns,dddmm.mm,ew,hhmmss,v,svid,*99 $PKNSH,4000.0000,N,13500.0000,E,021720,A,U00001,* ?? ''' pass
1
1
0
0
0
0
0
0.36
4
0
0
0
0
0
0
22
15
0
11
2
10
4
2
2
1
0
4
0
0
143,042
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/kwd.py
pynmea2.types.proprietary.kwd.KNS
class KNS(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(KNS, cls).__new__(cls) def __init__(self, manufacturer, data): self.sentence_type = manufacturer + data[0] super(KNS, self).__init__(manufacturer, data)
class KNS(nmea.ProprietarySentence): def __new__(_cls, manufacturer, data): pass def __init__(self, manufacturer, data): pass
3
0
4
0
4
0
1
0
1
1
0
1
2
1
2
12
11
2
9
7
6
0
9
7
6
1
3
0
2
143,043
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/kwd.py
pynmea2.types.proprietary.kwd.KNDS
class KNDS(KND, nmea_utils.LatLonFix, nmea_utils.DatetimeFix, nmea_utils.ValidStatusFix): """ $PKNDS,hhmmss,v,ddmm.mm,ns,dddmm.mm,ew,speed,course,ddmmyy,DD.dd,ewSV,svid,status,fut*99 $PKNDS,124640,A,4954.1458,N,11923.5992,W,000.0,000.0,120223,19.20,W00,U00002,207,00,*29 """ fields = ( ("Subtype", "subtype"), ("Time of Receipt", "timestamp", nmea_utils.timestamp), ("GPS Status (Void)","status"), ("Latitude", "lat"), ("Latitude Direction", "lat_dir"), ("Longitude", "lon"), ("Longitude Direction", "lon_dir"), ("Speed over Ground Knot", "sog", float), ("Course over Ground", "cog", float), ("Date", "datestamp", nmea_utils.datestamp), ("Magnetic variation", "declination", float), ("Declination Direction", "dec_dir"), ("Sender ID", "senderid"), ("Sender Status", "senderstatus", Decimal), ("Future Reserved", "future", Decimal), )
class KNDS(KND, nmea_utils.LatLonFix, nmea_utils.DatetimeFix, nmea_utils.ValidStatusFix): ''' $PKNDS,hhmmss,v,ddmm.mm,ns,dddmm.mm,ew,speed,course,ddmmyy,DD.dd,ewSV,svid,status,fut*99 $PKNDS,124640,A,4954.1458,N,11923.5992,W,000.0,000.0,120223,19.20,W00,U00002,207,00,*29 ''' pass
1
1
0
0
0
0
0
0.22
4
0
0
0
0
0
0
22
23
1
18
2
17
4
2
2
1
0
4
0
0
143,044
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/kwd.py
pynmea2.types.proprietary.kwd.KND
class KND(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(KND, cls).__new__(cls) def __init__(self, manufacturer, data): self.sentence_type = manufacturer + data[0] super(KND, self).__init__(manufacturer, data)
class KND(nmea.ProprietarySentence): def __new__(_cls, manufacturer, data): pass def __init__(self, manufacturer, data): pass
3
0
4
0
4
0
1
0
1
1
0
1
2
1
2
12
11
2
9
7
6
0
9
7
6
1
3
0
2
143,045
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/kwd.py
pynmea2.types.proprietary.kwd.KLSH
class KLSH(KLS, nmea_utils.LatLonFix, nmea_utils.DatetimeFix, nmea_utils.ValidStatusFix): """ $PKLSH,ddmm.mm,ns,dddmm.mm,ew,hhmmss,v,fleet,svid,*99 $PKLSH,4000.0000,N,13500.0000,E,021720,A,100,2000,* ?? """ fields = ( ("Subtype", "subtype"), ("Latitude", "lat"), ("Latitude Direction", "lat_dir"), ("Longitude", "lon"), ("Longitude Direction", "lon_dir"), ("Time of Receipt", "timestamp", nmea_utils.timestamp), ("GPS Status (Void)","status"), ("Fleet", "fleet", Decimal), ("Sender ID", "senderid"), )
class KLSH(KLS, nmea_utils.LatLonFix, nmea_utils.DatetimeFix, nmea_utils.ValidStatusFix): ''' $PKLSH,ddmm.mm,ns,dddmm.mm,ew,hhmmss,v,fleet,svid,*99 $PKLSH,4000.0000,N,13500.0000,E,021720,A,100,2000,* ?? ''' pass
1
1
0
0
0
0
0
0.33
4
0
0
0
0
0
0
22
16
0
12
2
11
4
2
2
1
0
4
0
0
143,046
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/kwd.py
pynmea2.types.proprietary.kwd.KLS
class KLS(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(KLS, cls).__new__(cls) def __init__(self, manufacturer, data): self.sentence_type = manufacturer + data[0] super(KLS, self).__init__(manufacturer, data)
class KLS(nmea.ProprietarySentence): def __new__(_cls, manufacturer, data): pass def __init__(self, manufacturer, data): pass
3
0
4
0
4
0
1
0
1
1
0
1
2
1
2
12
11
2
9
7
6
0
9
7
6
1
3
0
2
143,047
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/kwd.py
pynmea2.types.proprietary.kwd.KLDS
class KLDS(KLD, nmea_utils.LatLonFix, nmea_utils.DatetimeFix, nmea_utils.ValidStatusFix): """ $PKLDS,hhmmss,v,ddmm.mm,ns,dddmm.mm,ew,speed,course,ddmmyy,DD.dd,ewSV,fleet,svid,status,fut*99 $PKLDS,001235,A,3544.6650,N,13940.1900,E,015.0,038.8,110498,10.80,W00,100,2000,15,00,*?? """ fields = ( ("Subtype", "subtype"), ("Time of Receipt", "timestamp", nmea_utils.timestamp), ("GPS Status (Void)","status"), ("Latitude", "lat"), ("Latitude Direction", "lat_dir"), ("Longitude", "lon"), ("Longitude Direction", "lon_dir"), ("Speed over Ground Knot", "sog", float), ("Course over Ground", "cog", float), ("Date", "datestamp", nmea_utils.datestamp), ("Magnetic variation", "declination", float), ("Declination Direction", "dec_dir"), ("Fleet", "fleet", Decimal), ("Sender ID", "senderid"), ("Sender Status", "senderstatus", Decimal), ("Future Reserved", "future", Decimal), )
class KLDS(KLD, nmea_utils.LatLonFix, nmea_utils.DatetimeFix, nmea_utils.ValidStatusFix): ''' $PKLDS,hhmmss,v,ddmm.mm,ns,dddmm.mm,ew,speed,course,ddmmyy,DD.dd,ewSV,fleet,svid,status,fut*99 $PKLDS,001235,A,3544.6650,N,13940.1900,E,015.0,038.8,110498,10.80,W00,100,2000,15,00,*?? ''' pass
1
1
0
0
0
0
0
0.21
4
0
0
0
0
0
0
22
23
0
19
2
18
4
2
2
1
0
4
0
0