xplane_connect 1.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 50

XPlane Connect #

Library to get an easy stream of data about XPlane UDP protocol.

pub package

How to use #

In the XPlane configuration, on Data Output check 'Network via UDP' on the required o requires index. Configure data output

Then check 'Send nework data output', configure IP address and port of the dart/flutter client. Configure client

A simple dart usage example:

import 'package:xplane_connect/xplane_connect.dart';

void main() {
  var xPlaneData = XplaneConnect(49001);

  xPlaneData.stream.listen((data) {
    print('Aircraft pitch: ${data[17][0]}');
  });
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

[1.0.1] - 2020-04-23 #

Get the package functional

[1.0.0] - 2020-04-23 #

Initial release

example/lib/main.dart

import 'package:xplane_connect/xplane_connect.dart';

void main() {
  var xPlaneData = XplaneConnect(49001);

  xPlaneData.stream.listen((data) {
    print('Aircraft pitch:    ${data[17][0]}');
    print('Aircraft roll:     ${data[17][1]}');
    print('Aircraft heading:  ${data[17][3]}');
  });
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  xplane_connect: ^1.0.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:xplane_connect/xplane_connect.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
50
Learn more about scoring.

We analyzed this package on Jul 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14

Analysis suggestions

Package not compatible with runtime flutter-web on web

Because:

  • package:xplane_connect/xplane_connect.dart that imports:
  • package:xplane_connect/src/xplane_connect.dart that imports:
  • package:udp/udp.dart that imports:
  • package:udp/src/udp_port.dart that imports:
  • package:udp/src/udp_endpoint.dart that imports:
  • dart:io

Package not compatible with runtime js

Because:

  • package:xplane_connect/xplane_connect.dart that imports:
  • package:xplane_connect/src/xplane_connect.dart that imports:
  • package:udp/udp.dart that imports:
  • package:udp/src/udp_port.dart that imports:
  • package:udp/src/udp_endpoint.dart that imports:
  • dart:io

Health issues and suggestions

Document public APIs. (-1 points)

6 out of 6 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/src/xplane_connect.dart.

Run dartfmt to format lib/src/xplane_connect.dart.

Format lib/xplane_connect.dart.

Run dartfmt to format lib/xplane_connect.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
udp ^3.0.3 3.0.3
Dev dependencies
pedantic ^1.8.0
test ^1.6.0