UNPKG

signalk-racer

Version:

Signalk plugin to calculate values of interest to sail racers: such as Distance to Line; Next leg TWA.

75 lines (74 loc) 2.71 kB
{ "paths": { "/signalk/v1/api/vessels/self/navigation/racing/setStartLine": { "put": { "summary": "Set or Adjust Start Line End", "description": "Set or adjust the port/stb end of the line. Provide `end`, optionally `position`, `delta`, and/or `rotate`.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "end": { "type": "string", "enum": ["port", "stb"] },"position": { "oneOf": [ { "type": "string", "enum": ["bow"] }, { "type": "object", "properties": { "latitude": { "type": "number" }, "longitude": { "type": "number" } }, "required": ["latitude", "longitude"] } ], "description": "Either the string 'bow', or an object with latitude/longitude" }, "delta": { "type": "number", "description": "Distance in meters to move the end along line bearing" }, "rotate": { "type": "number", "description": "Angle in radians to rotate end around the opposite end" } }, "required": ["end"] } } } }, "responses": { "200": { "description": "Start line modified" } } } }, "/signalk/v1/api/vessels/self/navigation/racing/setStartTime": { "put": { "summary": "Set, Adjust or Command the Timer", "description": "Set start time or send commands to the timer ('start', 'reset', 'sync', or 'adjust').", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "command": { "type": "string", "enum": ["start", "reset", "sync", "adjust", "set"] }, "delta": { "type": "number", "description": "Time offset in seconds (for adjust)" }, "startTime": { "type": "string", "format": "date-time", "description": "ISO start time (for set)" } }, "required": ["command"] } } } }, "responses": { "200": { "description": "Timer command executed" } } } } } }