gpt4 book ai didi

swift - TI SensorTag 2 CC2650 服务计算(IR 温度 - MPU9250)

转载 作者:行者123 更新时间:2023-11-30 14:01:45 25 4
gpt4 key购买 nike

如何计算 CC2650 中的红外温度。

TI 温度:F000AA00-0451-4000-B000-000000000000

温度数据:f000aa01-0451-4000-b000-000000000000

我尝试根据温度数据特征中的数据计算对象和环境。物体数据高于 TI 应用中显示的红外温度。

Swift 代码:

 static func calculateObjectAndAmbient(objectRaw:Int16, ambientRaw:Int16) -> (Double, Double)
{
let ambient = Double(ambientRaw)/128.0;
let vObj2 = Double(objectRaw)*0.00000015625;
let tDie2 = ambient + 273.15;
let s0 = 6.4*pow(10,-14);
let a1 = 1.75*pow(10,-3);
let a2 = -1.678*pow(10,-5);
let b0 = -2.94*pow(10,-5);
let b1 = -5.7*pow(10,-7);
let b2 = 4.63*pow(10,-9);
let c2 = 13.4;
let tRef = 298.15;
let s = s0*(1+a1*(tDie2 - tRef)+a2*pow((tDie2 - tRef),2));
let vOs = b0 + b1*(tDie2 - tRef) + b2*pow((tDie2 - tRef),2);
let fObj = (vObj2 - vOs) + c2*pow((vObj2 - vOs),2);
let object = pow(pow(tDie2,4) + (fObj/s),0.25) - 273.15;
return (object, ambient)
}

我也想计算MPU9250服务数据。

服务=“F000AA80-0451-4000-B000-000000000000”

特征数据=“F000AA81-0451-4000-B000-000000000000”

特征配置=“F000AA82-0451-4000-B000-000000000000”

有说明书吗?我想访问陀螺仪、加速度、磁力、数据。

对不起我的英语。

提前谢谢您。

最佳答案

CC2650 中更改了对象和环境的计算。

如果有人需要的话,这里有新的快速计算;

   static func calculateObjectAndAmbient(objectRaw:Int16, ambientRaw:Int16) -> (Double, Double)
{
let SCALE_LSB = 0.03125;
let a = objectRaw >> 2;
let Obj = Double(a) * SCALE_LSB

let b = ambientRaw >> 2;
let Amb = Double(b) * SCALE_LSB
return (Obj, Amb)
}

更多详细信息:sensortag2015

更多详细信息:TI Wiki

关于swift - TI SensorTag 2 CC2650 服务计算(IR 温度 - MPU9250),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32916594/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com