internal void SendCostMatrixCalculateMessage(
            [NotNull] SurveyFeatureDto[] dtos,
            [NotNull] IRacetrackSettingsSource settings)
        {
            var calculateMessage = new CostMatrixCalculateMessage
                                   {
                                       SurveyFeatureDtos = dtos,
                                       TurnRadiusForPort = settings.TurnRadiusForPort,
                                       TurnRadiusForStarboard = settings.TurnRadiusForStarboard,
                                       IsPortTurnAllowed = settings.IsPortTurnAllowed,
                                       IsStarboardTurnAllowed = settings.IsStarboardTurnAllowed
                                   };

            m_Bus.PublishAsync(calculateMessage);
        }
 private static bool IsValidCostMatrixCalculateMessage(
     CostMatrixCalculateMessage x,
     LineDto[] lineDtos,
     IRacetrackSettingsSource settings)
 {
     return x.LineDtos == lineDtos &&
            Math.Abs(x.TurnRadiusForPort - settings.TurnRadiusForPort) < Tolerance &&
            Math.Abs(x.TurnRadiusForStarboard - settings.TurnRadiusForStarboard) < Tolerance &&
            x.IsPortTurnAllowed == settings.IsPortTurnAllowed &&
            x.IsStarboardTurnAllowed == settings.IsStarboardTurnAllowed;
 }