diff --git a/en/application-dev/reference/apis/js-apis-sensor.md b/en/application-dev/reference/apis/js-apis-sensor.md index 987da3a5c044ee43e963df6a1ef731d8a0d07915..e0438820b47438b2fa545723003edc91b7eef3f5 100644 --- a/en/application-dev/reference/apis/js-apis-sensor.md +++ b/en/application-dev/reference/apis/js-apis-sensor.md @@ -2661,7 +2661,7 @@ try { ## sensor.getAngleVariation9+ getAngleVariation(currentRotationMatrix: Array<number>, preRotationMatrix: Array<number>, - callback: AsyncCallback): void + callback: AsyncCallback<Array<number>>): void Obtains the angle change between two rotation matrices. This API uses an asynchronous callback to return the result. @@ -2717,7 +2717,7 @@ try { ## sensor.getAngleVariation9+ -getAngleVariation(currentRotationMatrix: Array<number>, preRotationMatrix: Array<number>): Promise +getAngleVariation(currentRotationMatrix: Array<number>, preRotationMatrix: Array<number>): Promise<Array<number>> Obtains the angle change between two rotation matrices. This API uses a promise to return the result. @@ -2777,7 +2777,7 @@ try { ## sensor.getRotationMatrix9+ -getRotationMatrix(rotationVector: Array<number>, callback: AsyncCallback): void +getRotationMatrix(rotationVector: Array<number>, callback: AsyncCallback<Array<number>>): void Obtains the rotation matrix from a rotation vector. This API uses an asynchronous callback to return the result. @@ -2819,7 +2819,7 @@ try { ## sensor.getRotationMatrix9+ -getRotationMatrix(rotationVector: Array<number>): Promise +getRotationMatrix(rotationVector: Array<number>): Promise<Array<number>> Obtains the rotation matrix from a rotation vector. This API uses a promise to return the result. @@ -2866,7 +2866,7 @@ try { ## sensor.transformRotationMatrix9+ transformRotationMatrix(inRotationVector: Array<number>, coordinates: CoordinatesOptions, - callback: AsyncCallback): void + callback: AsyncCallback<Array<number>>): void Transforms a rotation vector based on the coordinate system. This API uses an asynchronous callback to return the result. @@ -2913,7 +2913,7 @@ try { ## sensor.transformRotationMatrix9+ -transformRotationMatrix(inRotationVector: Array<number>, coordinates: CoordinatesOptions): Promise +transformRotationMatrix(inRotationVector: Array<number>, coordinates: CoordinatesOptions): Promise<Array<number>> Transforms a rotation vector based on the coordinate system. This API uses a promise to return the result. @@ -2964,7 +2964,7 @@ try { ## sensor.getQuaternion9+ -getQuaternion(rotationVector: Array<number>, callback: AsyncCallback): void +getQuaternion(rotationVector: Array<number>, callback: AsyncCallback<Array<number>>): void Obtains the quaternion from a rotation vector. This API uses an asynchronous callback to return the result. @@ -3006,7 +3006,7 @@ try { ## sensor.getQuaternion9+ -getQuaternion(rotationVector: Array<number>): Promise +getQuaternion(rotationVector: Array<number>): Promise<Array<number>> Obtains the quaternion from a rotation vector. This API uses a promise to return the result. @@ -3052,7 +3052,7 @@ try { ## sensor.getOrientation9+ -getOrientation(rotationMatrix: Array<number>, callback: AsyncCallback): void +getOrientation(rotationMatrix: Array<number>, callback: AsyncCallback<Array<number>>): void Obtains the device direction based on the rotation matrix. This API uses an asynchronous callback to return the result. @@ -3101,7 +3101,7 @@ try { ## sensor.getOrientation9+ -getOrientation(rotationMatrix: Array<number>): Promise +getOrientation(rotationMatrix: Array<number>): Promise<Array<number>> Obtains the device direction based on the rotation matrix. This API uses a promise to return the result. @@ -3193,7 +3193,7 @@ try { ## sensor.getRotationMatrix9+ -getRotationMatrix(gravity: Array<number>, geomagnetic: Array<number>,): Promise<RotationMatrixResponse> +getRotationMatrix(gravity: Array<number>, geomagnetic: Array<number>): Promise<RotationMatrixResponse> Obtains the rotation matrix based on a gravity vector and geomagnetic vector. This API uses a promise to return the result. @@ -3239,7 +3239,7 @@ try { ## sensor.getSensorList9+ -getSensorList(callback: AsyncCallback): void +getSensorList(callback: AsyncCallback<Array<Sensor>>): void Obtains information about all sensors on the device. This API uses an asynchronous callback to return the result. @@ -3249,7 +3249,7 @@ Obtains information about all sensors on the device. This API uses an asynchrono | Name | Type | Mandatory| Description | | -------- | ---------------------------------------------- | ---- | ---------------- | -| callback | AsyncCallback | Yes | Callback used to return the sensor list.| +| callback | AsyncCallback<Array<[Sensor](#sensor9)>> | Yes | Callback used to return the sensor list.| **Error code** @@ -3279,7 +3279,7 @@ try { ## sensor.getSensorList9+ - getSensorList(): Promise< Array<Sensor>> + getSensorList(): Promise<Array<Sensor>> Obtains information about all sensors on the device. This API uses a promise to return the result. @@ -3289,7 +3289,7 @@ Obtains information about all sensors on the device. This API uses a promise to | Name | Type | Mandatory| Description | | ------- | ---------------------------------------- | ---- | ---------------- | -| promise | Promise | Yes | Promise used to return the sensor list.| +| promise | Promise<Array<[Sensor](#sensor9)>> | Yes | Promise used to return the sensor list.| **Error code** @@ -3831,18 +3831,6 @@ Describes the geographical location. | longitude | number | Yes | Yes | Longitude. | | altitude | number | Yes | Yes | Altitude.| -## LocationOptions - -Describes the geographical location. - -**System capability**: SystemCapability.Sensors.Sensor - -| Name | Type | Readable | Writable | Description | -| --------- | ------ | -------- | -------- | ----------- | -| latitude | number | Yes | Yes | Latitude. | -| longitude | number | Yes | Yes | Longitude. | -| altitude | number | Yes | Yes | Altitude. | - ## sensor.on(deprecated) ### ACCELEROMETER(deprecated)