diff --git a/include/sl/c_api/types_c.h b/include/sl/c_api/types_c.h index e007e2a..06aa9f9 100644 --- a/include/sl/c_api/types_c.h +++ b/include/sl/c_api/types_c.h @@ -286,7 +286,7 @@ enum SL_UNIT { \image html CoordinateSystem.png */ enum SL_COORDINATE_SYSTEM { - SL_COORDINATE_SYSTEM_IMAGE, /**< Standard coordinates system in computer vision. Used in OpenCV : see here : http://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html */ + SL_COORDINATE_SYSTEM_IMAGE, /**< Standard coordinates system in computer vision. Used in OpenCV : see here. */ SL_COORDINATE_SYSTEM_LEFT_HANDED_Y_UP, /**< Left-Handed with Y up and Z forward. Used in Unity with DirectX. */ SL_COORDINATE_SYSTEM_RIGHT_HANDED_Y_UP, /**< Right-Handed with Y pointing up and Z backward. Used in OpenGL. */ SL_COORDINATE_SYSTEM_RIGHT_HANDED_Z_UP, /**< Right-Handed with Z pointing up and Y forward. Used in 3DSMax. */ @@ -941,10 +941,10 @@ enum SL_BODY_70_PARTS \brief Change the type of outputed position for the Fusion positional tracking (raw data or fusion data projected into zed camera) */ enum SL_POSITION_TYPE { - RAW = 0, /*The output position will be the raw position data*/ - FUSION, /*The output position will be the fused position projected into the requested camera repository*/ + SL_POSITION_TYPE_RAW = 0, /*The output position will be the raw position data*/ + SL_POSITION_TYPE_FUSION, /*The output position will be the fused position projected into the requested camera repository*/ ///@cond SHOWHIDDEN - LAST + SL_POSITION_TYPE_LAST ///@endcond }; @@ -2263,6 +2263,9 @@ struct SL_InputType ////////////////////////////////////////////////////////////////////////////////////////////////////////// enum SL_FUSION_ERROR_CODE { + SL_FUSION_ERROR_CODE_NO_NEW_DATA_AVAILABLE = -10, /** < All data from all sources were consumed, no new process available.*/ + SL_FUSION_ERROR_CODE_INVALID_TIMESTAMP = -9, /** < Problem was detected with ingested timestamp*/ + SL_FUSION_ERROR_CODE_INVALID_COVARIANCE = -8, /** < Problem was detected with ingested covariance */ SL_FUSION_ERROR_CODE_WRONG_BODY_FORMAT = -7, /**< The requested body tracking model is not available*/ SL_FUSION_ERROR_CODE_NOT_ENABLE = -6, /**< The following module was not enabled*/ SL_FUSION_ERROR_CODE_INPUT_FEED_MISMATCH = -5, /**< Some source are provided by SVO and some sources are provided by LIVE stream */ diff --git a/include/sl/c_api/zed_interface.h b/include/sl/c_api/zed_interface.h index eb9f29a..c7e6a2c 100644 --- a/include/sl/c_api/zed_interface.h +++ b/include/sl/c_api/zed_interface.h @@ -1313,7 +1313,7 @@ extern "C" { * \param out [in]: the current GNSS data * \param radian [in] : true if the gnssdata is set in radian */ - INTERFACE_API void sl_fusion_ingest_gnss_data(struct SL_GNSSData* gnss_data, bool radian); + INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_ingest_gnss_data(struct SL_GNSSData* gnss_data, bool radian); /** * @brief returns the current GNSS data diff --git a/src/ZEDFusionController.cpp b/src/ZEDFusionController.cpp index 4a79389..464069a 100644 --- a/src/ZEDFusionController.cpp +++ b/src/ZEDFusionController.cpp @@ -405,7 +405,7 @@ void ZEDFusionController::disablePositionalTracking() { fusion.disablePositionalTracking(); } -void ZEDFusionController::ingestGNSSData(SL_GNSSData* data, bool radian) +SL_FUSION_ERROR_CODE ZEDFusionController::ingestGNSSData(SL_GNSSData* data, bool radian) { sl::GNSSData sdk_gnss; sdk_gnss.setCoordinates(data->latitude, data->longitude, data->altitude, radian); @@ -419,7 +419,7 @@ void ZEDFusionController::ingestGNSSData(SL_GNSSData* data, bool radian) sdk_gnss.position_covariance[i] = data->position_covariance[i]; } - fusion.ingestGNSSData(sdk_gnss); + return (SL_FUSION_ERROR_CODE)fusion.ingestGNSSData(sdk_gnss); } SL_POSITIONAL_TRACKING_STATE ZEDFusionController::getCurrentGNSSData(SL_GNSSData* data, bool radian) diff --git a/src/ZEDFusionController.hpp b/src/ZEDFusionController.hpp index 7600fcb..bb659b9 100644 --- a/src/ZEDFusionController.hpp +++ b/src/ZEDFusionController.hpp @@ -118,7 +118,7 @@ class ZEDFusionController { void disablePositionalTracking(); - void ingestGNSSData(SL_GNSSData* data, bool radian); + SL_FUSION_ERROR_CODE ingestGNSSData(SL_GNSSData* data, bool radian); SL_POSITIONAL_TRACKING_STATE getCurrentGNSSData(SL_GNSSData* data, bool radian); diff --git a/src/zed_interface.cpp b/src/zed_interface.cpp index a9635e6..de4f7d0 100644 --- a/src/zed_interface.cpp +++ b/src/zed_interface.cpp @@ -1418,11 +1418,11 @@ extern "C" { } } - INTERFACE_API void sl_fusion_ingest_gnss_data(struct SL_GNSSData* gnss_data, bool radian) + INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_ingest_gnss_data(struct SL_GNSSData* gnss_data, bool radian) { if (!ZEDFusionController::get()->isNotCreated()) { - ZEDFusionController::get()->ingestGNSSData(gnss_data, radian); + return ZEDFusionController::get()->ingestGNSSData(gnss_data, radian); } }