Tessel GPS
Detect your global position.
Helps you figure out where you are– and where you're going!
- Up to 1.8m accuracy
- 66 search channels, 22 tracking channels, -165dBM sensitivity
- Max 10Hz update rate
For more info visit here.
How To Connect
Cylon.robot({ connections: { tessel: { adaptor: 'tessel', port: 'A' } }, devices: { gps: { driver: 'gps-a2235h' } }, });
How To Use
Example using a Direct Pin.
var Cylon = require('cylon'); Cylon.robot({ connections: { tessel: { adaptor: 'tessel', port: 'A' } }, devices: { gps: { driver: 'gps-a2235h' } }, work: function(my) { var satsInRange = 0; var satsFixed = 0; console.log('GPS module powered and ready. Waiting for satellites...'); my.gps.on('error', function (err) { console.log(err) }); // Emit coordinates when we get a coordinate fix my.gps.on('coordinates', function (coords) { console.log('Lat:', coords.lat, '\tLon:', coords.lon, '\tTimestamp:', coords.timestamp); }); // Emit altitude when we get an altitude fix my.gps.on('altitude', function (alt) { console.log('Got an altitude of', alt.alt, 'meters (timestamp: ' + alt.timestamp + ')'); }); // Emitted whenever satellites are in view my.gps.on('satellite-list-partial', function (data) { satsInRange = data.satsInView; console.log(satsInRange, 'satellites in range,', satsFixed, 'fixed.'); }); // Emitted when we have information about a fix on satellites my.gps.on('fix', function (data) { satsFixed = data.numSat; console.log(satsInRange, 'satellites in range,', satsFixed, 'fixed.'); }); } }).start();
Commands
gps.powerOff( callback() )
Turns the GPS chip off.
gps.powerOn( callback() )
Turns the GPS chip on.
gps.setCoordinateFormat( format, callback() )
Configure how the module reports latitude and longitude: options are 'deg-min-sec', 'deg-min-dec', and 'deg-dec'.
Events
'altitude'
Emitted when altitude data is available. Emitted in the form {altitude in meters, timestamp}.
'coordinates'
Emitted when coordinate data is available. Emitted in the form {latitude, longitude, timestamp}.
'error'
Emitted upon error.
'powerOff'
Emitted when the module has been powered off.
'powerOn'
Emitted when the module has been powered on.
'ready'
Emitted upon first successful communication between the Tessel and the module.
Also emits parsed NMEA objects by type:
'active-satellites'
NMEA GPGSA: GPS DOP and active satellites.
'fix'
NMEA GPGGA: Global positioning system fix data.
'nav-info'
NMEA GPRMC: Recommended minimum specific GPS/Transit data.
'satellite-list-partial'
NMEA GPGSV: GPS satellites in view.
'track-info'
NMEA GPVTG: Track made good and ground speed.