有高手知道如何把高通CDMA模块中的时间戳转换为具体的时间吗?
------解决方案--------------------------------------------------------
一、Time Stamp的结构描述
|-----------48 bits-------------||------16 bits------|
1.25 ms counter 1/32 chip counter
The 1.25 ms counter has ~11 K years of dynamic range. The 1/32 chip counter has 1.25 ms dynamic range. It rolls over at count 49152.
The DMSS gets the current time from the Sync channel of a CDMA cell. Until such time as this occurs, any time stamp received from the DMSS will be counting from Jan 6, 1980 (the start of GPS time). This is useful for relative timing but not for absolute time.
从上结构描述内容中,看出下面几点:
1、Time Stamp总共占8个字节,而前面6个字节为时间计数部分,后面后码片计数部分;
2、前面6个字节部分是以1.25ms为单位进行计数的,即每过1.25ms则该部分计一次数;
3、时间是以1980年1月6日为准开始计数;
4、要获得当前确切测试时间,则只需要对Time Stamp参数的前6个参数进行拆解计算;
5、最后就是,计算出来的时间值是UTC的,换算成北京时间还要加8个时差。