/*
 * Copyright (C) 2022 Open Source Robotics Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
*/

syntax = "proto3";
package gz.msgs;
option java_package = "com.gz.msgs";
option java_outer_classname = "DVLVelocityTrackingProtos";

/// \ingroup gz.msgs
/// \interface DVLVelocityTracking
/// \brief Velocity tracking estimates from a Doppler Velocity Log sensor.
/// Doppler velocity logs are used by the maritime community to track the velocity
/// of a vessel with respect to some (reflecting) target.

import "gz/msgs/header.proto";
import "gz/msgs/dvl_beam_state.proto";
import "gz/msgs/dvl_tracking_target.proto";
import "gz/msgs/dvl_kinematic_estimate.proto";

message DVLVelocityTracking
{
  /// \brief Message header.
  Header header = 1;

  /// \brief DVL types.
  enum DVLType
  {
    /// \brief Unspecific DVL type.
    DVL_TYPE_UNSPECIFIED = 0;
    /// \brief Piston DVLs.
    DVL_TYPE_PISTON = 1;
    /// \brief Phased array DVLs.
    DVL_TYPE_PHASED_ARRAY = 2;
  };
  /// \brief Type of DVL.
  DVLType type = 2;

  /// \brief Locked on target.
  DVLTrackingTarget target = 3;

  /// \brief Estimated velocity of either target or sensor
  /// w.r.t. the specified frame, in meters per second.
  DVLKinematicEstimate velocity = 4;

  /// \brief Tracking beams' state.
  repeated DVLBeamState beams = 5;

  /// \brief Vendor-specific status (e.g. bitmask, error code).
  int32 status = 6;
}
