第一范文网 - 专业文章范例文档资料分享平台

android GPS架构分析

来源:用户分享 时间:2025/6/7 18:18:57 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

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位置信息

搜索更多关于: android GPS架构分析 的文档
android GPS架构分析.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c1dtaw5ow3s85bn78adgm_1.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top