- 設定 enable/disable 放在 Settings.system 中
- 應該由 Location Service 讀取內容,負責動作。
可以增加 interface (?),讓 service 告知 gps driver 收到 gps time nmea data 時,set system time。
也可以 service 自己作,當取得 nmea time data 時,依照 Setting 內容決定。
要sync system time 的時機:
- 改 Auto Sync 設定時
- GPS lock 時
但是要確認 gps driver , check lock 的時間,要比 server 啟動, check system setting 的後面才行。
否則就會不同步。
直接把 GPS NMEA Channel cat 出來.. (只列出 GPRMC)..並且修改 location data.. (所以 checksum 是錯的)
$GPRMC,080058.000,A,2502.9061,N,14122.4832,E,0.00,0.00,090212,,,A*6x
$GPRMC,080100.000,A,2502.9061,N,14122.4832,E,0.00,0.00,090212,,,A*6x
$GPRMC,080101.000,A,2502.9061,N,14122.4832,E,0.00,0.00,090212,,,A*6x
$GPRMC,080102.000,A,2502.9061,N,14122.4832,E,0.00,0.00,090212,,,A*6x
GPRMC format : (http://aprs.gids.nl/nmea/#rmc)eg1. $GPRMC,081836,A,3751.65,S,14507.36,E,000.0,360.0,130998,011.3,E*62 eg2. $GPRMC,225446,A,4916.45,N,12311.12,W,000.5,054.7,191194,020.3,E*68 225446 Time of fix 22:54:46 UTC A Navigation receiver warning A = OK, V = warning 4916.45,N Latitude 49 deg. 16.45 min North 12311.12,W Longitude 123 deg. 11.12 min West 000.5 Speed over ground, Knots 054.7 Course Made Good, True 191194 Date of fix 19 November 1994 020.3,E Magnetic variation 20.3 deg East *68 mandatory checksumGPS FIX 的資料是在 $GPGGA - Global Positioning System Fix Data (http://aprs.gids.nl/nmea/)
eg2. $--GGA,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x,xx,x.x,x.x,M,x.x,M,x.x,xxxx hhmmss.ss = UTC of position llll.ll = latitude of position a = N or S yyyyy.yy = Longitude of position a = E or W x = GPS Quality indicator (0=no fix, 1=GPS fix, 2=Dif. GPS fix) xx = number of satellites in use x.x = horizontal dilution of precision x.x = Antenna altitude above mean-sea-level M = units of antenna altitude, meters x.x = Geoidal separation M = units of geoidal separation, meters x.x = Age of Differential GPS data (seconds) xxxx = Differential reference station ID其中 'GPS Quality indicator' 就是 FIX 的狀態..
實際的資料: (pull-out gps antenna):
$GPGGA,000935.066,0000.0000,N,00000.0000,E,0,00,,0.0,M,0.0,M,,0000*4C
$GPGGA,000936.064,0000.0000,N,00000.0000,E,0,00,,0.0,M,0.0,M,,0000*4D
$GPGGA,000938.066,0000.0000,N,00000.0000,E,0,00,,0.0,M,0.0,M,,0000*41
$GPGGA,000940.075,0000.0000,N,00000.0000,E,0,00,,0.0,M,0.0,M,,0000*4C
$GPGGA,000941.065,0000.0000,N,00000.0000,E,0,00,,0.0,M,0.0,M,,0000*4C
沒有留言:
張貼留言