Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akhenakh/xpmetrics
Library to read X-Plane metrics sent over UDP in Go language
https://github.com/akhenakh/xpmetrics
Last synced: 24 days ago
JSON representation
Library to read X-Plane metrics sent over UDP in Go language
- Host: GitHub
- URL: https://github.com/akhenakh/xpmetrics
- Owner: akhenakh
- License: mit
- Created: 2017-05-01T01:26:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-01T21:24:37.000Z (over 7 years ago)
- Last Synced: 2024-06-20T10:08:02.177Z (5 months ago)
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# XPMetrics
Library to read X-Plane metrics sent over UDP.
Instantiate a `NewListener` and run `Start()` in its own goroutine
```
l, err := xpmetrics.NewListener("127.0.0.1:49012")
go l.Start()
```X-Plane send 6 float32 per metrics type (XPMsg)
```
v, ok := l.Data.Query(xpmetrics.LatLonAltMsg)
lat := v[0]
```Or use some helper functions
```
hdg, ok := l.Data.Compass()
```To activate UDP Data Output in X-Plane go to the settings | Data Output tabs | Check a line as Network via UDP.
On the same page on the right check send network data output and set the IP Address and Port of the listener.
## Moving Map
A simple moving map demo is located in `cmd/xpmap`.