The Crew Telemetry
NPM module to read telemetry data from Ubisoft's The Crew
How To
First, make sure you follow the directions provided here.
If you don't do this, The Crew will not broadcast the data.
In the ‘my Documents\The Crew’ folder, create a file ExtraConfig.xml.
In this file add those lines
Then ```npm install crew-telemetry```
After that, you can access all the data as a Javascript object like so:
```javascript
//1337 is the default port. You can also do an array of multiple ports
var ct = require('crew-telemetry')(1337);
ct.on('data', function(data){
//do stuff
});
//you can also receive the raw Buffer, remote address information,
//and port and parse it with the parse method, or parse it yourself.
ct.on('message', function(msg, rInfo, port){
ct.parse(msg, rInfo, port);
});
ct.on('error' function(err){
//do stuff
});
Available Data
Property | Value | Unit |
---|---|---|
time | Incremented every packet sent. | N/A |
angularVelocity | Angular velocity [pitch, roll, yaw] | Radians per second |
orientation | Euleer angles [yaw, pitch, roll] | Radians |
velocity | Linear velocity [lateral, longitudinal, vertical] | Meters per second |
acceleration | Linear acceleration [lateral, longitudinal, vertical] | Meters per second² |
position | Position in world [x, y, z] | Meter times 65536 |
gameID | N/A |