From 8c0e400c8517c2a79c9bc849e3ab07163c643603 Mon Sep 17 00:00:00 2001
From: Arjo Chakravarty <arjoc@intrinsic.ai>
Date: Tue, 9 May 2023 06:46:10 +0000
Subject: [PATCH] Address PR feedback

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
---
 include/gz/msgs/Utility.hh | 2 +-
 src/Utility.cc             | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/gz/msgs/Utility.hh b/include/gz/msgs/Utility.hh
index cdc1d030..fd8ebc32 100644
--- a/include/gz/msgs/Utility.hh
+++ b/include/gz/msgs/Utility.hh
@@ -222,7 +222,7 @@ namespace gz
 
     /// \brief Convert a gz::math::SphericalCoordinates::CoordinateType
     /// to a msgs::SphericalCoordinatesType
-    /// \param[in] _coord The spherical coordinates to convert
+    /// \param[in] _coord The spherical coordinates type to convert
     /// \return A gz::msgs::SphericalCoordinatesType object
     GZ_MSGS_VISIBLE
     msgs::SphericalCoordinatesType ConvertCoord(
diff --git a/src/Utility.cc b/src/Utility.cc
index 6675b10d..eb3a3e66 100644
--- a/src/Utility.cc
+++ b/src/Utility.cc
@@ -197,9 +197,11 @@ namespace gz
           return math::SphericalCoordinates::CoordinateType::SPHERICAL;
         case msgs::SphericalCoordinatesType::LOCAL:
           return math::SphericalCoordinates::CoordinateType::LOCAL;
-        default:
+        case msgs::SphericalCoordinatesType::LOCAL2:
           return math::SphericalCoordinates::CoordinateType::LOCAL2;
       }
+      std::cerr << "Invalid coordinate type passed" << std::endl;
+      return math::SphericalCoordinates::CoordinateType::LOCAL2;
     }
 
     /////////////////////////////////////////////
@@ -385,6 +387,7 @@ namespace gz
         default:
           return msgs::SphericalCoordinatesType::LOCAL2;
       }
+      std::cerr << "Invalid coordinate type passed" << std::endl;
     }
 
     /////////////////////////////////////////////