-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e81e9fb
commit a55185b
Showing
3 changed files
with
64 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# EosLib Formats | ||
|
||
To avoid using strings in packet bodies, EosLib contains some pre-made data formats. Their contents are listed below. | ||
|
||
### `Position` Format | ||
|
||
| Field | Variable Type | Unit | | ||
|----------------------|------------------|-----------------| | ||
| GPS Time | datetime | datetime | | ||
| Latitude | float | decimal degrees | | ||
| Longitude | float | decimal degrees | | ||
| Altitude | float | feet | | ||
| Speed | float | miles/hour | | ||
| Number of Satellites | int | number | | ||
| Flight State | FlightState enum | N/A | | ||
|
||
The `FlightState` enum contains 5 possible states, `NOT_SET`, `UNKNOWN`, `ON_GROUND`, `ASCENT`, and `DESCENT`. Their | ||
use should be self-explanatory. | ||
|
||
`Position` objects also automatically set a `valid` field when initialized or decoded. The logic is still pretty primitive, but it's a | ||
good sanity check/first pass validity check. | ||
|
||
### `Telemetry` Format | ||
|
||
| Field | Variable Type | Unit | | ||
|-------------|---------------|----------| | ||
| Temperature | float | celsius | | ||
| Pressure | float | mbar | | ||
| Humidity | float | %RH | | ||
| X-Rotation | float | degrees | | ||
| Y-Rotation | float | degrees | | ||
| Z-Rotation | float | degrees | | ||
|
||
Likewise to `Position` objects, `TelemetryData` objects automatically set a `valid` field when decoded. The current state it's in is quite surface level and will need a better system in the future. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# EosLib Packet | ||
|
||
Each Packet is required to contain a `DataHeader`, which holds information about the source of the packet and | ||
information about what the body contains. Any Packet can also include a `TransmitHeader`, which holds information | ||
about the transmission of the packet, typically via radio. | ||
|
||
### `DataHeader` Contents | ||
|
||
| Field | Variable Type | Valid Range | Required? | | ||
|----------------------|-------------------------|------------------------------|-----------| | ||
| Packet Type | PacketType enum | Values in PacketType | Yes | | ||
| Packet Sender | PacketDevice enum | Values in Device | Yes | | ||
| Packet Priority | PacketPriority enum\*\* | Values in PacketPriority\*\* | Yes | | ||
| Packet Destination | PacketDevice enum | Values in Device | No | | ||
| Packet Generate Time | datetime | Any valid date | Yes\* | | ||
|
||
### `TransmitHeader` Contents | ||
|
||
| Field | Variable Type | Valid Range | Required? | | ||
|------------------------|---------------|----------------|-----------| | ||
| Packet Sequence Number | Int | 0-255 | Yes | | ||
| Packet Timestamp | datetime | Any valid date | Yes\* | | ||
|
||
\* If no Timestamp is provided, a default value of `datetime.now()` is provided. | ||
|
||
\*\* Packet Priority can be any integer value between 0-255, but sensible defaults are provided via the PacketPriority | ||
enum. Unless you have good reason to provide your own value, use on of the options given in the enum. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters