主题 : Andoid2.3 车载导航(附HAL源码,及移植分析) 复制链接 | 浏览器收藏 | 打印
咕唧咕唧
级别: 侠客
UID: 30422
精华: 1
发帖: 114
金钱: 620 两
威望: 124 点
贡献值: 1 点
综合积分: 248 分
注册时间: 2010-10-16
最后登录: 2016-05-27
楼主  发表于: 2013-05-01 18:38

 Andoid2.3 车载导航(附HAL源码,及移植分析)

管理提醒: 本帖被 xoom 执行加亮操作(2013-05-02)
    由于友善只提供了GPS驱动模块,并无源码,不知道是否跟我GPS模块有关,经测试友善的驱动并未完整解析GPS数据,因此上层应用只能获得经纬度,精度,UTC时间。这样就只能在google地图,百度地图类似于这样应用提供定位。由于HAL无法返回卫星状态数据(可见卫星数,可用卫星数,卫星信号强度等),导致无法使用专业的GPS导航软件。

    下面提供的源码是根据gps_qemu.c修改而来的,实现GPS关键数据解析,支持凯立德,道道通等导航软件。

    GPS模块是从X宝上花一百块钱买的,除了搜星速度略慢,其它性能都不错。

HAL源码,及移植分析:
本部分内容设定了隐藏,需要回复后才能看到


分别使用GPS_Test_Plus_1.2.1和凯立德测试GPS。

凯立德测试:






GPS_Test_Plus_1.2.1 测试:




[ 此帖被liukunmcu在2013-05-02 11:30重新编辑 ]
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2013-05-02 06:35
干的不错,谢谢分享:)
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2013-05-02 08:57
只有一点很好奇,Android上层是怎么知道要加载一个叫"gps.lk.so"的HAL模块而不是别的什么名字的?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2013-05-02 18:03
引用第14楼liukunmcu于2013-05-02 15:32发表的  :

事实上,又是我出错了,抱歉,加载的模块名应该是gps.default.so ,其它的名字很可能导致上层加载不了这个模块,导致出现GPS off。我已经修改.mk了,源码也做了些修改,资源重新上传了。 貌似暂时还没通过审核,通过审核立马更新链接。

也许你可以看一下hardware/libhardware/hardware.c里的hw_get_module()函数。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."