Skip to content

定位传感器(GPS) GPS


GetGps

bool GetGps(const char *mainVehicleId, SimOne_Data_Gps *pGps)

获取主车GPS信息.
Get main vehicle GPS

Parameters:

名称 类型 说明
mainVehicleId const char * 主车的ID
Id of the main vehicle
pGps SimOne_Data_Gps * GPS消息 GPS data

Returns:

类型 说明
bool 如果成功获取GPS数据,则返回true,否则返回false
Returns true if the GPS data is successfully retrieved, false otherwise

SetGpsUpdateCB

bool SetGpsUpdateCB(void(*cb)(const char *mainVehicleId, SimOne_Data_Gps *pGps))

注册主车GPS更新回调.
Register callback function of applying for GPS information.

Parameters:

名称 类型 说明
cb void(*)(const char *mainVehicleId, SimOne_Data_Gps *pGps) 获取主车GPS信息的回调函数
GPS data update callback function

Returns:

类型 说明
bool 如果注册回调函数成功,则返回true,否则返回false
Returns true if the callback registration is successful, false otherwise.