Skip to content

Commit

Permalink
Updated README instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamshapiro0 committed Oct 13, 2023
1 parent d329b25 commit 05c2d13
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@ FusionEngine message specification.

### Directory Structure
- `python/` - Python source files
- `bin/` - Analysis and processing tools
- [p1_display](bin/p1_display) - Generate HTML plots of vehicle trajectory, etc. (see also
`analyzer.py` below)
- [p1_extract](bin/p1_extract) - Extract FusionEngine message contents from a binary file containing mixed data
(e.g., interleaved RTCM and FusionEngine messages)
- [p1_print](bin/p1_print) - Print the contents of FusionEngine messages found in a binary file to the
console
- `examples/` - Python example applications
- [analyze_data.py](examples/analyze_data.py) - Generate HTML plots of vehicle trajectory, INS filter state, etc.
- [binary_message_decode.py](examples/binary_message_decode.py) - Decode and print FusionEngine messages contained
Expand Down Expand Up @@ -64,6 +57,14 @@ FusionEngine message specification.
- This class is used by the `bin/p1_display` application
- [file_reader.py](analysis/file_reader.py) - `FileReader` class, capable of loading and time-aligning
FusionEngine data captured in a `*.p1log` file
- `applications` - Applications and processing tools
- [p1_display](bin/p1_display) - Generate HTML plots of vehicle trajectory, etc. (runs `analyzer.py`)
- [p1_extract](bin/p1_extract) - Extract FusionEngine message contents from a binary file containing mixed data
(e.g., interleaved RTCM and FusionEngine messages)
- [p1_lband_extract](bin/p1_lband_extract) - Extract L-band data bits contained in a log of FusionEngine
`LBandFrameMessage`
- [p1_print](bin/p1_print) - Print the contents of FusionEngine messages found in a binary file to the
console
- `messages` - Python message definitions
- `parsers` - Message encoding and decoding support
- [decoder.py](parsers/decoder.py) - `FusionEngineDecoder` class, used to frame and parse incoming streaming
Expand All @@ -79,11 +80,10 @@ FusionEngine message specification.
1. Install Python (3.6 or later) and pip.
2. Install the `fusione-engine-client` module, including all analysis and data processing tools:
```bash
python3 -m pip install fusion-engine-client[all]
python3 -m pip install fusion-engine-client
```
- Note: If you wish to only install data parsing support, and do not want to install plotting and other requirements
used by the analysis tools in `bin/`, you may omit `[all]` and run `python3 -m pip install fusion-engine-client`
3. Run any of the applications in `bin/`. For example, to plot results from a `*.p1log` file from a Point One device:
3. Run any of the applications in the `applications/` directory. For example, to plot results from a `*.p1log` file from
a Point One device:
```bash
p1_display /path/to/log/file_or_directory
```
Expand All @@ -97,12 +97,13 @@ FusionEngine message specification.
```
3. Install the `fusione-engine-client` module, including all analysis and data processing tools:
```bash
python3 -m pip install -e /path/to/fusion-engine-client[all]
python3 -m pip install -e /path/to/fusion-engine-client
```
- Note the additional `-e` argument (optional), which tells `pip` to install `fusion-engine-client` as editable.
This means that it will reference the local directory instead of copying the source code. That way, if you update
the code (`git pull`), your Python installation will automatically use the new version.
4. Run any of the applications in `bin/`. For example, to plot results from a `*.p1log` file from a Point One device:
4. Run any of the applications in the `applications/` directory. For example, to plot results from a `*.p1log` file from
a Point One device:
```bash
p1_display /path/to/log/file_or_directory
```
Expand Down Expand Up @@ -138,20 +139,20 @@ Whenever possible, we strongly encourage the use of a Python [virtual environmen
The following will generate plots for a log with ID `c25445f4e60d441dbf4af8a3571352fa`.

```bash
> python3 bin/p1_display --mapbox-token MY_MAPBOX_TOKEN /path/to/c25445f4e60d441dbf4af8a3571352fa
> p1_display --mapbox-token MY_MAPBOX_TOKEN /path/to/c25445f4e60d441dbf4af8a3571352fa
```

Alternatively, you can search for a log by entering the first few characters of the ID. By default, logs are assumed to
be stored in the directory `/logs`.

```bash
> python3 bin/p1_display c2544
> p1_display c2544
```

Use the `--logs-base-dir` argument to search a directory other than `/logs`:

```bash
> python3 bin/p1_display --logs-base-dir /my/log/directory c2544
> p1_display --logs-base-dir /my/log/directory c2544
```

### Record Data Over TCP
Expand Down Expand Up @@ -268,11 +269,15 @@ virtual environment:
```bash
venv\Scripts\activate.bat
```
3. Install the pip requirements:
3. Install the library
```bash
pip install fusion-engine-client
```
or install the pip requirements if using a local copy of the repository:
```bash
pip install -r requirements.txt
```
4. Run any of the FusionEngine applications/scripts normally:
```bash
python3 bin/p1_display /path/to/log/directory
p1_display /path/to/log/directory
```

0 comments on commit 05c2d13

Please sign in to comment.