WebSocket API and vessel methodology

Weather Routing

Build and submit weather-aware voyage requests, understand the vessel-performance methodology, and validate vessel data visually.

Endpoint

wss://cm5crjt3wf.execute-api.ap-south-1.amazonaws.com/dev/

Request lifecycle

Connect
Submit request
Route computation
Completion envelope
Download and display result

How request identifiers work

Current implementation: request_id and correlation_id are two names for the same canonical server job identifier. At the worker boundary they must match. The job table is keyed by request_id, while result storage and support messages use correlation_id. client_request_id is separate and is owned by the calling application. The WebSocket submission layer uses it as an idempotency identifier: reuse it only when retrying the exact same payload. The downstream worker echoes it and stores it as result metadata, while the canonical job itself is keyed by request_id/correlation_id.
IdentifierWho owns itPurpose
request_idCanonical job identifierUsed for DynamoDB job state and returned as the same value as correlation_id in the current flow.
correlation_idServer/worker name for the canonical job identifierUsed in S3 result paths, completion/failure events and support diagnostics. It equals request_id.
client_request_idCalling applicationClient-generated idempotency identifier at the WebSocket submission layer. Reuse it only to retry the exact same payload; use a new value after changing any request field. It is echoed in events and result metadata.

Request and response JSON

Example input JSON
{
  "action": "submitRequest",
  "request_id": "b159821d-d823-4369-91fa-ea87dc6cfabb",
  "client_request_id": "browser-request-100",
  "payload": {
    "start": [
      0.0,
      0.0
    ],
    "end": [
      -36.0,
      0.0
    ],
    "waypoints": [],
    "start_ts": "2026-07-11 11:30:00",
    "earliest_ts": "2026-07-18 00:00:00",
    "latest_ts": "2026-07-21 00:00:00",
    "imo": 9999999,
    "objective": "min_cost",
    "use_arrival_window": true,
    "draft": 20.0,
    "bunker_price": 900.0,
    "market_hire": 30000.0,
    "vessel": {
      "vessel_type": "Tanker",
      "loa_m": 330.0,
      "lbp_m": 320.0,
      "beam_m": 60.0,
      "depth_m": 30.0,
      "displacement_t": 320000.0,
      "dwt_t": 280000.0,
      "gm_m": 4.5,
      "max_power_kw": 23000.0,
      "design_rpm": 74.0,
      "propulsive_efficiency": 0.7,
      "hull_degradation_percent": 8.0,
      "sea_trial_speed_kn": [
        8.0,
        10.0,
        12.0,
        14.0,
        15.0,
        16.0
      ],
      "sea_trial_power_kw": [
        2200.0,
        3900.0,
        6800.0,
        11500.0,
        15000.0,
        19500.0
      ],
      "sea_trial_rpm": [
        38.0,
        45.0,
        52.0,
        60.0,
        65.0,
        70.0
      ],
      "sfoc_load_percent": [
        40.0,
        60.0,
        75.0,
        90.0,
        100.0
      ],
      "sfoc_g_per_kwh": [
        188.0,
        176.0,
        169.0,
        170.0,
        175.0
      ],
      "natural_roll_period_s": null,
      "roll_damping_ratio": 0.06,
      "roll_excitation_gain": 1.0,
      "motion_position_from_midship_ratio": 0.45,
      "kyy_over_l": 0.25,
      "block_coefficient": null,
      "entrance_length_m": null,
      "superstructure_beam_m": 42.0,
      "superstructure_height_m": 16.0,
      "superstructure_length_m": 46.0
    },
    "constraints": {
      "min_speed": 10.0,
      "max_speed": 16.0,
      "max_wind": 30.0,
      "max_wave": 6.0,
      "max_swell": 6.0,
      "min_power": 2500.0,
      "max_power": 21000.0,
      "max_engine_load_fraction": 0.95,
      "min_rpm": 40.0,
      "max_rpm": 100.0,
      "max_roll_deg": 10.0,
      "max_pitch_deg": 4.0,
      "reject_synchronous_roll": true,
      "reject_parametric_roll": true,
      "low_risk_significant_wave_height_m": 0.75,
      "motion_screen_safety_factor": 2.0,
      "daily_consumption_enabled": false
    },
    "land_distance_threshold": 25.0,
    "avoid_eca": false
  }
}
Example downloaded output JSON
{ "schema_version": "1.2", "status": "completed", "elapsed_s": 4.123, "final_route": [ { "action": "sail", "start": {"lat": 0.0, "lon": 0.0}, "end": {"lat": -3.2259, "lon": -0.25}, "sog": 10.5, "stw": 10.88, "consumption_tons": 27.77, "rpm": 48.07, "total_power_kw": 7983.07, "weather": {"wind_speed_kn": 8.83, "significant_wave_height_m": 1.57}, "motion": {"roll_deg": 0.03, "pitch_deg": 0.60, "edge_feasible": true}, "power_breakdown": { "clean_calm_water_kw": 5170.32, "hull_degraded_calm_water_kw": 5583.95, "wind_added_kw": 332.85, "wave_and_swell_added_kw": 2066.28, "required_shaft_power_kw": 7983.07 } } ]
}

Request envelope and voyage fields

FieldType / UnitRequiredPossible values / defaultDescription
actionstringYessubmitRequestWebSocket action used to submit a new weather-routing job.
request_idstringYesAny non-empty string; UUID v4 is recommendedCanonical job identifier in the current flow. The worker normalizes it to the same value as correlation_id and uses it for job state, result storage and replay.
client_request_idstringRecommendedA unique client-generated value, such as browser-request-<timestamp>Idempotency identifier used by the WebSocket submission layer. Reuse it only for an exact retry of the same payload. Generate a new value whenever any request field changes.
payloadobjectYesJSON objectContains voyage, vessel, commercial and constraint inputs.
payload.startarray [lat, lon]YesLatitude -90..90; longitude normally -180..180Departure coordinate in decimal degrees, ordered latitude then longitude.
payload.endarray [lat, lon]YesLatitude -90..90; longitude normally -180..180Destination coordinate in decimal degrees, ordered latitude then longitude.
payload.waypointsarray of [lat, lon]NoDefault []Ordered mandatory intermediate coordinates. Omit the field or use an empty array when no waypoint is required.
payload.start_tsUTC datetime or epochYesYYYY-MM-DD HH:MM:SS or Unix secondsDeparture time. String parsing is strict and does not accept a trailing Z or timezone suffix.
payload.earliest_tsUTC datetime or epochNoDefault: start_tsEarliest acceptable arrival. Mainly relevant when use_arrival_window is true.
payload.latest_tsUTC datetime or epochNoDefault: start_ts + 15 daysLatest acceptable arrival. If earliest and latest are reversed, the routing code swaps them.
payload.imointegerNoNormally a valid 7-digit IMO numberOptional vessel metadata. The supplied worker and routing core do not use this field in route calculation.
payload.objectivestringNomin_cost (default), min_time, min_fuelSelects the economic objective. Unknown strings currently fall back to minimum-cost behaviour, so clients should send only the documented values.
payload.use_arrival_windowbooleanNofalse (default) or trueEnables arrival-window handling using earliest_ts and latest_ts.
payload.draftfloat, mNo (recommended)Default: vessel.draft_m, otherwise 16.0; must be positive and below vessel depthSelects the navigability graph/draft condition and is passed to the vessel model.
payload.bunker_pricefloat, currency/tNoDefault 500.0; use a finite non-negative valueFuel price used by min_cost and min_fuel. Use the same currency basis as market_hire.
payload.market_hirefloat, currency/dayNoDefault 25000.0; use a finite non-negative valueTime-related cost used by min_cost and min_time.
payload.vesselobjectYesSee Vessel fields belowRequired by the complete fuel, power and motion model.
payload.constraintsobjectNoDefault {}Operational and feasibility limits. Every documented constraint has a code default.
payload.land_distance_thresholdfloat, NMNoDefault 25.0; use ≥ 0Threshold used by waypoint-to-graph connection and near-land penalty logic. It is a routing preference/penalty input, not a guaranteed minimum clearance.
payload.avoid_ecabooleanNofalse (default) or trueWhen true, selects the ECA-aware prebuilt routing graph.
payload.stage1_speed_stepfloat, knNoDefault 1.0; must be > 0Speed-grid increment used by the coarse Stage-1 corridor search.
payload.stage2_speed_stepfloat, knNoDefault 0.5; must be > 0Speed-grid increment used by the refined Stage-2 search.
Legacy fields: the current routing core does not read payload.route_objective or payload.speed_range. Use payload.objective, constraints.min_speed, constraints.max_speed, payload.stage1_speed_step and payload.stage2_speed_step instead.

Vessel fields

The complete model requires vessel geometry, power/RPM calibration and SFOC data. Sea-trial and SFOC arrays are positional: values at the same index describe one calibrated operating point.

FieldType / UnitRequiredPossible values / defaultDescription
vessel.vessel_typestringNo (recommended)Tanker, Bulk Carrier/Bulk, Container/Container Ship, General CargoPreferred vessel category selector. Matching is case-insensitive.
vessel.extra_flagintegerNoDefault 0; legacy mapping: 0 Bulk Carrier, 1 Tanker, 2 Container, 3 General CargoLegacy fallback used only when vessel_type is absent. When vessel_type is supplied, this field does not select the model type.
vessel.loa_mfloat, mYesFinite value > 0Length overall.
vessel.lbp_mfloat, mNoDefault: loa_m; length_m is also accepted as an aliasLength used by the resistance model, normally length between perpendiculars.
vessel.beam_mfloat, mYesFinite value > 0Maximum vessel breadth.
vessel.depth_mfloat, mYesFinite value > 0; must exceed draftMoulded depth.
vessel.draft_mfloat, mNoUsed only when top-level payload.draft is omittedOptional vessel-level draft fallback.
vessel.displacement_tfloat, tConditionalFinite value > 0, or omit when a valid block coefficient is suppliedRequired unless block_coefficient is supplied. DWT is never substituted for displacement.
vessel.dwt_tfloat, tNoDefault 0.0; use ≥ 0Retained for compatibility/reporting only; it does not replace displacement.
vessel.gm_mfloat, mYesFinite value > 0Metacentric height used in roll-period and motion calculations.
vessel.max_power_kwfloat, kWConditionalFinite value > 0; mcr_power_kw is accepted as an aliasRequired propulsion MCR/maximum power basis.
vessel.design_rpmfloat, rpmYesFinite value > 0Reference design RPM.
vessel.propulsive_efficiencyfloatNoDefault 0.70; must be in (0, 1]Converts effective resistance power to required shaft power.
vessel.hull_degradation_percentfloat, %NoDefault: constraints.hull_degradation_percent, otherwise 0.0; must be ≥ 0Additional calm-water power allowance for hull/propeller condition.
vessel.operational_margin_percentfloat, %NoDefault: constraints.operational_margin_percent, otherwise 0.0Vessel-level margin added to calculated demand. This value takes precedence over the constraint-level fallback.
vessel.sea_trialarray of objectsConditionalAt least 3 records containing stw_kn, shaft_power_kw, rpmAlternative record-list form for the three sea-trial arrays below.
vessel.sea_trial_speed_knarray, knConditionalAt least 3 finite values, strictly increasingRequired with the paired power and RPM arrays when sea_trial is not supplied.
vessel.sea_trial_power_kwarray, kWConditionalSame length as speed array; at least 3 finite valuesPower values aligned positionally with sea-trial speed.
vessel.sea_trial_rpmarray, rpmConditionalSame length as speed array; at least 3 finite valuesRPM values aligned positionally with sea-trial speed.
vessel.sfoc_curvearray of objectsConditionalAt least 3 records containing load_percent and sfoc_g_kwhAlternative record-list form for the two SFOC arrays below.
vessel.sfoc_load_percentarray, %ConditionalAt least 3 finite values, strictly increasingEngine-load points required when sfoc_curve is not supplied.
vessel.sfoc_g_per_kwharray, g/kWhConditionalSame length as load array; at least 3 finite positive values recommendedSFOC values aligned positionally with load percentage.
vessel.natural_roll_period_sfloat or null, sNoPositive value, or null/blank to estimateWhen absent or non-positive, estimated as 0.86 × beam / √GM.
vessel.roll_damping_ratiofloat or nullNoValue in (0, 1); otherwise a vessel-type default is usedDimensionless roll damping ratio.
vessel.roll_excitation_gainfloatNoDefault 1.0; positive values recommendedMultiplier applied to calculated roll excitation.
vessel.motion_position_from_midship_ratiofloatNoDefault 0.45; must be in [0, 0.5]Longitudinal motion-evaluation position. The earlier documentation incorrectly showed a 0–1 range.
vessel.kyy_over_lfloatNoDefault 0.25; must be in [0.10, 0.50]Pitch radius-of-gyration ratio.
vessel.block_coefficientfloat or nullConditional0.40..0.98, or null when displacement is suppliedIf omitted, the model derives block coefficient from displacement, length, beam and draft; the resolved value must remain within the allowed range.
vessel.entrance_length_mfloat or null, mNoPositive value, or null to estimateWhen omitted, estimated from vessel type and constrained to approximately 10–30% of vessel length.
vessel.superstructure_beam_mfloat or null, mNoPositive value; default 0.70 × beamRepresentative exposed breadth used for wind resistance.
vessel.superstructure_height_mfloat or null, mNoPositive value; default 0.80 × depthRepresentative exposed height used for wind resistance.
vessel.superstructure_length_mfloat or null, mNoPositive value; default 0.14 × lengthRepresentative exposed length used for wind resistance.
Validation rules that commonly cause rejected requests: draft must be below depth; provide displacement or block coefficient; sea-trial speed/power/RPM inputs must contain at least three aligned points with strictly increasing speed; SFOC load/value inputs must contain at least three aligned points with strictly increasing load; DWT is not accepted as a substitute for displacement.

Constraint fields

FieldType / UnitRequiredPossible values / defaultDescription
constraints.min_speedfloat, knNoDefault 8.0; non-negative recommendedAuthoritative lower candidate SOG. This, not legacy speed_range.start, defines the routing speed grid.
constraints.max_speedfloat, knNoDefault 16.0; must be ≥ min_speedAuthoritative upper candidate SOG. Keep the requested speed range within the calibrated sea-trial range; the model marks an edge power-infeasible when calculated STW falls outside the sea-trial cache.
constraints.max_windfloat, knNoDefault 45.0; use ≥ 0Maximum permitted encountered wind speed.
constraints.max_wavefloat, mNoDefault 15.0; use ≥ 0Maximum permitted significant combined wave height.
constraints.max_swellfloat, mNoDefault 15.0; use ≥ 0Maximum permitted swell height.
constraints.min_powerfloat, kWNoDefault 0.0Minimum permitted required propulsion power.
constraints.max_powerfloat, kWNoDefault: vessel MCR/max_power_kwMaximum permitted required propulsion power.
constraints.max_engine_load_fractionfloatNoDefault 1.0; must be in (0, 1.25]Maximum engine load relative to the configured power basis.
constraints.min_rpmfloat, rpmNoDefault 0.0Minimum permitted calculated RPM.
constraints.max_rpmfloat, rpmNoDefault 1200.0; should be ≥ min_rpmMaximum permitted calculated RPM.
constraints.max_roll_degfloat, °NoDefault: disabled; if supplied, must be > 0Maximum accepted calculated roll amplitude.
constraints.max_pitch_degfloat, °NoDefault: disabled; if supplied, must be > 0Maximum accepted calculated pitch amplitude.
constraints.max_vertical_accel_gfloat, gNoDefault: disabled; if supplied, must be > 0Accepted vertical-acceleration limit passed to the motion constraint model.
constraints.max_vertical_motion_mfloat, mNoDefault: disabled; if supplied, must be > 0Accepted vertical-motion limit passed to the motion constraint model.
constraints.reject_synchronous_rollbooleanNofalse (default) or trueRejects combinations flagged for synchronous-roll risk.
constraints.reject_parametric_rollbooleanNofalse (default) or trueRejects combinations flagged for parametric-roll risk.
constraints.low_risk_significant_wave_height_mfloat, mNoDefault 0.75; non-negative recommendedBelow this height the model may use its low-risk motion screening path.
constraints.motion_screen_safety_factorfloatNoDefault 2.0; positive values recommendedSafety multiplier used during motion screening.
constraints.hull_degradation_percentfloat, %NoDefault 0.0; used only when vessel-level value is absentFallback hull-degradation allowance.
constraints.operational_margin_percentfloat, %NoDefault 0.0; used only when vessel-level value is absentFallback operating margin.
constraints.daily_consumption_enabledbooleanNofalse (default) or trueEnables daily fuel-consumption tracking and limit enforcement.
constraints.max_daily_consumptionfloat, t/dayConditionalDefault effectively unlimited (1e30); positive value when enabledMaximum daily fuel consumption when daily enforcement is enabled.
constraints.daily_consumption_penalty_lambdafloatNoDefault 0.0; use ≥ 0Optional soft penalty weight related to daily consumption.
constraints.daily_consumption_bucket_sizefloat, tNoDefault 2.0; positive value recommendedBucket size used by daily-consumption state tracking.
Advanced speed-policy fields

Stage-specific keys override the common key. When no stage-specific value is supplied, both stages inherit the common value.

FieldType / UnitRequiredPossible values / defaultDescription
constraints.max_speed_changefloat, knNoDefault 1.0; must be ≥ 0Common per-decision speed-change limit used by both stages unless a stage-specific value is supplied.
constraints.stage1_max_speed_changefloat, knNoDefault: common valueStage-1 override.
constraints.stage2_max_speed_changefloat, knNoDefault: common valueStage-2 override.
constraints.speed_decision_interval_nmfloat, NMNoDefault 300.0; must be ≥ 0Common minimum sailing distance between speed decisions.
constraints.stage1_speed_decision_interval_nmfloat, NMNoDefault: common valueStage-1 override.
constraints.stage2_speed_decision_interval_nmfloat, NMNoDefault: common valueStage-2 override.
constraints.stage2_speed_decision_relaxation_percentfloat, %NoDefault 10.0; must be in [0, 100]Allows a forward speed reduction slightly before the full Stage-2 decision interval.
constraints.minimum_economic_benefit_usdfloatNoDefault 150.0; must be ≥ 0Common immediate economic-benefit threshold for speed changes. Despite the legacy _usd name, use the same monetary unit as bunker_price and market_hire.
constraints.stage1_minimum_economic_benefit_usdfloatNoDefault: common valueStage-1 override.
constraints.stage2_minimum_economic_benefit_usdfloatNoDefault: common valueStage-2 override.
constraints.stage2_economic_speed_change_pruning_enabledbooleanNotrue (default) or falseWhen false, Stage 2 bypasses the immediate economic-pruning test while retaining the selected route objective.
constraints.prevent_immediate_speed_reversalbooleanNotrue (default) or falseCommon rule preventing an immediate increase/decrease reversal.
constraints.allow_emergency_speed_reductionbooleanNotrue (default) or falseAllows safety-driven reductions that would otherwise violate the ordinary speed-decision policy.
constraints.speed_policy_distance_bucket_nmfloat, NMNoDefault 50.0; must be ≥ 0Distance discretization used by the speed-policy state.
constraints.speed_reversal_interval_multiplierfloatNoDefault 2.0; must be ≥ 0Multiplier controlling how long the reversal restriction remains active.
constraints.one_speed_per_resistance_beaufortbooleanNofalse (default) or trueRestricts each resistance-Beaufort class to one selected speed. The legacy ..._bf alias is also accepted.
constraints.monotonic_speed_vs_resistance_beaufortbooleanNofalse (default) or trueRequires speed not to increase as the resistance-Beaufort class worsens. The legacy ..._bf alias is also accepted.
The routing module also contains internal graph-search, diagnostics, cache and animation controls. They are intentionally not presented as public client inputs because they are implementation tuning parameters rather than stable API contract fields.

Completion event

{ "type": "route.completed", "correlation_id": "7293d8ca-e49c-4e56-8cf3-dd00d6a16bb1", "client_request_id": "browser-request-100", "status": "COMPLETED", "result_status": "completed", "result_url": "https://temporary-signed-result-url", "result_url_expires_in_sec": 900, "next_action": "OPEN_RESULT_URL"
}

The URL is temporary and should be opened or downloaded promptly. Treat it as confidential.

Sample downloaded result

{ "schema_version": "1.2", "environment": "dev", "resource_environment": "dev", "correlation_id": "7293d8ca-e49c-4e56-8cf3-dd00d6a16bb1", "request_id": "7293d8ca-e49c-4e56-8cf3-dd00d6a16bb1", "client_request_id": "browser-request-100", "status": "completed", "generated_at": "2026-07-27T04:23:30.831795+00:00", "elapsed_s": 4.123, "final_route": [ { "action": "sail", "start": { "lat": 0.0, "lon": 0.0 }, "end": { "lat": -3.2259, "lon": -0.25 }, "sog": 10.5, "stw": 10.88, "consumption_tons": 27.77, "time_hours": 18.5, "time": "2026-07-11 11:30:00 UTC", "distance_nm": 194.26, "weather": { "wind_speed_kn": 8.83, "wind_from_deg": 157.14, "significant_wave_height_m": 1.57, "significant_wave_from_deg": 203.49, "current_speed_kn": 0.7, "current_to_deg": 305.14, "swell_wave_height_m": 1.32, "swell_wave_from_deg": 205.03, "wind_wave_height_m": 0.79, "wind_wave_from_deg": 163.18, "wind_wave_period_s": 6.61, "swell_wave_period_s": 12.86 }, "rpm": 48.07, "power": 7983.07, "total_power_kw": 7983.07, "motion": { "roll_deg": 0.03, "pitch_deg": 0.6, "vertical_motion_m": 1.6, "vertical_acceleration_g": 0.18, "synchronous_roll_risk": false, "parametric_roll_risk": false, "calculation_mode": 1, "power_feasible": true, "motion_feasible": true, "edge_feasible": true }, "power_breakdown": { "clean_calm_water_kw": 5170.32, "hull_degraded_calm_water_kw": 5583.95, "wind_added_kw": 332.85, "wave_and_swell_added_kw": 2066.28, "required_shaft_power_kw": 7983.07 } } ]
}

Result document fields

FieldType / UnitDescription
schema_versionstringVersion of the downloadable result schema.
environmentstringExecution mode that produced the result, such as local, dev, or prod.
resource_environmentstringAWS resource environment used for processing.
correlation_idstringCanonical route-job identifier used for result storage and diagnostics. It equals request_id in the current implementation.
request_idstringJob-table identifier. The worker requires it to match correlation_id.
client_request_idstringOptional client-owned reference echoed for UI/workflow reconciliation; not the server idempotency or storage key.
user_idintegerAccount identifier associated with the request.
service_idintegerService identifier used for subscription and quota processing.
statusstringOverall route-result status, such as completed or no_feasible_route.
generated_atISO 8601 datetimeUTC timestamp when the result document was generated.
elapsed_sfloat, sTotal route-processing elapsed time.
final_routearrayOrdered sailing segments forming the optimized route.
request_payloadobjectOriginal submitted routing payload when returned by the selected environment.

Route segment fields

FieldType / UnitDescription
actionstringSegment action, normally sail.
start.lat / start.lonfloat, °Segment start position.
end.lat / end.lonfloat, °Segment end position.
sogfloat, knSpeed over ground after accounting for current.
stwfloat, knSpeed through water used for propulsion and resistance calculations.
consumption_tonsfloat, tEstimated fuel consumed over the segment.
time_hoursfloat, hEstimated sailing duration for the segment.
timeUTC datetimeSegment departure or evaluation timestamp.
distance_nmfloat, NMGreat-circle or route-edge distance represented by the segment.
rpmfloat, rpmCalculated propulsion RPM.
powerfloat, kWCalculated required propulsion power.
total_power_kwfloat, kWTotal required shaft power; retained explicitly in the result schema.

Weather fields

FieldType / UnitDescription
weather.wind_speed_knfloat, knEncountered wind speed.
weather.wind_from_degfloat, ° trueDirection from which the wind is blowing.
weather.significant_wave_height_mfloat, mCombined significant wave height.
weather.significant_wave_from_degfloat, ° trueDirection from which the significant wave system arrives.
weather.current_speed_knfloat, knSurface-current speed.
weather.current_to_degfloat, ° trueDirection toward which the current flows.
weather.swell_wave_height_mfloat, mSignificant swell height.
weather.swell_wave_from_degfloat, ° trueDirection from which swell arrives.
weather.wind_wave_height_mfloat, mSignificant wind-wave height.
weather.wind_wave_from_degfloat, ° trueDirection from which wind waves arrive.
weather.wind_wave_period_sfloat, sRepresentative wind-wave period.
weather.swell_wave_period_sfloat, sRepresentative swell period.

Motion and feasibility fields

FieldType / UnitDescription
motion.roll_degfloat, °Calculated roll amplitude.
motion.pitch_degfloat, °Calculated pitch amplitude.
motion.vertical_motion_mfloat, mCalculated vertical displacement at the configured motion position.
motion.vertical_acceleration_gfloat, gCalculated vertical acceleration expressed in gravitational units.
motion.synchronous_roll_riskbooleanWhether the segment is flagged for synchronous-roll risk.
motion.parametric_roll_riskbooleanWhether the segment is flagged for parametric-roll risk.
motion.calculation_modeintegerMotion-model mode used for the calculation.
motion.power_feasiblebooleanWhether required power satisfies the configured limits.
motion.motion_feasiblebooleanWhether calculated vessel motion satisfies the configured limits.
motion.edge_feasiblebooleanCombined feasibility flag for the route segment.
Important: a segment with edge_feasible: false does not satisfy all configured feasibility checks. Client applications should not interpret every returned segment as operationally acceptable without considering the result status and feasibility flags.

Power-breakdown fields

FieldType / UnitDescription
power_breakdown.clean_calm_water_kwfloat, kWBaseline clean-hull calm-water power.
power_breakdown.hull_degraded_calm_water_kwfloat, kWCalm-water power after applying hull degradation.
power_breakdown.wind_added_kwfloat, kWPower added or reduced by wind resistance; may be negative with strongly assisting wind.
power_breakdown.wave_and_swell_added_kwfloat, kWAdditional power attributed to waves and swell.
power_breakdown.required_shaft_power_kwfloat, kWFinal required shaft power for the segment.

No feasible route

A request may finish processing without producing an acceptable route. In that case the completion event uses status: COMPLETED with result_status: no_feasible_route. Display the returned message and failure code to the user rather than treating it as a network failure.

Failure event

{ "type": "route.failed", "correlation_id": "server-correlation-id", "client_request_id": "browser-request-100", "status": "FAILED_FINAL", "failure_code": "ROUTE_PROCESSING_FAILED", "message": "The route could not be completed.", "next_action": "CONTACT_SUPPORT"
}

Integration guidance

  • Generate a fresh UUID-style request_id for each genuinely new route and persist the request_id/correlation_id returned by the service.
  • Treat client_request_id as the submission idempotency key. Reuse it only for an exact retry of the same payload; generate a new value after changing any field.
  • Use constraints.min_speed and constraints.max_speed as the authoritative speed range; do not rely on the legacy speed_range object.
  • Validate vessel geometry, paired sea-trial arrays and paired SFOC arrays before submission.
  • Use UTC consistently and send timestamp strings as YYYY-MM-DD HH:MM:SS.
  • Download the result before the presigned URL expires and handle duplicate completion events idempotently using the canonical request/correlation identifier.

Interactive request builder

Complete the sections below. The request preview updates automatically. Request identifiers are generated when the page loads, but remain editable.

Connection and request identifiers
Canonical job ID; use a new UUID for a new route.
Client idempotency key; generate a new value whenever the payload changes.
Voyage and commercial inputs

Start coordinate

End coordinate

Waypoints

Add optional intermediate coordinates in sailing order.

LatitudeLongitude
Sent as YYYY-MM-DD HH:mm:ss.
Used when arrival window is enabled.
Used when arrival window is enabled.
Vessel particulars and propulsion
Performance and fuel curves

Sea-trial curve

Each row represents one aligned operating point.

Speed (kn)Power (kW)RPM

SFOC curve

Pair each engine-load point with its SFOC value.

Engine load (%)SFOC (g/kWh)
Motion, geometry, and model controls
Operational constraints
Generated request
Browser WebSocket clients cannot set arbitrary HTTP headers. The query-parameter name must match your API Gateway authorizer configuration.
Two-step result retrieval: when processing finishes, the WebSocket sends a route.completed envelope containing result_url, its expiry duration and checksum metadata. The browser immediately fetches that signed URL, parses the downloaded route document, shows it in the scrollable JSON viewer and plots the ordered final_route segments on the map. A typical URL is valid for 900 seconds. If it expires, the client must request a fresh result link or resubmit through the supported workflow.
Route map

A completion event contains a temporary result_url, not the full route. The browser automatically downloads the route JSON from that URL and then plots final_route. The standard link is valid for 900 seconds (15 minutes); download it promptly.

Waiting for a completion event.
Submit a request to display the optimized route.
Result JSON
No result received yet.

Keep the WebSocket connection available for completion or failure events. Persist both request identifiers so results can be matched even when multiple requests are active.

Vessel-performance methodology

Vessel Power, Fuel and Motion Model

A route is evaluated in a clear physical sequence: first determine how fast the vessel moves through the surrounding water, then estimate the forces opposing that motion, determine the propulsion power needed to overcome those forces, convert that power into fuel consumption, and finally check vessel motion and operational feasibility.

The complete calculation flow

1Find STWSeparate vessel motion from ocean-current motion.
2Estimate resistanceFind the forces trying to slow the vessel.
3Calculate powerDetermine the shaft power needed to overcome resistance.
4Estimate fuelConvert power and operating duration into fuel used.
5Check motionEstimate roll, pitch, heave and acceleration.
6Decide feasibilityAccept or reject the route segment against limits.
Why the order matters: fuel use cannot be understood from vessel speed alone. Current changes the speed through water, weather changes resistance, resistance changes required power, and required power changes fuel consumption.

1. Speed Through Water (STW)

What is the difference between SOG and STW?

Speed Over Ground (SOG) is the vessel's progress across the earth. Speed Through Water (STW) is the speed of the hull relative to the surrounding water. A favourable current can make SOG higher than STW; an opposing current can make SOG lower than STW.

STW is the important value for resistance and propulsion because the hull and propeller interact with water, not with the seabed.

STW and through-water heading = F(SOG, course over ground, current speed, current TO direction)

Earth-referenced directions

N / 000°E / 090°S / 180°W / 270° Vessel heading: 000° true Wind FROM 055° Wind wave FROM 125° Swell FROM 235° Current TO 125° Encounter angle

Wind, waves and swell use a FROM direction: the direction they arrive from. Current uses a TO direction: the direction the water flows toward.

SOG, current and STW vector relationship

NorthEast Ground motion: SOG and course Current motion Water-relative motion: STW Simple interpretationVessel motion through water= ground motion minusthe motion of the current

The resulting vector provides both STW and the direction in which the vessel moves through the water. Cross-current is therefore handled correctly, rather than being treated as a simple speed addition or subtraction.

2. Resistance — what tries to slow the vessel

Resistance is the total opposing force the propulsion system must overcome to maintain a chosen speed. Think of it as the marine equivalent of drag on a road vehicle, but with several additional contributors from water, wind, waves and hull condition.

Calm-water resistance

The basic resistance created as the hull pushes water aside and water flows along the hull.

Hull-condition effect

Fouling and surface roughness increase friction, so more effort is needed at the same STW.

Wind resistance

Wind acting on the exposed hull and superstructure can oppose or assist the vessel.

Wind-wave resistance

Locally generated waves create added resistance and vessel motion.

Swell resistance

Longer-period waves from distant weather systems can affect resistance and motion differently from local wind waves.

Water resistanceWindWind waves and swellMotion-related resistanceTotal resistance = F(STW, hull condition, vessel geometry, wind, wind waves, swell and encounter directions)

3. Power required to move the vessel

Resistance is a force. The propulsion system must supply enough shaft power to overcome that force at the selected STW. Higher resistance or higher speed generally requires more power.

Required shaft power = F(calm-water demand, hull condition, wind contribution, wind-wave contribution, swell contribution, propulsion efficiency, operational margin)
Clean calm-water powerThe vessel-specific baseline power at the selected STW.
+
Hull-condition allowanceAdditional power associated with fouling or surface condition.
+
Weather-added powerPower needed because of wind, wind waves and swell.
+
Operational marginAn optional planning allowance applied to the combined demand.
=
Required shaft powerThe power the propulsion system must deliver.
A following wind or favourable sea condition can reduce an environmental contribution, but the final power is still checked against vessel and engine limits.

4. From power to fuel consumption

Once required shaft power is known, the model determines how heavily the engine is operating. The engine's fuel-efficiency reference indicates how much fuel is needed to produce each unit of propulsion energy at that load.

Required powerPower needed for the route segment.
Engine loadRequired power compared with rated power.
Fuel efficiencyFuel required per unit of generated energy at that load.
Operating durationHow long the vessel remains at this condition.
Fuel consumedTotal tonnes used over the segment.
Engine load = F(required shaft power, maximum continuous rating)
Fuel efficiency = F(engine load, vessel engine reference)
Fuel consumed = F(required shaft power, fuel efficiency, segment duration)

RPM is estimated from the vessel's operating reference at the selected STW so the reported speed, power, RPM and fuel values describe a consistent operating point.

5. Roll, pitch, heave and vertical acceleration

Weather does more than increase fuel use. Waves also move the vessel. The model estimates the main motions that can affect safety, cargo, equipment and comfort.

Understanding vessel motion

Roll: side-to-side rotationPitch: bow-up and bow-down rotationHeave: vertical movement

What controls the response?

Encounter directionHead seas tend to increase pitch; beam seas tend to increase roll.
Wave heightLarger waves generally produce larger forces and motions.
Wave periodThe timing between waves can approach the vessel's natural motion periods.
Vessel geometry and loadingLength, beam, draft, displacement and stability influence the response.
Vessel speedSpeed changes how frequently the vessel encounters successive waves.
Roll, pitch, heave and acceleration = F(STW, through-water heading, wave height, wave period, wave FROM direction, vessel geometry, loading and stability)

6. Operational feasibility

A route segment is accepted only when the propulsion demand and vessel motion remain within the submitted operational limits.

Power check

Can the engine provide the required shaft power without exceeding the permitted load?

RPM check

Does the operating point remain within the permitted RPM range?

Motion check

Are roll, pitch, vertical movement and acceleration within the selected limits?

Risk check

Are synchronous-roll or parametric-roll relationships absent or permitted?

Route-segment feasibility = F(power status, RPM status, motion status, risk flags and operational constraints)

Weather inputs and direction conventions

Weather valueUnitDirection conventionHow it is used
Wind speed and directionkn and degrees trueFROMApparent wind and aerodynamic contribution.
Significant wave height and directionm and degrees trueFROMOverall sea-state reporting and screening.
Current speed and directionkn and degrees trueTOSOG-to-STW vector resolution.
Swell height, direction and periodm, degrees true and sFROMSwell resistance and motion response.
Wind-wave height, direction and periodm, degrees true and sFROMLocal-wave resistance and motion response.
Avoid double counting: significant wave height describes the combined sea state. Wind-wave and swell partitions are evaluated separately for detailed resistance and motion effects; significant wave height is not added as a third independent wave system.

How to read the returned results

Navigation

SOG, STW, course, through-water heading, segment distance and duration.

Power

Calm-water baseline, hull-condition contribution, wind contribution, wave and swell contribution, and required shaft power.

Engine and fuel

RPM, engine load, fuel efficiency and segment fuel consumption.

Motion

Roll, pitch, vertical movement, vertical acceleration and risk indicators.

Feasibility

Power, motion and overall route-segment feasibility flags.

Proprietary-use disclaimer. The vessel model, methodology, diagrams, response structure and explanatory material are proprietary to Blue Green Intelligence and may not be reproduced or used to recreate a competing implementation without written authorization.
Interactive visualisation

Vessel Model Playground

Enter vessel particulars and performance curves to see the vessel outline and charts respond immediately. This playground is a visual data-quality aid; it does not reproduce the production routing calculation.

Vessel geometry

Responsive vessel outline

Sea-trial and fuel curves

Sea-trial performance

Add or remove aligned speed, power, RPM, and consumption points.

Speed (kn)Power (kW)RPMConsumption (t/day)

SFOC curve

Enter engine load and matching SFOC values.

Engine load (%)SFOC (g/kWh)
Curves update as values change.

Speed vs Power

Speed vs RPM

Speed vs Consumption

Load vs SFOC

Hull condition and 360° Beaufort simulation
21 kn
3.0 m
8.0 s
Select a Beaufort number and run the simulation. The service evaluates wind and waves approaching from every degree while the vessel heads north. The selected Beaufort wind speed and wave height are shown above.

Total Weather Resistance

Combined added resistance from wind, wind waves and swell.

Weather Power

Power added by wind, wind waves and swell, separate from calm-water demand.

Total Power

Required shaft power after calm-water demand, hull condition, weather and operational margin.

Total Consumption

Estimated daily fuel consumption at the resulting total power and engine load.

Directional convention: the vessel heading is fixed at 000° true. Wind and waves are evaluated as FROM directions from 0° through 359°. The selected Beaufort row supplies representative maximum wind speed and wave height; the API also applies a documented representative wave period for the selected sea state.