Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f508beed
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
f508beed
编写于
1月 12, 2022
作者:
O
openharmony_ci
提交者:
Gitee
1月 12, 2022
浏览文件
操作
浏览文件
下载
差异文件
!1553 add sensor js interface testcases
Merge pull request !1553 from liuzixuan10/master
上级
580f9484
de50bf7a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
297 addition
and
280 deletion
+297
-280
sensors/sensor_standard/src/main/js/default/test/SensorGeomagneticTest.test.js
...rd/src/main/js/default/test/SensorGeomagneticTest.test.js
+297
-280
未找到文件。
sensors/sensor_standard/src/main/js/default/test/SensorGeomagneticTest.test.js
浏览文件 @
f508beed
...
@@ -82,12 +82,12 @@ describe("SensorJsTest", function () {
...
@@ -82,12 +82,12 @@ describe("SensorJsTest", function () {
let
timeMillis
=
[
1580486400000
,
1612108800000
,
1643644800000
,
1675180800000
,
1706716800000
]
let
timeMillis
=
[
1580486400000
,
1612108800000
,
1643644800000
,
1675180800000
,
1706716800000
]
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0010
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0010
* @tc.name: SensorGeomagenticTest001
* @tc.name: SensorGeomagentic
AlgorithmJS
Test001
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0010
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0010
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0010---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0010
-------------------------
"
);
let
promiseArray
=
[]
let
promiseArray
=
[]
for
(
let
i
=
0
;
i
<
timeMillis
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
timeMillis
.
length
;
i
++
)
{
promiseArray
.
push
(
new
Promise
((
resolve
,
reject
)
=>
{
promiseArray
.
push
(
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -95,13 +95,13 @@ describe("SensorJsTest", function () {
...
@@ -95,13 +95,13 @@ describe("SensorJsTest", function () {
sensor
.
getGeomagneticField
({
'
latitude
'
:
80
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
j
],
sensor
.
getGeomagneticField
({
'
latitude
'
:
80
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
j
],
(
error
,
data
)
=>
{
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagentic
Test0010
failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJSTest001
failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
setTimeout
((
err
)
=>
{
setTimeout
((
err
)
=>
{
reject
(
err
)
reject
(
err
)
},
500
)
},
500
)
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagentic
Test0010
success x:
'
+
data
.
x
+
'
,y:
'
console
.
info
(
'
SensorGeomagentic
AlgorithmJSTest001
success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -123,12 +123,12 @@ describe("SensorJsTest", function () {
...
@@ -123,12 +123,12 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0020
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0020
* @tc.name: SensorGeomagenticTest002
* @tc.name: SensorGeomagentic
AlgorithmJS
Test002
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0020
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0020
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0020---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0020
-------------------------
"
);
let
promiseArray
=
[]
let
promiseArray
=
[]
for
(
let
i
=
0
;
i
<
GEOMAGNETIC_COORDINATES
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
GEOMAGNETIC_COORDINATES
.
length
;
i
++
)
{
promiseArray
.
push
(
new
Promise
((
resolve
,
reject
)
=>
{
promiseArray
.
push
(
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -138,13 +138,14 @@ describe("SensorJsTest", function () {
...
@@ -138,13 +138,14 @@ describe("SensorJsTest", function () {
'
longitude
'
:
GEOMAGNETIC_COORDINATES
[
j
][
1
],
'
altitude
'
:
GEOMAGNETIC_COORDINATES
[
j
][
2
]
'
longitude
'
:
GEOMAGNETIC_COORDINATES
[
j
][
1
],
'
altitude
'
:
GEOMAGNETIC_COORDINATES
[
j
][
2
]
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest002 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test002 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
setTimeout
((
err
)
=>
{
setTimeout
((
err
)
=>
{
reject
(
err
)
reject
(
err
)
},
500
)
},
500
)
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest002 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest002 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -166,21 +167,21 @@ describe("SensorJsTest", function () {
...
@@ -166,21 +167,21 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0030
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0030
* @tc.name: SensorGeomagenticTest003
* @tc.name: SensorGeomagentic
AlgorithmJS
Test003
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0030
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0030
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0030---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0030
-------------------------
"
);
let
geomagneticComponent
=
[
27779.234375
,
-
6214.9794921875
,
-
14924.6611328125
,
-
27.667943954467773
,
let
geomagneticComponent
=
[
27779.234375
,
-
6214.9794921875
,
-
14924.6611328125
,
-
27.667943954467773
,
-
12.610970497131348
,
28465.9765625
,
32141.2109375
]
-
12.610970497131348
,
28465.9765625
,
32141.2109375
]
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
Number
.
MAX_VALUE
,
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
Number
.
MAX_VALUE
,
(
error
,
data
)
=>
{
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest003 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test003 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest003 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test003 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -199,21 +200,22 @@ describe("SensorJsTest", function () {
...
@@ -199,21 +200,22 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0040
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0040
* @tc.name: SensorGeomagenticTest004
* @tc.name: SensorGeomagentic
AlgorithmJS
Test004
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0040
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0040
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0040---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0040
-------------------------
"
);
let
geomagneticComponent
=
[
27779.234375
,
-
6214.9794921875
,
-
14924.6611328125
,
-
27.667943954467773
,
let
geomagneticComponent
=
[
27779.234375
,
-
6214.9794921875
,
-
14924.6611328125
,
-
27.667943954467773
,
-
12.610970497131348
,
28465.9765625
,
32141.2109375
]
-
12.610970497131348
,
28465.9765625
,
32141.2109375
]
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
Number
.
MIN_VALUE
,
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
Number
.
MIN_VALUE
,
(
error
,
data
)
=>
{
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest004 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test004 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest004 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest004 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -232,21 +234,21 @@ describe("SensorJsTest", function () {
...
@@ -232,21 +234,21 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0050
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0050
* @tc.name: SensorGeomagenticTest005
* @tc.name: SensorGeomagentic
AlgorithmJS
Test005
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0050
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0050
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0050---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0050
-------------------------
"
);
let
geomagneticComponent
=
[
1824.141845703125
,
116.58167266845703
,
56727.7734375
,
88.15447235107422
,
let
geomagneticComponent
=
[
1824.141845703125
,
116.58167266845703
,
56727.7734375
,
88.15447235107422
,
3.6568238735198975
,
1827.8634033203125
,
56757.21484375
]
3.6568238735198975
,
1827.8634033203125
,
56757.21484375
]
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
MAX_VALUE
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
MAX_VALUE
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest005 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test005 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest005 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test005 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -265,21 +267,21 @@ describe("SensorJsTest", function () {
...
@@ -265,21 +267,21 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0060
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0060
* @tc.name: SensorGeomagenticTest006
* @tc.name: SensorGeomagentic
AlgorithmJS
Test006
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0060
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0060
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0060---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0060
-------------------------
"
);
let
geomagneticComponent
=
[
1824.141845703125
,
116.58167266845703
,
56727.7734375
,
88.15447235107422
,
let
geomagneticComponent
=
[
1824.141845703125
,
116.58167266845703
,
56727.7734375
,
88.15447235107422
,
3.6568238735198975
,
1827.8634033203125
,
56757.21484375
]
3.6568238735198975
,
1827.8634033203125
,
56757.21484375
]
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
NaN
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
0
],
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
NaN
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest006 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test006 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest006 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test006 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -298,21 +300,22 @@ describe("SensorJsTest", function () {
...
@@ -298,21 +300,22 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0070
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0070
* @tc.name: SensorGeomagenticTest007
* @tc.name: SensorGeomagentic
AlgorithmJS
Test007
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0070
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0070
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0070---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0070
-------------------------
"
);
let
geomagneticComponent
=
[
14425.57421875
,
-
17156.767578125
,
-
52023.21484375
,
-
66.69005584716797
,
let
geomagneticComponent
=
[
14425.57421875
,
-
17156.767578125
,
-
52023.21484375
,
-
66.69005584716797
,
-
49.94255447387695
,
22415.4375
,
56646.859375
]
-
49.94255447387695
,
22415.4375
,
56646.859375
]
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest007 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test007 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest007 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest007 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -331,19 +334,20 @@ describe("SensorJsTest", function () {
...
@@ -331,19 +334,20 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0080
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0080
* @tc.name: SensorGeomagenticTest008
* @tc.name: SensorGeomagentic
AlgorithmJS
Test008
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0080
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0080
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0080---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0080
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
MAX_VALUE
,
'
altitude
'
:
0
},
timeMillis
[
0
],
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
MAX_VALUE
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest008 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test008 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest008 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest008 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -356,19 +360,20 @@ describe("SensorJsTest", function () {
...
@@ -356,19 +360,20 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0090
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0090
* @tc.name: SensorGeomagenticTest009
* @tc.name: SensorGeomagentic
AlgorithmJS
Test009
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0090
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0090
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0090---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0090
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
timeMillis
[
0
],
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest009 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test009 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest009 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest009 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -381,19 +386,20 @@ describe("SensorJsTest", function () {
...
@@ -381,19 +386,20 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0100
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0100
* @tc.name: SensorGeomagenticTest010
* @tc.name: SensorGeomagentic
AlgorithmJS
Test010
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0100
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0100---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0100
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest010 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test010 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest010 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest010 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -406,19 +412,20 @@ describe("SensorJsTest", function () {
...
@@ -406,19 +412,20 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0110
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0110
* @tc.name: SensorGeomagenticTest011
* @tc.name: SensorGeomagentic
AlgorithmJS
Test011
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0110
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0110
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0110---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0110
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
timeMillis
[
0
],
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest011 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test011 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest011 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest011 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -431,21 +438,22 @@ describe("SensorJsTest", function () {
...
@@ -431,21 +438,22 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0120
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0120
* @tc.name: SensorGeomagenticTest012
* @tc.name: SensorGeomagentic
AlgorithmJS
Test012
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0120
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0120
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0120---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0120
-------------------------
"
);
let
geomagneticComponent
=
[
27536.40234375
,
-
2248.586669921875
,
-
16022.4306640625
,
-
30.110872268676758
,
let
geomagneticComponent
=
[
27536.40234375
,
-
2248.586669921875
,
-
16022.4306640625
,
-
30.110872268676758
,
-
4.66834020614624
,
27628.05859375
,
31937.875
]
-
4.66834020614624
,
27628.05859375
,
31937.875
]
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MIN_VALUE
},
timeMillis
[
0
],
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MIN_VALUE
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest012 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test012 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest012 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest012 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -464,19 +472,20 @@ describe("SensorJsTest", function () {
...
@@ -464,19 +472,20 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0130
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0130
* @tc.name: SensorGeomagenticTest013
* @tc.name: SensorGeomagentic
AlgorithmJS
Test013
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0130
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0130
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0130---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0130
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
timeMillis
[
0
],
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest013 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test013 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest013 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest013 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -489,19 +498,20 @@ describe("SensorJsTest", function () {
...
@@ -489,19 +498,20 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0140
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0140
* @tc.name: SensorGeomagenticTest014
* @tc.name: SensorGeomagentic
AlgorithmJS
Test014
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0140
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0140
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0140---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0140
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest014 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test014 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest014 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest014 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -514,19 +524,20 @@ describe("SensorJsTest", function () {
...
@@ -514,19 +524,20 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0150
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0150
* @tc.name: SensorGeomagenticTest015
* @tc.name: SensorGeomagentic
AlgorithmJS
Test015
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0150
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0150
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0150---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0150
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
timeMillis
[
0
],
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest015 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test015 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest015 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest015 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -539,19 +550,20 @@ describe("SensorJsTest", function () {
...
@@ -539,19 +550,20 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0160
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0160
* @tc.name: SensorGeomagenticTest016
* @tc.name: SensorGeomagentic
AlgorithmJS
Test016
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0160
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0160
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0160---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0160
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest016 once success
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test016 once success
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest016 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest016 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -564,19 +576,19 @@ describe("SensorJsTest", function () {
...
@@ -564,19 +576,19 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0170
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0170
* @tc.name: SensorGeomagenticTest017
* @tc.name: SensorGeomagentic
AlgorithmJS
Test017
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0170
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0170
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0170---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0170
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
timeMillis
[
0
],
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest017 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test017 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest017 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test017 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -589,19 +601,20 @@ describe("SensorJsTest", function () {
...
@@ -589,19 +601,20 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0180
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0180
* @tc.name: SensorGeomagenticTest018
* @tc.name: SensorGeomagentic
AlgorithmJS
Test018
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0180
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0180
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0180---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0180
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
timeMillis
[
0
],
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest018 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test018 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest018 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest018 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -614,19 +627,20 @@ describe("SensorJsTest", function () {
...
@@ -614,19 +627,20 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0190
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0190
* @tc.name: SensorGeomagenticTest019
* @tc.name: SensorGeomagentic
AlgorithmJS
Test019
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0190
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0190
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0190---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0190
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest019 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test019 failed
'
);
expect
(
false
).
assertfalse
();
expect
(
false
).
assertfalse
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest019 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest019 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -639,19 +653,19 @@ describe("SensorJsTest", function () {
...
@@ -639,19 +653,19 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0200
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0200
* @tc.name: SensorGeomagenticTest020
* @tc.name: SensorGeomagentic
AlgorithmJS
Test020
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0200
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0200---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0200
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
MAX_VALUE
,
'
altitude
'
:
0
},
timeMillis
[
0
],
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
MAX_VALUE
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest020 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test020 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest020 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test020 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -664,19 +678,20 @@ describe("SensorJsTest", function () {
...
@@ -664,19 +678,20 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0210
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0210
* @tc.name: SensorGeomagenticTest021
* @tc.name: SensorGeomagentic
AlgorithmJS
Test021
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0210
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0210
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0210---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0210
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
timeMillis
[
0
],
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest021 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test021 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest021 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest021 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -689,19 +704,20 @@ describe("SensorJsTest", function () {
...
@@ -689,19 +704,20 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0220
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0220
* @tc.name: SensorGeomagenticTest022
* @tc.name: SensorGeomagentic
AlgorithmJS
Test022
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0220
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0220
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0220---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0220
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest022 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test022 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest022 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest022 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -714,19 +730,20 @@ describe("SensorJsTest", function () {
...
@@ -714,19 +730,20 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0230
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0230
* @tc.name: SensorGeomagenticTest023
* @tc.name: SensorGeomagentic
AlgorithmJS
Test023
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0230
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0230
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0230---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0230
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
timeMillis
[
0
],
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest023 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test023 failed
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest023 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest023 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -739,19 +756,19 @@ describe("SensorJsTest", function () {
...
@@ -739,19 +756,19 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0240
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0240
* @tc.name: SensorGeomagenticTest024
* @tc.name: SensorGeomagentic
AlgorithmJS
Test024
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0240
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0240
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0240---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0240
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
timeMillis
[
0
],
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest024 once success
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test024 once success
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest024 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test024 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -764,19 +781,19 @@ describe("SensorJsTest", function () {
...
@@ -764,19 +781,19 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0250
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0250
* @tc.name: SensorGeomagenticTest025
* @tc.name: SensorGeomagentic
AlgorithmJS
Test025
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
'
Geomagentic_Sensor_Test
0250
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0250
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0250---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0250
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest025 once success
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test025 once success
'
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
console
.
info
(
'
SensorGeomagenticTest025 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test025 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -789,16 +806,16 @@ describe("SensorJsTest", function () {
...
@@ -789,16 +806,16 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0260
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0260
* @tc.name: SensorGeomagenticTest026
* @tc.name: SensorGeomagentic
AlgorithmJS
Test026
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
"
Geomagentic_Sensor_Test
0260
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0260
"
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0260---------
-------------------------
"
);
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0260
-------------------------
"
);
for
(
var
i
=
0
;
i
<
timeMillis
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
timeMillis
.
length
;
i
++
)
{
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
80
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
80
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
i
]).
then
((
data
)
=>
{
timeMillis
[
i
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest026 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test026 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
);
+
'
,totalIntensity:
'
+
data
.
totalIntensity
);
...
@@ -817,17 +834,17 @@ describe("SensorJsTest", function () {
...
@@ -817,17 +834,17 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0270
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0270
* @tc.name: SensorGeomagenticTest027
* @tc.name: SensorGeomagentic
AlgorithmJS
Test027
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
"
Geomagentic_Sensor_Test
0270
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0270
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0270---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0270
------------------
'
);
let
geomagneticComponent
=
[
27779.234375
,
-
6214.9794921875
,
-
14924.6611328125
,
-
27.667943954467773
,
let
geomagneticComponent
=
[
27779.234375
,
-
6214.9794921875
,
-
14924.6611328125
,
-
27.667943954467773
,
-
12.610970497131348
,
28465.9765625
,
32141.2109375
]
-
12.610970497131348
,
28465.9765625
,
32141.2109375
]
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
Number
.
MAX_VALUE
).
then
((
data
)
=>
{
Number
.
MAX_VALUE
).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest027 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test027 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -845,17 +862,17 @@ describe("SensorJsTest", function () {
...
@@ -845,17 +862,17 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0280
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0280
* @tc.name: SensorGeomagenticTest028
* @tc.name: SensorGeomagentic
AlgorithmJS
Test028
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
"
Geomagentic_Sensor_Test
0280
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0280
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0280---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0280
------------------
'
);
let
geomagneticComponent
=
[
27779.234375
,
-
6214.9794921875
,
-
14924.6611328125
,
-
27.667943954467773
,
let
geomagneticComponent
=
[
27779.234375
,
-
6214.9794921875
,
-
14924.6611328125
,
-
27.667943954467773
,
-
12.610970497131348
,
28465.9765625
,
32141.2109375
]
-
12.610970497131348
,
28465.9765625
,
32141.2109375
]
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
Number
.
MIN_VALUE
).
then
((
data
)
=>
{
Number
.
MIN_VALUE
).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest028 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test028 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -873,17 +890,17 @@ describe("SensorJsTest", function () {
...
@@ -873,17 +890,17 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0290
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0290
* @tc.name: SensorGeomagenticTest029
* @tc.name: SensorGeomagentic
AlgorithmJS
Test029
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
"
Geomagentic_Sensor_Test
0290
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0290
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0290---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0290
------------------
'
);
let
geomagneticComponent
=
[
1824.141845703125
,
116.58167266845703
,
56727.7734375
,
88.15447235107422
,
let
geomagneticComponent
=
[
1824.141845703125
,
116.58167266845703
,
56727.7734375
,
88.15447235107422
,
3.6568238735198975
,
1827.8634033203125
,
56757.21484375
]
3.6568238735198975
,
1827.8634033203125
,
56757.21484375
]
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
MAX_VALUE
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
MAX_VALUE
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest029 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test029 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -901,17 +918,17 @@ describe("SensorJsTest", function () {
...
@@ -901,17 +918,17 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0300
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0300
* @tc.name: SensorGeomagenticTest030
* @tc.name: SensorGeomagentic
AlgorithmJS
Test030
* @tc.desc: Verification results of the incorrect parameters of the test interface.
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
*/
it
(
"
Geomagentic_Sensor_Test
0300
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0300
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0300---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0300
------------------
'
);
let
geomagneticComponent
=
[
1824.141845703125
,
116.58167266845703
,
56727.7734375
,
88.15447235107422
,
let
geomagneticComponent
=
[
1824.141845703125
,
116.58167266845703
,
56727.7734375
,
88.15447235107422
,
3.6568238735198975
,
1827.8634033203125
,
56757.21484375
]
3.6568238735198975
,
1827.8634033203125
,
56757.21484375
]
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
NaN
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
NaN
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest030 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test030 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -929,17 +946,17 @@ describe("SensorJsTest", function () {
...
@@ -929,17 +946,17 @@ describe("SensorJsTest", function () {
})
})
/**
/**
* @tc.number:
Geomagentic_Sensor_Test
0310
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0310
* @tc.name: SensorGeomagenticTest031
* @tc.name: SensorGeomagentic
AlgorithmJS
Test031
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0310
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0310
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0310---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0310
------------------
'
);
let
geomagneticComponent
=
[
14425.57421875
,
-
17156.767578125
,
-
52023.21484375
,
-
66.69005584716797
,
let
geomagneticComponent
=
[
14425.57421875
,
-
17156.767578125
,
-
52023.21484375
,
-
66.69005584716797
,
-
49.94255447387695
,
22415.4375
,
56646.859375
]
-
49.94255447387695
,
22415.4375
,
56646.859375
]
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest031 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test031 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -957,16 +974,16 @@ describe("SensorJsTest", function () {
...
@@ -957,16 +974,16 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0320
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0320
* @tc.name: SensorGeomagenticTest032
* @tc.name: SensorGeomagentic
AlgorithmJS
Test032
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0320
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0320
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0320---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0320
------------------
'
);
let
geomagneticComponent
=
[
NaN
,
NaN
,
NaN
]
let
geomagneticComponent
=
[
NaN
,
NaN
,
NaN
]
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
MAX_VALUE
,
'
altitude
'
:
0
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
MAX_VALUE
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest032 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test032 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -978,15 +995,15 @@ describe("SensorJsTest", function () {
...
@@ -978,15 +995,15 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0330
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0330
* @tc.name: SensorGeomagenticTest033
* @tc.name: SensorGeomagentic
AlgorithmJS
Test033
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0330
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0330
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0330---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0330
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest033 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test033 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -998,15 +1015,15 @@ describe("SensorJsTest", function () {
...
@@ -998,15 +1015,15 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0340
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0340
* @tc.name: SensorGeomagenticTest034
* @tc.name: SensorGeomagentic
AlgorithmJS
Test034
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0340
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0340
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0340---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0340
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest034 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test034 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -1018,15 +1035,15 @@ describe("SensorJsTest", function () {
...
@@ -1018,15 +1035,15 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0350
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0350
* @tc.name: SensorGeomagenticTest035
* @tc.name: SensorGeomagentic
AlgorithmJS
Test035
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0350
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0350
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0350---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0350
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest035 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test035 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -1038,17 +1055,17 @@ describe("SensorJsTest", function () {
...
@@ -1038,17 +1055,17 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0360
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0360
* @tc.name: SensorGeomagenticTest036
* @tc.name: SensorGeomagentic
AlgorithmJS
Test036
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0360
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0360
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0360---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0360
------------------
'
);
let
geomagneticComponent
=
[
27536.40234375
,
-
2248.586669921875
,
-
16022.4306640625
,
-
30.110872268676758
,
let
geomagneticComponent
=
[
27536.40234375
,
-
2248.586669921875
,
-
16022.4306640625
,
-
30.110872268676758
,
-
4.66834020614624
,
27628.05859375
,
31937.875
]
-
4.66834020614624
,
27628.05859375
,
31937.875
]
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MIN_VALUE
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MIN_VALUE
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest036 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test036 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -1066,15 +1083,15 @@ describe("SensorJsTest", function () {
...
@@ -1066,15 +1083,15 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0370
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0370
* @tc.name: SensorGeomagenticTest037
* @tc.name: SensorGeomagentic
AlgorithmJS
Test037
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0370
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0370
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0370---------
------------------start
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0370
------------------start
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest037 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test037 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -1086,17 +1103,17 @@ describe("SensorJsTest", function () {
...
@@ -1086,17 +1103,17 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0380
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0380
* @tc.name: SensorGeomagenticTest038
* @tc.name: SensorGeomagentic
AlgorithmJS
Test038
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
* @tc.type: FUNC
* @tc.type: FUNC
* @tc.require: Issue Number
* @tc.require: Issue Number
*/
*/
it
(
"
Geomagentic_Sensor_Test
0380
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0380
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0380---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0380
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest038 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test038 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -1108,16 +1125,16 @@ describe("SensorJsTest", function () {
...
@@ -1108,16 +1125,16 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0390
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0390
* @tc.name: SensorGeomagenticTest039
* @tc.name: SensorGeomagentic
AlgorithmJS
Test039
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
'
Geomagentic_Sensor_Test
0390
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0390
'
,
0
,
async
function
(
done
)
{
for
(
var
i
=
0
;
i
<
timeMillis
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
timeMillis
.
length
;
i
++
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0390---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0390
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
80
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
80
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
i
]).
then
((
data
)
=>
{
timeMillis
[
i
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest039 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test039 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
);
+
'
,totalIntensity:
'
+
data
.
totalIntensity
);
...
@@ -1136,15 +1153,15 @@ describe("SensorJsTest", function () {
...
@@ -1136,15 +1153,15 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0400
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0400
* @tc.name: SensorGeomagenticTest040
* @tc.name: SensorGeomagentic
AlgorithmJS
Test040
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0400
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0400
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0400---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0400
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest040 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test040 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -1156,15 +1173,15 @@ describe("SensorJsTest", function () {
...
@@ -1156,15 +1173,15 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0410
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0410
* @tc.name: SensorGeomagenticTest041
* @tc.name: SensorGeomagentic
AlgorithmJS
Test041
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0410
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0410
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0410---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0410
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest041 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test041 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -1176,15 +1193,15 @@ describe("SensorJsTest", function () {
...
@@ -1176,15 +1193,15 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0420
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0420
* @tc.name: SensorGeomagenticTest042
* @tc.name: SensorGeomagentic
AlgorithmJS
Test042
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0420
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0420
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0420 max ---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0420 max
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest042 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test042 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -1196,15 +1213,15 @@ describe("SensorJsTest", function () {
...
@@ -1196,15 +1213,15 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0430
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0430
* @tc.name: SensorGeomagenticTest043
* @tc.name: SensorGeomagentic
AlgorithmJS
Test043
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0430
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0430
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0430---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0430
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest043 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test043 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -1216,15 +1233,15 @@ describe("SensorJsTest", function () {
...
@@ -1216,15 +1233,15 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0440
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0440
* @tc.name: SensorGeomagenticTest044
* @tc.name: SensorGeomagentic
AlgorithmJS
Test044
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0440
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0440
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0440---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0440
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest044 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test044 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -1236,19 +1253,19 @@ describe("SensorJsTest", function () {
...
@@ -1236,19 +1253,19 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0450
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0450
* @tc.name: SensorGeomagenticTest045
* @tc.name: SensorGeomagentic
AlgorithmJS
Test045
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
'
Geomagentic_Sensor_Test
0450
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0450
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0450---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0450
------------------
'
);
for
(
var
i
=
0
;
i
<
GEOMAGNETIC_COORDINATES
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
GEOMAGNETIC_COORDINATES
.
length
;
i
++
)
{
await
sensor
.
getGeomagneticField
({
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
GEOMAGNETIC_COORDINATES
[
i
][
0
],
'
latitude
'
:
GEOMAGNETIC_COORDINATES
[
i
][
0
],
'
longitude
'
:
GEOMAGNETIC_COORDINATES
[
i
][
1
],
'
altitude
'
:
GEOMAGNETIC_COORDINATES
[
i
][
2
]
'
longitude
'
:
GEOMAGNETIC_COORDINATES
[
i
][
1
],
'
altitude
'
:
GEOMAGNETIC_COORDINATES
[
i
][
2
]
},
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest045 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test045 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -1267,15 +1284,15 @@ describe("SensorJsTest", function () {
...
@@ -1267,15 +1284,15 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0460
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0460
* @tc.name: SensorGeomagenticTest046
* @tc.name: SensorGeomagentic
AlgorithmJS
Test046
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0460
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0460
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0460---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0460
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
MAX_VALUE
,
'
altitude
'
:
0
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
MAX_VALUE
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest046 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test046 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -1287,15 +1304,15 @@ describe("SensorJsTest", function () {
...
@@ -1287,15 +1304,15 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0470
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0470
* @tc.name: SensorGeomagenticTest047
* @tc.name: SensorGeomagentic
AlgorithmJS
Test047
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0470
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0470
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0470---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0470
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest047 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test047 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -1307,15 +1324,15 @@ describe("SensorJsTest", function () {
...
@@ -1307,15 +1324,15 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0480
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0480
* @tc.name: SensorGeomagenticTest048
* @tc.name: SensorGeomagentic
AlgorithmJS
Test048
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0480
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0480
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0480---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0480
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest048 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test048 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -1327,15 +1344,15 @@ describe("SensorJsTest", function () {
...
@@ -1327,15 +1344,15 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0490
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0490
* @tc.name: SensorGeomagenticTest049
* @tc.name: SensorGeomagentic
AlgorithmJS
Test049
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0490
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0490
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0490---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0490
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest049 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test049 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -1347,15 +1364,15 @@ describe("SensorJsTest", function () {
...
@@ -1347,15 +1364,15 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0500
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0500
* @tc.name: SensorGeomagenticTest050
* @tc.name: SensorGeomagentic
AlgorithmJS
Test050
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0500
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0500
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0500---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0500
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest050 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test050 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
@@ -1367,15 +1384,15 @@ describe("SensorJsTest", function () {
...
@@ -1367,15 +1384,15 @@ describe("SensorJsTest", function () {
})
})
/*
/*
* @tc.number:
Geomagentic_Sensor_Test
0510
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0510
* @tc.name: SensorGeomagenticTest051
* @tc.name: SensorGeomagentic
AlgorithmJS
Test051
* @tc.desc:verify app info is not null
* @tc.desc:verify app info is not null
*/
*/
it
(
"
Geomagentic_Sensor_Test
0510
"
,
0
,
async
function
(
done
)
{
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0510
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0510---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0510
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
timeMillis
[
0
]).
then
((
data
)
=>
{
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest051 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test051 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录