Skip to content

Commit

Permalink
Merge branch 'v4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bvallon-sl committed Apr 25, 2023
2 parents 2e87c08 + f39fc55 commit 2753158
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
11 changes: 7 additions & 4 deletions include/sl/c_api/types_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="http://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html">here</a>. */
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. */
Expand Down Expand Up @@ -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
};

Expand Down Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion include/sl/c_api/zed_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/ZEDFusionController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ZEDFusionController.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/zed_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 2753158

Please sign in to comment.