没有合适的资源?快使用搜索试试~ 我知道了~
androidGPS架构分析推荐.pdf
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 37 浏览量
2022-01-31
16:11:36
上传
评论
收藏 193KB PDF 举报
温馨提示
试读
23页
androidGPS架构分析推荐.pdf
资源推荐
资源详情
资源评论
Android 系统 Gps分析
1,GPS架构:
2,GPS分析:
2.1 头文件:
头文件定 义在
头文件定义在: hardware/libhardware/include/hardware/gps.h ,定义了 GPS底层相关
的结构体和接口:
1,GpsLocation
:
GPS
位置信息结构体,包含经度,纬度,高度,速度,方位角等
.
typedef struct {
/** set to sizeof(GpsLocation) */
size_t size;
/** Contains GpsLocationFlags bits. */
uint16_t flags;
/** Represents latitude in degrees. */
double latitude;
/** Represents longitude in degrees. */
double longitude;
/** Represents altitude in meters above the WGS 84 reference
* ellipsoid. */
double altitude;
/** Represents speed in meters per second. */
float speed;
/** Represents heading in degrees. */
float bearing;
/** Represents expected accuracy in meters. */
float accuracy;
/** Timestamp for the location fix. */
GpsUtcTime timestamp;
} GpsLocation;
2,GpsStatus:GPS
状态包括
5
种状态,分别为未知,正在定位,停止定位,启动未定义,未启动。
typedef struct {
/** set to sizeof(GpsStatus) */
size_t size;
GpsStatusValue status;
} GpsStatus;
3
,
GpsSvInfo:GPS
卫星信息,包含卫星编号,信号强度,卫星仰望角,方位角等。
typedef struct {
/** set to sizeof(GpsSvInfo) */
size_t size;
/** Pseudo-random number for the SV. */
int prn;
/** Signal to noise ratio. */
float snr;
/** Elevation of SV in degrees. */
float elevation;
/** Azimuth of SV in degrees. */
float azimuth;
} GpsSvInfo;
4
,
GpsSvStatus
:
GPS
卫星状态,包含可见卫星数和信息,星历时间,年历时间等。
typedef struct {
/** set to sizeof(GpsSvStatus) */
size_t size;
/** Number of SVs currently visible. */
int num_svs;
/** Contains an array of SV information. */
GpsSvInfo sv_list[GPS_MAX_SVS];
/** Represents a bit mask indicating which SVs
* have ephemeris data.
*/
uint32_t ephemeris_mask;
/** Represents a bit mask indicating which SVs
* have almanac data.
*/
uint32_t almanac_mask;
/**
* Represents a bit mask indicating which SVs
* were used for computing the most recent position fix.
*/
uint32_t used_in_fix_mask;
} GpsSvStatus;
5
,
GpsCallbacks:
/** Callback with location information.
* Can only be called from a thread created by create_thread_cb.
*/
typedef void (* gps_location_callback)(GpsLocation* location);
//
向上层传递
GPS
位置信息
/** Callback with status information.
* Can only be called from a thread created by create_thread_cb.
*/
typedef void (* gps_status_callback)(GpsStatus* status);
//
向上层传递
GPS
状态信息
/** Callback with SV status information.
* Can only be called from a thread created by create_thread_cb.
*/
typedef void (* gps_sv_status_callback)(GpsSvStatus* sv_info);
//
向上层传递
GPS
卫星信息
/** Callback for reporting NMEA sentences.
* Can only be called from a thread created by create_thread_cb.
*/
typedef void (* gps_nmea_callback)(GpsUtcTime timestamp, const char* nmea, int
length);
//
向上层传递
NMEA
数据
/** Callback to inform framework of the GPS engine's capabilities.
* Capability parameter is a bit field of GPS_CAPABILITY_* flags.
*/
typedef void (* gps_set_capabilities)(uint32_t capabilities);//
告知
GPS
模块可以实
现的功能
/** Callback utility for acquiring the GPS wakelock.
剩余22页未读,继续阅读
资源评论
csh18750931974
- 粉丝: 0
- 资源: 8万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功