Revise longitude and latitude units to unify to degrees and meters

This commit is contained in:
AiYangSky 2023-12-04 10:00:32 +08:00
parent 02bca32ea4
commit ad54f95313
1 changed files with 26 additions and 26 deletions

View File

@ -3,7 +3,7 @@
* @Author: L LC @amov * @Author: L LC @amov
* @Date: 2023-11-02 17:50:26 * @Date: 2023-11-02 17:50:26
* @LastEditors: L LC @amov * @LastEditors: L LC @amov
* @LastEditTime: 2023-11-28 11:46:28 * @LastEditTime: 2023-12-04 09:56:21
* @FilePath: /SpireCV/gimbal_ctrl/driver/src/GX40/GX40_gimbal_funtion.cpp * @FilePath: /SpireCV/gimbal_ctrl/driver/src/GX40/GX40_gimbal_funtion.cpp
*/ */
#include <string.h> #include <string.h>
@ -126,9 +126,9 @@ uint32_t GX40GimbalDriver::setVideo(const amovGimbal::AMOV_GIMBAL_VIDEO_T newSta
* sizeof(amovGimbal::AMOV_GIMBAL_VELOCITY_T), and sizeof(amovGimbal::AMOV_GIMBAL_VELOCITY_T). * sizeof(amovGimbal::AMOV_GIMBAL_VELOCITY_T), and sizeof(amovGimbal::AMOV_GIMBAL_VELOCITY_T).
*/ */
uint32_t GX40GimbalDriver::attitudeCorrection(const amovGimbal::AMOV_GIMBAL_POS_T &pos, uint32_t GX40GimbalDriver::attitudeCorrection(const amovGimbal::AMOV_GIMBAL_POS_T &pos,
const amovGimbal::AMOV_GIMBAL_VELOCITY_T &seppd, const amovGimbal::AMOV_GIMBAL_VELOCITY_T &seppd,
const amovGimbal::AMOV_GIMBAL_VELOCITY_T &acc, const amovGimbal::AMOV_GIMBAL_VELOCITY_T &acc,
void *extenData) void *extenData)
{ {
carrierStateMutex.lock(); carrierStateMutex.lock();
carrierPos = pos; carrierPos = pos;
@ -239,11 +239,11 @@ uint32_t GX40GimbalDriver::setGNSSInfo(float lng, float lat, float alt, uint32_t
carrierStateMutex.lock(); carrierStateMutex.lock();
carrierGNSS.head = 0X01; carrierGNSS.head = 0X01;
carrierGNSS.lng = lng; carrierGNSS.lng = lng / 1E-7;
carrierGNSS.lat = lat; carrierGNSS.lat = lat / 1E-7;
carrierGNSS.alt = alt; carrierGNSS.alt = alt / 1E-3;
carrierGNSS.relAlt = relAlt; carrierGNSS.relAlt = relAlt / 1E-3;
carrierGNSS.nState = nState; carrierGNSS.nState = nState;
carrierStateMutex.unlock(); carrierStateMutex.unlock();