You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.5 KiB
41 lines
1.5 KiB
|
6 months ago
|
#include <memory>
|
||
|
|
#include "S3315.h"
|
||
|
|
#include <cmath>
|
||
|
|
#include <cstring>
|
||
|
|
#include <iostream>
|
||
|
|
#include < iomanip >
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @brief
|
||
|
|
* 根据密位返回角度
|
||
|
|
*
|
||
|
|
* @param mil 密位
|
||
|
|
* @param mil_type 6000
|
||
|
|
*
|
||
|
|
* @return 返回当前密位对应的角度
|
||
|
|
*/
|
||
|
|
float calc_fov_by_mil(float mil, int mil_type)
|
||
|
|
{
|
||
|
|
return (mil * 360.0f / mil_type);
|
||
|
|
}
|
||
|
|
|
||
|
|
void S3315GetImagePara(unsigned char* pParamDataBuffer, ARIDLL_INPUTPARA* ImagePara)
|
||
|
|
{
|
||
|
|
ST_3315_152_NO110 pParamNO110DataBuffer = { 0 };
|
||
|
|
ST_3315_152_NO149 pParamNO149DataBuffer = { 0 };
|
||
|
|
//unsigned char* IR_para = { 0 };
|
||
|
|
//memcpy(IR_para, pParamDataBuffer, 1280);
|
||
|
|
//memcpy(&pParamNO110DataBuffer, pParamDataBuffer + 1280, 640);
|
||
|
|
// memcpy(&pParamNO149DataBuffer, pParamDataBuffer + 1920, 640);
|
||
|
|
//ImagePara->stServoInfo.fServoAz = calc_fov_by_mil(pParamNO149DataBuffer.B1B0,6000);
|
||
|
|
//ImagePara->stServoInfo.fServoPt = calc_fov_by_mil(pParamNO149DataBuffer.B3B2,6000);
|
||
|
|
//std::cout << std::hex << std::setw(8) << "pParamDataBuffer" << std::setfill('0') << reinterpret_cast<std::uintptr_t>(pParamDataBuffer) << ": " ;
|
||
|
|
//for (int i = 0; i < 21; ++i)
|
||
|
|
//{
|
||
|
|
// std::cout << std::hex << std::setw(4) << std::setfill('0') << static_cast<int>(pParamDataBuffer[i]) << " " ;
|
||
|
|
//}
|
||
|
|
//std::cout << std::endl;
|
||
|
|
//int w = uint8_t(pParamDataBuffer[20]);
|
||
|
|
//ImagePara->stServoInfo.fServoAz = pParamDataBuffer[258];
|
||
|
|
//ImagePara->stServoInfo.fServoPt = pParamDataBuffer[259];
|
||
|
|
}
|