Client library for The Water Linked Underwater GPS API
npm install --save @datafire/waterlinked
let waterlinked = require('@datafire/waterlinked').create();
.then(data => {
console.log(data);
});
API for the Water Linked Underwater GPS. For more details: http://www.waterlinked.com
Recommended approach for connecting to a Underwater GPS via the API is:
- If "GET /api/" times out, the Underwater GPS is not running (on this IP address)
- If "GET /api/" responds with 200 OK check that the api version returrned (eg "v1") is supported by the client (eg: also supports "v1").
- If the api version returned does not match what the client supports: give an error to the user and recommend upgrading. (Eg: response is "v2" while client only supports "v1")
- If "GET /api/" responds with 301 Moved permanently. "GET /api/v1/version" to check if the kit has a version earlier than 1.5.
- "GET /api/v1/version" will always respond with 200 OK on Underwater GPS earlier than 1.5 release.
Configuration API is is not considered stable and will potentially be changed
ApiVersion about
waterlinked.api.get(null, context)
This action has no parameters
- output WupdaterApiversion
Get about information
waterlinked.api.v1.about.get(null, context)
This action has no parameters
- output WaterlinkedAbout
Reset all settings on master electronics
waterlinked.api.v1.about.factoryreset.post(null, context)
This action has no parameters
Flash LED1 on master electronics
waterlinked.api.v1.about.led.get(null, context)
This action has no parameters
Output schema unknown
Get current IMU and GPS status
waterlinked.api.v1.about.status.get(null, context)
This action has no parameters
- output WaterlinkedStatus
Get board temperature
waterlinked.api.v1.about.temperature.get(null, context)
This action has no parameters
- output WaterlinkedTemperature
Get Antenna configuration
waterlinked.api.v1.config.antenna.get(null, context)
This action has no parameters
- output WaterlinkedAntenna_config
Modify Antenna configuration
waterlinked.api.v1.config.antenna.put({
"payload": {
"x": 0,
"y": 0,
"depth": 0,
"antenna_rotation": 0
}
}, context)
- input
object
- payload required ModifyAntennaConfigConfigPayload
Get generic configuration
waterlinked.api.v1.config.generic.get(null, context)
This action has no parameters
- output WaterlinkedConfiguration
Modify generic configuration
waterlinked.api.v1.config.generic.put({
"payload": {
"channel": 0,
"locator_type": "",
"gps": "",
"compass": "",
"static_lat": 0,
"static_lon": 0,
"static_orientation": 0
}
}, context)
- input
object
- payload required ModifyConfigPayload
Get IP configuration
waterlinked.api.v1.config.ip.get(null, context)
This action has no parameters
- output WaterlinkedIp_config
Modify IP configuration
waterlinked.api.v1.config.ip.put({
"payload": {
"address": "",
"gateway": "",
"prefix": 0,
"dns": "",
"dhcp": true
}
}, context)
- input
object
- payload required ModifyIPConfigPayload
(Re)Load current receiver settings and return them
waterlinked.api.v1.config.receivers.get(null, context)
This action has no parameters
Get receiver configuration by id
waterlinked.api.v1.config.receivers.ID.get({
"ID": 0
}, context)
- input
object
- ID required
integer
: Identifier
- ID required
- output WaterlinkedReceiver
Modify receiver configuration, does not apply the change until generic modify is called. Calling list will discard changes
waterlinked.api.v1.config.receivers.ID.put({
"ID": 0,
"payload": {
"id": 0,
"x": 0,
"y": 0,
"z": 0
}
}, context)
- input
object
- ID required
integer
: Identifier - payload required ModifyReceiverConfigPayload
- ID required
Output schema unknown
Get WIFI configuration
waterlinked.api.v1.config.wifi.get(null, context)
This action has no parameters
- output WaterlinkedWifi_config
Modify WIFI configuration
waterlinked.api.v1.config.wifi.put({
"payload": {
"ssid": "",
"password": "",
"mode": ""
}
}, context)
- input
object
- payload required ModifyWIFIConfigPayload
Set depth from external source. If Locator A1 is used, this is required to get a position
waterlinked.api.v1.external.depth.put({
"payload": {
"depth": 0,
"temp": 0
}
}, context)
- input
object
- payload required SetDepthExternalPayload
Get rotation and acceleration of vehicle Locator is mounted on which was previously set
waterlinked.api.v1.external.imu.get(null, context)
This action has no parameters
- output WlExternalVehicleImu
Set rotation and acceleration of vehicle Locator is mounted on. This is used to improve positioning of vehicle
waterlinked.api.v1.external.imu.put({
"payload": {
"pitch": 0,
"roll": 0,
"yaw": 0,
"x": 0,
"y": 0,
"z": 0
}
}, context)
- input
object
- payload required SetVehicleIMUExternalPayload
Set current global position of master electronics from external source. Values are only used if GPS mode is set to use external GPS
waterlinked.api.v1.external.master.put({
"payload": {
"lat": 0,
"lon": 0,
"orientation": 0
}
}, context)
- input
object
- payload required SetMasterExternalPayload
Get orientation of Vehicle/ROV/Locator set by SetOrientation
waterlinked.api.v1.external.orientation.get(null, context)
This action has no parameters
- output WlExternalLocatorOrientation
Set orientation/compass heading of Vehicle/ROV/Locator. This is used only for visualization in GUI
waterlinked.api.v1.external.orientation.put({
"payload": {
"orientation": 0
}
}, context)
- input
object
- payload required SetOrientationExternalPayload
Get IMU status and orientation
waterlinked.api.v1.imu.calibrate.get(null, context)
This action has no parameters
- output WaterlinkedImu
Start calibration
waterlinked.api.v1.imu.calibrate.post({
"payload": {
"action": ""
}
}, context)
- input
object
- payload required CalibrateImuPayload
Output schema unknown
Reset Gyro
waterlinked.api.v1.imu.resetgyros.post(null, context)
This action has no parameters
Output schema unknown
Set north point
waterlinked.api.v1.imu.setnorth.post({
"payload": {
"action": ""
}
}, context)
- input
object
- payload required SetNorthImuPayload
Output schema unknown
List all points of interest
waterlinked.api.v1.poi.get(null, context)
This action has no parameters
- output WaterlinkedPoiCollection
Create a new POI
waterlinked.api.v1.poi.post({
"payload": {
"name": "",
"lat": 0,
"lng": 0,
"depth": 0,
"icon": "",
"visible": true
}
}, context)
- input
object
- payload required CreatePoiPayload
Output schema unknown
Delete poi
waterlinked.api.v1.poi.ID.delete({
"ID": 0
}, context)
- input
object
- ID required
integer
- ID required
Output schema unknown
Get a POI
waterlinked.api.v1.poi.ID.get({
"ID": 0
}, context)
- input
object
- ID required
integer
- ID required
- output WaterlinkedPoi
Update poi
waterlinked.api.v1.poi.ID.patch({
"ID": 0,
"payload": {
"name": "",
"lat": 0,
"lng": 0,
"depth": 0,
"icon": "",
"visible": true
}
}, context)
- input
object
- ID required
integer
- payload required UpdatePoiPayload
- ID required
Output schema unknown
Get current Kalman filtered acoustic position relative to master acoustics. Expected update frequency: 4 Hz
waterlinked.api.v1.position.acoustic.filtered.get(null, context)
This action has no parameters
- output WaterlinkedAccousticPosition
Get current unfiltered acoustic position relative to master acoustics. Expected update frequency: 4 Hz
waterlinked.api.v1.position.acoustic.raw.get(null, context)
This action has no parameters
- output WaterlinkedAccousticPosition
Get current global position of locator. Locator position is calculated from the current acoustic position and the global position of the master electronics. Expected update frequency: 4 Hz
waterlinked.api.v1.position.global.get(null, context)
This action has no parameters
- output WlSatellitePosition
Get current global position of master electronics. Expected update frequency: 1 Hz
waterlinked.api.v1.position.master.get(null, context)
This action has no parameters
- output WlSatellitePosition
Get list of status reports from all status groups
waterlinked.api.v1.status_report.get(null, context)
This action has no parameters
- output WlStatusGroupCollection
[Deprecated] Get current list of messages
waterlinked.api.v1.warnings.get(null, context)
This action has no parameters
- output WlWarningCollection
- CalibrateImuPayload
object
: IMU calibration action- action required
string
(values: start, abort): IMU Calibration Action to use
- action required
- CreatePoiPayload
object
: A list of all POI- depth required
number
: Depth of POI - icon required
string
: Icon of POI - id
integer
: Unique POI id - lat required
number
: Latitude of POI - lng required
number
: Longitude of POI - name required
string
: Name of POI - visible required
boolean
: Visibility of POI
- depth required
- ModifyAntennaConfigConfigPayload
object
: Configuration parameters for antenna set up- antenna_rotation required
integer
: Configured rotation of antenna relative to forward arrow on topside housing. Clockwise is positive direction (degrees) - depth required
number
: Configured depth relative to surface (meter) - x required
number
: Configured f position relative to master electronics (meter) - y required
number
: Configured Y position relative to master electronics (meter)
- antenna_rotation required
- ModifyConfigPayload
object
: Configuration parameters- antenna_enabled
boolean
: Enable use of antenna - channel required
integer
: Channel to use - compass required
string
(values: onboard, static, external): Compass provider setting - environment
string
(values: reflective, openwater): [Deprecated] Environment setting - external_pps_enabled
boolean
: Enable external PPS input to master - gps required
string
(values: onboard, static, external): GPS provider setting - imu_vehicle_enabled
boolean
: [Deprecated] Enable IMU input from vehicle - locator_type required
string
(values: d1, a1, s2, p2, u1): Locator type in use - range_max_x
number
: [Deprecated] Max range (meters) - range_max_y
number
: [Deprecated] Max range (meters) - range_max_z
number
: [Deprecated] Max range (meters) - range_min_x
number
: [Deprecated] Max range (meters) - range_min_y
number
: [Deprecated] Max range (meters) - search_direction
number
: Direction of circular search area section - search_radius
number
: Radius of circular search area - search_sector
number
: Sector angle of circular search area - speed_of_sound
integer
: Speed of sound use by the system - static_lat required
number
: Latitude to use in static mode - static_lon required
number
: Longitude to use in static mode - static_orientation required
number
: Orientation/compass reading to use in static mode (degrees)
- antenna_enabled
- ModifyIPConfigPayload
object
: Configuration parameters- address required
string
: IP address to use - dhcp required
boolean
: DHCP to use - dns required
string
: DNS to use - gateway required
string
: Gateway to use - prefix required
integer
: Prefix to use
- address required
- ModifyReceiverConfigPayload
object
: A receiver configuration- id required
integer
: Unique receiver identifier - x required
number
: Configured X position relative to master electronics (meter) - y required
number
: Configured Y position relative to master electronics (meter) - z required
number
: Configured Z position relative to master electronics (meter)
- id required
- ModifyWIFIConfigPayload
object
: Configuration parameters- mode required
string
(values: ap, client): Which mode should the WiFi be in? - password required
string
: Password to use for WiFi in Client mode - ssid required
string
: WIFI SSID to use for WiFi in Client mode
- mode required
- SetDepthExternalPayload
object
: Current locator depth and temperature- depth required
number
: Curent depth (meter) - temp required
number
: Current water temperature (C)
- depth required
- SetMasterExternalPayload
object
: Global master position from external source- cog
number
: Course over ground (degrees). -1 means no data. - fix_quality
number
: Fix quality. 0 if no data. - hdop
number
: Horizontal dilution of precision. -1 means no data. - lat required
number
: Current Latitude - lon required
number
: Current Longitude - numsats
number
: Number of satellites. -1 means no data. - orientation required
number
: Current orientation/compass heading (degrees) - sog
number
: Speed over ground (km/h). -1 means no data.
- cog
- SetNorthImuPayload
object
: IMU set north- action required
string
(values: set, clear): IMU Set north action to use
- action required
- SetOrientationExternalPayload
object
: Set current compass heading of ROV/locator- orientation required
number
: Current orientation/compass heading (degrees). -1 means no orientation set
- orientation required
- SetVehicleIMUExternalPayload
object
: Set current rotation and acceleration of vehicle- pitch required
number
: Current pitch of vehicle(degrees). - roll required
number
: Current roll of vehicle(degrees). - x required
number
: Current acceleration in x-axis of vehicle. - y required
number
: Current acceleration in y-axis of vehicle. - yaw required
number
: Current yaw of vehicle(degrees). - z required
number
: Current acceleration in z-axis of vehicle.
- pitch required
- UpdatePoiPayload
object
: A list of all POI- depth required
number
: Depth of POI - icon required
string
: Icon of POI - id
integer
: Unique POI id - lat required
number
: Latitude of POI - lng required
number
: Longitude of POI - name required
string
: Name of POI - visible required
boolean
: Visibility of POI
- depth required
- Mediatype identifier: application/vnd.waterlinked.about+json; view=default
object
: About information (default view)- chipid required
string
: Chip identifier - variant required
string
: Software release variant - version required
string
: Detailed Web Server version string - version_short required
string
: Short Web Server version string
- chipid required
- Mediatype identifier: application/vnd.waterlinked.accoustic.position+json; view=default
object
: Current relative Locator position (default view)- position_valid required
boolean
: Is current position valid or not - receiver_distance required
array
: Measured distance to the locator for each receiver- items
number
- items
- receiver_nsd required
array
: Measured NSD for each receiver- items
number
- items
- receiver_rssi required
array
: Measured RSSI for each receiver- items
number
- items
- receiver_valid required
array
: Is signal valid or not for each receiver- items
number
- items
- std required
number
: Current acoustic position accuracy (meter) - x required
number
: Current acoustic x position relative to master electronics (meter) - y required
number
: Current acoustic y position relative to master electronics (meter) - z required
number
: Current acoustic z position (depth) relative to master electronics (meter)
- position_valid required
- Mediatype identifier: application/vnd.waterlinked.antenna_config+json; view=default
object
: Configuration parameters for antenna set up (default view)- antenna_rotation required
integer
: Configured rotation of antenna relative to forward arrow on topside housing. Clockwise is positive direction (degrees) - depth required
number
: Configured depth relative to surface (meter) - x required
number
: Configured f position relative to master electronics (meter) - y required
number
: Configured Y position relative to master electronics (meter)
- antenna_rotation required
- Mediatype identifier: application/vnd.waterlinked.configuration+json; view=default
object
: Configuration parameters (default view)- antenna_enabled
boolean
: Enable use of antenna - channel required
integer
: Channel to use - compass required
string
(values: onboard, static, external): Compass provider setting - environment
string
(values: reflective, openwater): [Deprecated] Environment setting - external_pps_enabled
boolean
: Enable external PPS input to master - gps required
string
(values: onboard, static, external): GPS provider setting - imu_vehicle_enabled
boolean
: [Deprecated] Enable IMU input from vehicle - locator_type required
string
(values: d1, a1, s2, p2, u1): Locator type in use - range_max_x
number
: [Deprecated] Max range (meters) - range_max_y
number
: [Deprecated] Max range (meters) - range_max_z
number
: [Deprecated] Max range (meters) - range_min_x
number
: [Deprecated] Max range (meters) - range_min_y
number
: [Deprecated] Max range (meters) - search_direction
number
: Direction of circular search area section - search_radius
number
: Radius of circular search area - search_sector
number
: Sector angle of circular search area - speed_of_sound
integer
: Speed of sound use by the system - static_lat required
number
: Latitude to use in static mode - static_lon required
number
: Longitude to use in static mode - static_orientation required
number
: Orientation/compass reading to use in static mode (degrees)
- antenna_enabled
- Mediatype identifier: application/vnd.waterlinked.imu+json; view=default
object
: IMU status and orientation information (default view)- pitch required
number
: Pitch - progress required
integer
: Calibration progress - roll required
number
: Roll - state required
integer
: IMU calibration state. 0=running, 1=calibrating - yaw required
number
: Yaw
- pitch required
- Mediatype identifier: application/vnd.waterlinked.ip_config+json; view=default
object
: Configuration parameters (default view)- address required
string
: IP address to use - dhcp required
boolean
: DHCP to use - dns required
string
: DNS to use - gateway required
string
: Gateway to use - prefix required
integer
: Prefix to use
- address required
- Mediatype identifier: application/vnd.waterlinked.operation_response+json; view=default
object
: Response from server on operations performed (default view)- error
string
: Error if it occurs - success required
boolean
: Status of operation
- error
- Mediatype identifier: application/vnd.waterlinked.poi+json; view=default
object
: A list of all POI (default view)- depth required
number
: Depth of POI - icon required
string
: Icon of POI - id
integer
: Unique POI id - lat required
number
: Latitude of POI - lng required
number
: Longitude of POI - name required
string
: Name of POI - visible required
boolean
: Visibility of POI
- depth required
- Mediatype identifier: application/vnd.waterlinked.poi+json; type=collection; view=default
array
: WaterlinkedPoiCollection is the media type for an array of WaterlinkedPoi (default view)- items WaterlinkedPoi
- Mediatype identifier: application/vnd.waterlinked.receiver+json; view=default
object
: A receiver configuration (default view)- id required
integer
: Unique receiver identifier - x required
number
: Configured X position relative to master electronics (meter) - y required
number
: Configured Y position relative to master electronics (meter) - z required
number
: Configured Z position relative to master electronics (meter)
- id required
- Mediatype identifier: application/vnd.waterlinked.receiver+json; type=collection; view=default
array
: WaterlinkedReceiverCollection is the media type for an array of WaterlinkedReceiver (default view)- items WaterlinkedReceiver
- Mediatype identifier: application/vnd.waterlinked.status+json; view=default
object
: Status information (default view)- battery required
integer
: Locator battery level in percent. -1 if not available or applicable - gps required
integer
: GPS lock status - imu required
integer
: IMU calibration status
- battery required
- Mediatype identifier: application/vnd.waterlinked.temperature+json; view=default
object
: Temperature information (default view)- board required
number
: Board temperature (C) - water required
number
: Water temperature (C)
- board required
- Mediatype identifier: application/vnd.waterlinked.wifi_config+json; view=default
object
: Configuration parameters (default view)- mode required
string
(values: ap, client): Which mode should the WiFi be in? - password required
string
: Password to use for WiFi in Client mode - ssid required
string
: WIFI SSID to use for WiFi in Client mode
- mode required
- Mediatype identifier: application/vnd.wl.external.locator.orientation+json; view=default
object
: Set current compass heading of ROV/locator (default view)- orientation required
number
: Current orientation/compass heading (degrees). -1 means no orientation set
- orientation required
- Mediatype identifier: application/vnd.wl.external.vehicle.imu+json; view=default
object
: Set current rotation and acceleration of vehicle (default view)- pitch required
number
: Current pitch of vehicle(degrees). - roll required
number
: Current roll of vehicle(degrees). - x required
number
: Current acceleration in x-axis of vehicle. - y required
number
: Current acceleration in y-axis of vehicle. - yaw required
number
: Current yaw of vehicle(degrees). - z required
number
: Current acceleration in z-axis of vehicle.
- pitch required
- Mediatype identifier: application/vnd.wl.satellite.position+json; view=default
object
: GPS and IMU position (default view)- cog required
number
: Course over ground (degrees). -1 means no data. - fix_quality required
number
: Fix quality. 0 if no data. - hdop required
number
: Horizontal dilution of precision. -1 means no data. - lat required
number
: Current Latitude - lon required
number
: Current Longitude - numsats required
number
: Number of satellites. -1 means no data. - orientation required
number
: Current orientation/compass heading (degrees). -1 means no data. - sog required
number
: Speed over ground (km/h). -1 means no data.
- cog required
- Mediatype identifier: application/vnd.wl.status.group+json; view=default
object
: Current status from one specific status group (default view)- error_ids required
array
: Identifiers for warnings/errors- items
string
- items
- message required
string
: Message - status required
string
(values: ok, warning, error): Status - status_group required
string
: Status group friendly name - status_group_id required
string
: Status group identifier
- error_ids required
- Mediatype identifier: application/vnd.wl.status.group+json; type=collection; view=default
array
: WlStatusGroupCollection is the media type for an array of WlStatusGroup (default view)- items WlStatusGroup
- Mediatype identifier: application/vnd.wl.warning+json; view=default
object
: Warning message (default view)- id required
string
: Identifier - message required
string
: Message - severity required
string
: Severity
- id required
- Mediatype identifier: application/vnd.wl.warning+json; type=collection; view=default
array
: WlWarningCollection is the media type for an array of WlWarning (default view)- items WlWarning
- Mediatype identifier: application/vnd.wupdater.apiversion; view=default
object
: Returns supported api versions (default view)- versions required
array
: Supported api versions- items
string
- items
- versions required
- Mediatype identifier: application/vnd.goa.error; view=default
object
: Error response media type (default view)- code
string
: an application-specific error code, expressed as a string value. - detail
string
: a human-readable explanation specific to this occurrence of the problem. - id
string
: a unique identifier for this particular occurrence of the problem. - meta
object
: a meta object containing non-standard meta-information about the error. - status
string
: the HTTP status code applicable to this problem, expressed as a string value.
- code