Skip to content

Commit

Permalink
README.rst edited online with Bitbucket
Browse files Browse the repository at this point in the history
  • Loading branch information
hleroy committed Aug 19, 2014
1 parent a383c40 commit 4be152c
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,47 @@ The book was later withdrawn from publication for security concerns (according t

PyTmgpm is provided for educational purposes only, in the hope that it will be useful to understand the principles of tide calculations. **It must not by used for navigation.**


Prerequisites
-------------

PyTmgpm was tested with Python 3.4 on Uubuntu 14.04. It should run fine with any Python 3.x flavors.


Usage
-----

Firt import tmgpm (make sure it's on your PYTHONPATH)

```
#!python
.. sourcecode:: python

import tmgpm

```
import tmgpm


You can create a Tmgpm object, then set the station and date

```
#!python
.. sourcecode:: python

tide = tmgpm.Tmgpm()
tide.set_station('CONCARNEAU')
tide.set_date(2014, 8, 15) # 15th August 2014
tide = tmgpm.Tmgpm()
tide.set_station('CONCARNEAU')
tide.set_date(2014, 8, 15) # 15th August 2014


```

Or you can create the object, set the station and date at the same time

```
#!python

tide = tmgpm.Tmgpm('CONCARNEAU', 2014, 8, 15)
.. sourcecode:: python

```
tide = tmgpm.Tmgpm('CONCARNEAU', 2014, 8, 15)


Calculate and print tide height at 09h30

```
#!python
.. sourcecode:: python

h = tide.height(9.5) # You must provide time with decimal minutes (e.g. 9.5 for 09h30)
print(h)
h = tide.height(9.5) # You must provide time with decimal minutes (e.g. 9.5 for 09h30)
print(h)


```

Copyright and license
---------------------
Expand Down

0 comments on commit 4be152c

Please sign in to comment.