以前想找沒找到的資料
使用適當的初始化語句和控制命令,可以使搜星速度大大加快,且可以降低很多功耗。
在設計低功耗儀器的時候會用得到。
對於目前設計的儀器,是步行測量的,移動速度很慢,所以更新時間由1秒改為10秒,就可降低功耗,畢竟使用電池的裝置,電力還是很緊張的。若是在高速運動的交通工具上面使用GPS,更新時間0.1秒為宜。
=================================================
$PSRF104複位指令(主機輸出):
$PSRF104,<緯度位移>,<經度位移>,<高度偏
移>,<時鐘補償>,<GPS秒/周>,<GPS周>,<頻道>,<複位選
項>*<校正和><CR><LF>
<緯度位移> 範圍90到-90度,GPS定位準確的預設可為0。
<經度位移> 範圍180到-180度,GPS定位準確的預設可為0。
<高度位移> GPS定位準確的預設可為0。
<時鐘補償> 為0時則調用上次儲存的資料,預設為96000。
<GPS秒/周> 預設為237759。
<GPS周> 這個參數可能用處不是很大,我這裡串口**出來的資料為922。
<頻道> GPS所用的頻道,範圍0到12。預設可為12。
<複位選項> 1=暖開機,所有資料均有效 2=暖啟動,星曆清除 3=暖啟動,星曆清除並載入初始化資料
4=冷啟動,清除記憶體所有的資料 8=清除記憶體中所有的資料並複位GPS回到出廠狀態。
例子:暖開機、暖啟動、冷啟動
$PSRF104,0,0,0,96000,237759,922,12,1*2B<CR><LF>
$PSRF104,0,0,0,96000,237759,922,12,2*28<CR><LF>
$PSRF104,0,0,0,96000,237759,922,12,4*2E<CR><LF>
===================================================================================
凱立德幾秒鐘內搜星定位的終極探討(其他方法可能是錯誤的)
原作者:coolrunner
有一篇文章“關於凱立德不同版本出現搜星慢和跳星問題”,該文探討瞭解決方法,我感覺修改COM4的方法是正確的,但修改96000是錯的,因為96000是時間補償,不是GPS傳輸速率,故該方法只在COM連接埠錯誤時有改善,對搜星慢和跳星應該沒有明顯改善。
我
提供一個最終解決方案,供大家參考(我自己修改後無論是初次開機還是以後每次啟動,都可在幾乎3秒鐘之內定位):用UEDIT以十六進位方式開啟
pnavi.dll或者navione.dll(不同凱立德版本開啟的程式不同),搜尋到$PSRF104(也即前文修改96000的同一位置),你會看
到凱立德啟動GPS時所用的指令
“$PSRF104,0,0,0,96000,237759,922,12,4*2E<CR><LF>”,其中4*2E表明首次
啟動GPS時用冷啟動,但我懷疑可能凱立德每次啟動GPS時都是用冷啟動,故每次搜星定位速度都很慢,而且還會清除QuickGPS資料,因此,我將冷啟
動修改為暖開機,即將前述的4*2E修改為1*2B,儲存檔案。OK!大功告成!
試用一下修改後的凱立德,搜星定位速度超快,幾乎都在兩三秒鐘內(記得在初次開機前更新QUICK GPS資料)。
另
外,我DIY的WM
6.1ROM中調整了一些GPS參數,主要是減小GPS緩衝區大小、POLL間隔改為100毫秒(即每秒10次,此項修改可能更耗電,但的確很有意義,尤
其行車到三岔路口時可及時導航,因為我理解導航軟體對GPS資料的處理與GPS硬體接收資料的頻率可能不完全同步,因此將POLL間隔設為每秒讀一次時理
論上可行,但事實上因資料丟失、CPU速度、軟體設計等原因會導致資料滯後)、使用QUICKGPS但不使用AGPS(個人覺得AGPS意義不大)、傳輸速率
率改為115200(很多人說此項修改無意義,但感覺上還是有點兒區別,也可能僅僅是感覺,沒有科學依據),供大家參考:
[HKEY_LOCAL_MACHINE/System/CurrentControlSet/GPS Intermediate Driver/Multiplexer]
"MaxBufferSize"=dword:200
[HKEY_LOCAL_MACHINE/System/CurrentControlSet/GPS Intermediate Driver/Drivers]
"SleepOnNoData"=dword:64
"OutputBufferSize"=dword:100
"InputBufferSize"=dword:100
[HKEY_LOCAL_MACHINE/System/CurrentControlSet/GPS Intermediate Driver/Drivers/GPSOneDevice]
"PollInterval"=dword:64
[HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/explorer]
"gpsbaud"="115200"
[HKEY_LOCAL_MACHINE/Software/HTC/SUPL AGPS]
"GPSMode"=dword:0
"EnableAGPS"=dword:0
此外,我的凱立德的GPS設定為COM4,115200
附件用於凱立德 P0902-T3106-17B1J04版本,其他版本的不要下載,請自行修改。
本方法原理是修改導航軟體中的GPS指令,應該可用於靈圖等其他導航軟體吧。
===================================================================================
具體資料可參考SIRF公司的《NMEA Reference Manual》資料。
下面摘抄幾段,供大家參考:
104—LLANavigationInitialization
This command is used to cause a restart of the
receiver, and to specify the type of restart. Optionally, it may also
initialize position (in lattitude, longitude, and altitude), clock
drift, GPS Time Of Week and GPS Week Number.
This
enables the receiver to search for the correct satellite signals at the
correct signal parameters. Correct initialization parameters enable the
receiver to quickly acquire signals.
150—OkToSend
This message is sent out during power-saving modes
such as TricklePowerTM and Push-to-FixTM to indicate when the receiver
is ready to receive messages or when it is going into low-power mode.
When power is restored, it is the first message sent, and when power is
going to be reduced, it is the last message sent.
Table 1-15 contains the values for the following examples:
1.OkToSend
$PSRF150,1*3F
2.not OkToSend
$PSRF150,0*3E
Advanced Power Management (APM) Considerations for SSIII
Advanced Power Management - Message ID 53
Used to implement Advanced Power Management (APM). APM will not engage until
all information is received.
Example:
The following example sets the receiver to operate in APM mode with 0 cycles before
sleep (continuous operation), 20 seconds between fixes, 50% duty cycle, a time
between fixes priority, and no preference for accuracy.
A0A2000C—Start Sequence and Payload Length
3501001400030700000A0100—Payload
005FB0B3—Message Checksum and End Sequence
詳見說明書2-3頁,
Set TricklePower Parameters - Message ID 151
Table 2-36 contains the input values for the following example:
Sets the receiver into low power modes.
Example: Set receiver into TricklePower at 1 Hz update and 200 ms on-time.
A0A20009—Start Sequence and Payload Length
97000000C8000000C8—Payload
0227B0B3—Message Checksum and End Sequence
詳見說明書2-19頁,
Push-to-Fix
In this mode the receiver will turn on every cycle period to perform a system update
consisting of an RTC calibration and satellite ephemeris data collection if required
(i.e., a new satellite has become visible) as well as all software tasks to support Snap
Start in the event of an NMI (Non-Maskable Interrupt). Ephemeris collection time in
general takes 18 to 36 seconds. If ephemeris data is not required then the system will
re-calibrate and shut down. In either case, the amount of time the receiver remains off
will be in proportion to how long it stayed on:
Off period = On Period*(1-Duty Cycle)
Duty Cycle
The off period has a possible range between 10 and 7200 seconds. The default is 1800
seconds. Push-to-Fix cycle period is set using message MID 167.
詳見說明書2-20頁。
Set Low Power Acquisition Parameters - Message ID 167
詳見說明書2-23頁。