Skip to content

Commit

Permalink
Tidied mixed markup styles
Browse files Browse the repository at this point in the history
  • Loading branch information
howroyd committed Jan 29, 2024
1 parent a1dcd6f commit 02f8df8
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
pynmea2
=======
# pynmea2

`pynmea2` is a python library for the [NMEA 0183](http://en.wikipedia.org/wiki/NMEA_0183) protocol

`pynmea2` is based on [`pynmea`](https://code.google.com/p/pynmea/) by Becky Lewis

The `pynmea2` homepage is located at http://github.com/Knio/pynmea2
The `pynmea2` homepage is located at <http://github.com/Knio/pynmea2>

### Compatibility
## Compatibility

`pynmea2` is compatable with Python 2.7 and Python 3.4+

![Python version](https://img.shields.io/pypi/pyversions/pynmea2.svg?style=flat)
[![Build status](https://github.com/Knio/pynmea2/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/Knio/pynmea2/actions/workflows/ci.yml?query=branch%3Amaster+)
[![Coverage status](https://img.shields.io/coveralls/github/Knio/pynmea2/master.svg?style=flat)](https://coveralls.io/r/Knio/pynmea2?branch=master)

### Installation
## Installation

The recommended way to install `pynmea2` is with
[pip](http://pypi.python.org/pypi/pip/):

pip install pynmea2
```bash
pip install pynmea2
```

[![PyPI version](https://img.shields.io/pypi/v/pynmea2.svg?style=flat)](https://pypi.org/project/pynmea2/)
[![PyPI downloads](https://img.shields.io/pypi/dm/pynmea2.svg?style=flat)](https://pypi.org/project/pynmea2/)

Parsing
-------
## Parsing

You can parse individual NMEA sentences using the `parse(data, check=False)` function, which takes a string containing a
NMEA 0183 sentence and returns a `NMEASentence` object. Note that the leading '$' is optional and trailing whitespace is ignored when parsing a sentence.
Expand Down Expand Up @@ -91,8 +91,7 @@ For example, `latitude` and `longitude` properties exist as helpers to access th
"-19°29′02.7000″"
```

Generating
----------
## Generating

You can create a `NMEASentence` object by calling the constructor with talker, message type, and data fields:

Expand All @@ -101,17 +100,14 @@ You can create a `NMEASentence` object by calling the constructor with talker, m
>>> msg = pynmea2.GGA('GP', 'GGA', ('184353.07', '1929.045', 'S', '02410.506', 'E', '1', '04', '2.6', '100.00', 'M', '-33.9', 'M', '', '0000'))
```


and generate a NMEA string from a `NMEASentence` object:

```python
>>> str(msg)
'$GPGGA,184353.07,1929.045,S,02410.506,E,1,04,2.6,100.00,M,-33.9,M,,0000*6D'
```


File reading example
--------
## File reading example

See [examples/read_file.py](/examples/read_file.py)

Expand All @@ -129,9 +125,7 @@ for line in file.readlines():
continue
```


pySerial device example
---------
## `pySerial` device example

See [examples/read_serial.py](/examples/read_serial.py)

Expand Down

0 comments on commit 02f8df8

Please sign in to comment.