public class YRefFrame extends YFunction
Modifier and Type | Class and Description |
---|---|
static class |
YRefFrame.MOUNTORIENTATION |
static class |
YRefFrame.MOUNTPOSITION |
static interface |
YRefFrame.TimedReportCallback
TimedReportCallback for RefFrame
|
static interface |
YRefFrame.UpdateCallback
Deprecated UpdateCallback for RefFrame
|
_advertisedValue, _cacheExpiration, _className, _dataStreams, _func, _funId, _hwId, _lastErrorMsg, _lastErrorType, _logicalName, _serial, _userData, _valueCallbackFunction, _yapi, ADVERTISEDVALUE_INVALID, FUNCTIONDESCRIPTOR_INVALID, LOGICALNAME_INVALID
Modifier | Constructor and Description |
---|---|
protected |
YRefFrame(String func) |
protected |
YRefFrame(YAPIContext ctx,
String func) |
Modifier and Type | Method and Description |
---|---|
int |
_calibSort(int start,
int stopidx) |
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) |
int |
cancel3DCalibration()
Aborts the sensors tridimensional calibration process et restores normal settings.
|
static YRefFrame |
FindRefFrame(String func)
Retrieves a reference frame for a given identifier.
|
static YRefFrame |
FindRefFrameInContext(YAPIContext yctx,
String func)
Retrieves a reference frame for a given identifier in a YAPI context.
|
static YRefFrame |
FirstRefFrame()
Starts the enumeration of reference frames currently accessible.
|
static YRefFrame |
FirstRefFrameInContext(YAPIContext yctx)
Starts the enumeration of reference frames currently accessible.
|
String |
get_3DCalibrationHint()
Returns instructions to proceed to the tridimensional calibration initiated with
method start3DCalibration.
|
String |
get_3DCalibrationLogMsg()
Returns the latest log message from the calibration process.
|
int |
get_3DCalibrationProgress()
Returns the global process indicator for the tridimensional calibration
initiated with method start3DCalibration.
|
int |
get_3DCalibrationStage()
Returns index of the current stage of the calibration
initiated with method start3DCalibration.
|
int |
get_3DCalibrationStageProgress()
Returns the process indicator for the current stage of the calibration
initiated with method start3DCalibration.
|
double |
get_bearing()
Returns the reference bearing used by the compass.
|
String |
get_calibrationParam() |
int |
get_calibrationState()
Returns the 3D sensor calibration state (Yocto-3D-V2 only).
|
int |
get_fusionMode()
Returns the sensor fusion mode.
|
int |
get_measureQuality()
Returns estimated quality of the orientation (Yocto-3D-V2 only).
|
YRefFrame.MOUNTORIENTATION |
get_mountOrientation()
Returns the installation orientation of the device, as configured
in order to define the reference frame for the compass and the
pitch/roll tilt sensors.
|
int |
get_mountPos() |
YRefFrame.MOUNTPOSITION |
get_mountPosition()
Returns the installation position of the device, as configured
in order to define the reference frame for the compass and the
pitch/roll tilt sensors.
|
double |
getBearing()
Returns the reference bearing used by the compass.
|
int |
getFusionMode()
Returns the sensor fusion mode.
|
int |
more3DCalibration()
Continues the sensors tridimensional calibration process previously
initiated using method start3DCalibration.
|
int |
more3DCalibrationV1() |
int |
more3DCalibrationV2() |
YRefFrame |
nextRefFrame()
Continues the enumeration of reference frames started using yFirstRefFrame().
|
int |
registerValueCallback(YRefFrame.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
int |
save3DCalibration()
Applies the sensors tridimensional calibration parameters that have just been computed.
|
int |
save3DCalibrationV1() |
int |
save3DCalibrationV2() |
int |
set_bearing(double newval)
Changes the reference bearing used by the compass.
|
int |
set_calibrationParam(String newval) |
int |
set_fusionMode(int newval)
Change the sensor fusion mode.
|
int |
set_mountPos(int newval) |
int |
set_mountPosition(YRefFrame.MOUNTPOSITION position,
YRefFrame.MOUNTORIENTATION orientation)
Changes the compass and tilt sensor frame of reference.
|
int |
setBearing(double newval)
Changes the reference bearing used by the compass.
|
int |
setFusionMode(int newval)
Change the sensor fusion mode.
|
int |
start3DCalibration()
Initiates the sensors tridimensional calibration process.
|
_AddToCache, _clearDataStreamCache, _download, _escapeAttr, _FindFromCache, _FindFromCacheInContext, _get_json_path_struct, _get_json_path, _json_get_array, _json_get_key, _json_get_string, _parse, _parserHelper, _setAttr, _throw, _UpdateTimedReportCallbackList, _UpdateValueCallbackList, _upload, _upload, _uploadEx, clearCache, describe, errMessage, errorMessage, errorType, errType, FindFunction, FindFunctionInContext, FirstFunction, FirstFunctionInContext, functionDescriptor, get_advertisedValue, get_errorMessage, get_errorType, get_friendlyName, get_functionDescriptor, get_functionId, get_hardwareId, get_logicalName, get_module, get_serialNumber, get_userData, getAdvertisedValue, getErrorMessage, getErrorType, getFriendlyName, getFunctionDescriptor, getFunctionId, getHardwareId, getLogicalName, getModule, getUserData, isOnline, isReadOnly, load, loadAttribute, module, muteValueCallbacks, nextFunction, registerValueCallback, set_advertisedValue, set_logicalName, set_userData, setLogicalName, setUserData, toString, unmuteValueCallbacks, userData
public static final int MOUNTPOS_INVALID
public static final double BEARING_INVALID
public static final String CALIBRATIONPARAM_INVALID
public static final int FUSIONMODE_NDOF
public static final int FUSIONMODE_NDOF_FMC_OFF
public static final int FUSIONMODE_M4G
public static final int FUSIONMODE_COMPASS
public static final int FUSIONMODE_IMU
public static final int FUSIONMODE_INCLIN_90DEG_1G8
public static final int FUSIONMODE_INCLIN_90DEG_3G6
public static final int FUSIONMODE_INCLIN_10DEG
public static final int FUSIONMODE_INVALID
protected int _mountPos
protected double _bearing
protected String _calibrationParam
protected int _fusionMode
protected YRefFrame.UpdateCallback _valueCallbackRefFrame
protected boolean _calibV2
protected int _calibStage
protected String _calibStageHint
protected int _calibStageProgress
protected int _calibProgress
protected String _calibLogMsg
protected String _calibSavedParams
protected int _calibCount
protected int _calibInternalPos
protected int _calibPrevTick
protected double _calibAccXOfs
protected double _calibAccYOfs
protected double _calibAccZOfs
protected double _calibAccXScale
protected double _calibAccYScale
protected double _calibAccZScale
protected YRefFrame(YAPIContext ctx, String func)
func
- : functionidprotected YRefFrame(String func)
func
- : functionidprotected void _parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) throws Exception
_parseAttr
in class YFunction
Exception
public int get_mountPos() throws YAPI_Exception
YAPI_Exception
public int set_mountPos(int newval) throws YAPI_Exception
YAPI_Exception
public int set_bearing(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the reference bearing used by the compassYAPI_Exception
- on errorpublic int setBearing(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the reference bearing used by the compassYAPI_Exception
- on errorpublic double get_bearing() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getBearing() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_calibrationParam() throws YAPI_Exception
YAPI_Exception
public int set_calibrationParam(String newval) throws YAPI_Exception
YAPI_Exception
public int get_fusionMode() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getFusionMode() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_fusionMode(int newval) throws YAPI_Exception
newval
- : a value among YRefFrame.FUSIONMODE_NDOF, YRefFrame.FUSIONMODE_NDOF_FMC_OFF,
YRefFrame.FUSIONMODE_M4G, YRefFrame.FUSIONMODE_COMPASS, YRefFrame.FUSIONMODE_IMU,
YRefFrame.FUSIONMODE_INCLIN_90DEG_1G8, YRefFrame.FUSIONMODE_INCLIN_90DEG_3G6 and
YRefFrame.FUSIONMODE_INCLIN_10DEGYAPI_Exception
- on errorpublic int setFusionMode(int newval) throws YAPI_Exception
newval
- : a value among YRefFrame.FUSIONMODE_NDOF, YRefFrame.FUSIONMODE_NDOF_FMC_OFF,
YRefFrame.FUSIONMODE_M4G, YRefFrame.FUSIONMODE_COMPASS, YRefFrame.FUSIONMODE_IMU,
YRefFrame.FUSIONMODE_INCLIN_90DEG_1G8, YRefFrame.FUSIONMODE_INCLIN_90DEG_3G6 and
YRefFrame.FUSIONMODE_INCLIN_10DEGYAPI_Exception
- on errorpublic static YRefFrame FindRefFrame(String func)
func
- : a string that uniquely characterizes the reference frame, for instance
Y3DMK002.refFrame.public static YRefFrame FindRefFrameInContext(YAPIContext yctx, String func)
yctx
- : a YAPI contextfunc
- : a string that uniquely characterizes the reference frame, for instance
Y3DMK002.refFrame.public int registerValueCallback(YRefFrame.UpdateCallback callback)
callback
- : the callback function to call, or a null pointer. The callback function should take two
arguments: the function object of which the value has changed, and the character string describing
the new advertised value.public int _invokeValueCallback(String value)
_invokeValueCallback
in class YFunction
public YRefFrame.MOUNTPOSITION get_mountPosition() throws YAPI_Exception
YAPI_Exception
- on errorpublic YRefFrame.MOUNTORIENTATION get_mountOrientation() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_mountPosition(YRefFrame.MOUNTPOSITION position, YRefFrame.MOUNTORIENTATION orientation) throws YAPI_Exception
position
- : a value among the YRefFrame.MOUNTPOSITION enumeration
(YRefFrame.MOUNTPOSITION.BOTTOM, YRefFrame.MOUNTPOSITION.TOP,
YRefFrame.MOUNTPOSITION.FRONT, YRefFrame.MOUNTPOSITION.RIGHT,
YRefFrame.MOUNTPOSITION.REAR, YRefFrame.MOUNTPOSITION.LEFT),
corresponding to the installation in a box, on one of the six faces.orientation
- : a value among the enumeration YRefFrame.MOUNTORIENTATION
(YRefFrame.MOUNTORIENTATION.TWELVE, YRefFrame.MOUNTORIENTATION.THREE,
YRefFrame.MOUNTORIENTATION.SIX, YRefFrame.MOUNTORIENTATION.NINE)
corresponding to the orientation of the "X" arrow on the device,
as on a clock dial seen from an observer in the center of the box.
On the bottom face, the 12H orientation points to the front, while
on the top face, the 12H orientation points to the rear.
Remember to call the saveToFlash()
method of the module if the modification must be kept.YAPI_Exception
- on errorpublic int get_calibrationState() throws YAPI_Exception
YAPI_Exception
- on error
For the Yocto-3D (V1), this function always return -3 (unsupported function).public int get_measureQuality() throws YAPI_Exception
YAPI_Exception
- on error
For the Yocto-3D (V1), this function always return -3 (unsupported function).public int _calibSort(int start, int stopidx)
public int start3DCalibration() throws YAPI_Exception
YAPI_Exception
- on errorpublic int more3DCalibration() throws YAPI_Exception
YAPI_Exception
- on errorpublic int more3DCalibrationV1() throws YAPI_Exception
YAPI_Exception
public int more3DCalibrationV2() throws YAPI_Exception
YAPI_Exception
public String get_3DCalibrationHint()
public int get_3DCalibrationProgress()
public int get_3DCalibrationStage()
public int get_3DCalibrationStageProgress()
public String get_3DCalibrationLogMsg()
public int save3DCalibration() throws YAPI_Exception
YAPI_Exception
- on errorpublic int save3DCalibrationV1() throws YAPI_Exception
YAPI_Exception
public int save3DCalibrationV2() throws YAPI_Exception
YAPI_Exception
public int cancel3DCalibration() throws YAPI_Exception
YAPI_Exception
- on errorpublic YRefFrame nextRefFrame()
public static YRefFrame FirstRefFrame()
public static YRefFrame FirstRefFrameInContext(YAPIContext yctx)
yctx
- : a YAPI context.Copyright © 2022. All rights reserved.