GPS GPS GPS GPS GPS

Similar documents
2005年度卒業論文

Tokyo University of Marine Science and Technology Laboratory of Satellite Navigation Engineering Tokyo University of Marine Science and Technology GNS

untitled

GPS GPS(Global Positioning System) GPS GPS 1 GPS GPS GPS I II 1994 ( 1991 ) 1

Keysight Technologies GPSレシーバ・テスト

最 新 測 量 学 ( 第 3 版 ) サンプルページ この 本 の 定 価 判 型 などは, 以 下 の URL からご 覧 いただけます. このサンプルページの 内 容 は, 第 3 版 1 刷 発 行 時 の

数値計算:フーリエ変換

1 s(t) ( ) f c : A cos(2πf c t + ϕ) (AM, Amplitude Modulation) (FM, Frequency Modulation) (PM, Phase Modulation) 2

CWContinuous Wave CW XCT(Computed Tomography) MRI Magnetic Resonance Imaging)PET(Positron Emission Tomography) XCT 2

GPS 1 2 GPS 29 GPS II IIA IIR 3 2 km GPS GPS 3 ID GPS 4 GPS GPS X Y GPS 1575:42 MHz L1 C/A coarse/acquisition code C/A SPS; standard po- 1:

A Study of Adaptive Array Implimentation for mobile comunication in cellular system GD133

Microsoft PowerPoint - 山形大高野send ppt [互換モード]

untitled

main.dvi

完成卒論.PDF


ADC121S Bit, ksps, Diff Input, Micro Pwr Sampling ADC (jp)

2007-Kanai-paper.dvi

2.2 h h l L h L = l cot h (1) (1) L l L l l = L tan h (2) (2) L l 2 l 3 h 2.3 a h a h (a, h)

IEEE ZigBee 2.4GHz 250kbps O-QPSK DSSS Bluetooth IEEE GHz 3Mbps G-FSK FHSS PC LAN IEEE b 2.4GHz 11Mbps CCK DSSS LAN LAN IEE

2: 3: A, f, φ f(t = A sin(2πft + φ = A sin(ωt + φ ω 2πf 440Hz A ( ( 4 ( 5 f(t = sin(2πf 1t + sin(2πf 2 t = 2 sin(2πt(f 1 + f 2 /2 cos(2πt(f 1 f

<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202E646F63>

impulse_response.dvi

keisoku01.dvi

A大扉・騒音振動.qxd

untitled

x A Aω ẋ ẋ 2 + ω 2 x 2 = ω 2 A 2. (ẋ, ωx) ζ ẋ + iωx ζ ζ dζ = ẍ + iωẋ = ẍ + iω(ζ iωx) dt dζ dt iωζ = ẍ + ω2 x (2.1) ζ ζ = Aωe iωt = Aω cos ωt + iaω sin

,, 2. Matlab Simulink 2018 PC Matlab Scilab 2

SIP SDP(Session Description Protocol) RTSP(Real-time Streaming Protocol) RTP(Real-time Transport Protocol) IP 1 [1] 1: IP RTP(Real-Time RFC1889 Transf

5988_3484JA.ppt

1. ( ) 1.1 t + t [m]{ü(t + t)} + [c]{ u(t + t)} + [k]{u(t + t)} = {f(t + t)} (1) m ü f c u k u 1.2 Newmark β (1) (2) ( [m] + t ) 2 [c] + β( t)2

Note.tex 2008/09/19( )

untitled

スライド 1

スライド タイトルなし

PowerPoint プレゼンテーション

<4D F736F F D B B BB2D834A836F815B82D082C88C602E646F63>


AD

5988_4096JA.qxd

[1.1] r 1 =10e j(ωt+π/4), r 2 =5e j(ωt+π/3), r 3 =3e j(ωt+π/6) ~r = ~r 1 + ~r 2 + ~r 3 = re j(ωt+φ) =(10e π 4 j +5e π 3 j +3e π 6 j )e jωt

デジタル通信を支える無線技術

( )

untitled

振動と波動

IS-QZSS サブメータ級測位補強サービス / 災害 危機管理通報サービス編 (IS-QZSS-L1S-001) の構成 Page 1 Quasi-Zenith Satellite System Services Inc. 2015

A.2 DGPS MSAS A.2.1 GPS GPS GPS GPS diãerentialgps;dgps GPS GPS DGPS local-area diãerential GPS: LADGPS 100 km DGPS DGPS wide-area di

橡実験IIINMR.PDF

Microsoft PowerPoint - ⑥説明者(太刀川).ppt

( ) : 1997


untitled

24.15章.微分方程式

高速データ変換

. (.8.). t + t m ü(t + t) + c u(t + t) + k u(t + t) = f(t + t) () m ü f. () c u k u t + t u Taylor t 3 u(t + t) = u(t) + t! u(t) + ( t)! = u(t) + t u(

UWB a) Accuracy of Relative Distance Measurement with Ultra Wideband System Yuichiro SHIMIZU a) and Yukitoshi SANADA (Ultra Wideband; UWB) UWB GHz DLL

単位、情報量、デジタルデータ、CPUと高速化 ~ICT用語集~

Keysight Technologies フィールドにおけるRF/マイクロ波の干渉問題をリアルタイム・スペクトラム・アナライザ(RTSA)で解決する方法

[] x < T f(x), x < T f(x), < x < f(x) f(x) f(x) f(x + nt ) = f(x) x < T, n =, 1,, 1, (1.3) f(x) T x 2 f(x) T 2T x 3 f(x), f() = f(t ), f(x), f() f(t )

1 I p2/30

1. (8) (1) (x + y) + (x + y) = 0 () (x + y ) 5xy = 0 (3) (x y + 3y 3 ) (x 3 + xy ) = 0 (4) x tan y x y + x = 0 (5) x = y + x + y (6) = x + y 1 x y 3 (


untitled

1

fx-3650P_fx-3950P_J

CDMA (high-compaciton multicarrier codedivision multiple access: HC/MC-CDMA),., HC/MC-CDMA,., 32.,, 64. HC/MC-CDMA, HC-MCM, i

ρ ( ) sgv + ρwgv γ sv + γ wv γ s + γ w e e γ ρ g s s γ s ( ) + γ w( ) Vs + V Vs + V + e + e + e γ γ sa γ e e n( ) + e γ γ s ( n) + γ wn γ s, γ w γ γ +

P361


36.fx82MS_Dtype_J-c_SA0311C.p65

sikepuri.dvi

main.dvi


Proceedings of the 61st Annual Conference of the Institute of Systems, Control and Information Engineers (ISCIE), Kyoto, May 23-25, 2017 The Visual Se

B. 41 II: 2 ;; 4 B [ ] S 1 S 2 S 1 S O S 1 S P 2 3 P P : 2.13:

£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè11²ó – ½ÉÂꣲ¤Î²òÀ⡤±é½¬£² –

2005 1

untitled

matlab-2005.dvi

¥×¥í¥°¥é¥ß¥ó¥°±é½¬I Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~ alse

スライド 1

ウェアラブル機器を使った科学館学習支援システムに関する調査研究

) a + b = i + 6 b c = 6i j ) a = 0 b = c = 0 ) â = i + j 0 ˆb = 4) a b = b c = j + ) cos α = cos β = 6) a ˆb = b ĉ = 0 7) a b = 6i j b c = i + 6j + 8)


Part () () Γ Part ,

Microsoft PowerPoint - 02_資料.ppt [互換モード]


AN8934FA

3.300 m m m m m m 0 m m m 0 m 0 m m m he m T m 1.50 m N/ N

VHDL VHDL VHDL i


Product Data: 3053型 LAN-XI 12ch モジュール Japanese (BP2332)

untitled

(5 B m e i 2π T mt m m B m e i 2π T mt m m B m e i 2π T mt B m (m < 0 C m m (6 (7 (5 g(t C 0 + m C m e i 2π T mt (7 C m e i 2π T mt + m m C m e i 2π T

(search: ) [1] ( ) 2 (linear search) (sequential search) 1

PowerPoint Presentation

R R 16 ( 3 )

08 p Boltzmann I P ( ) principle of equal probability P ( ) g ( )g ( 0 ) (4 89) (4 88) eq II 0 g ( 0 ) 0 eq Taylor eq (4 90) g P ( ) g ( ) g ( 0

Canon Industrial Imaging Platform Vision Edition 使用説明書

ストリーミング SIMD 拡張命令2 (SSE2) を使用した SAXPY/DAXPY

Transcription:

22 GPS/QZSS 0723053

1... 4 1.1... 4 1.2... 4 1.3 GPS... 4 1.4 GPS... 6 1.5... 12 2 GPS... 16 2.1 GPS... 16 2.2 GPS... 16 2.3... 17 2.3... 18 2.4... 21 2.5... 24 2.6... 26 3 GPS... 28 3.1 DGPS... 28 3.1.1... 29 3.1.2... 29 3.1.3... 30 3.1.4... 30 3.1.5... 30 3.1.6... 30 3.2... 30 3.3... 32 3.4 DGPS... 34 3.5... 35 4 QZSS... 36 4.1 QZSS... 37 4.2 QZSS... 38 4.2.1 L1... 39 4.2.3 L5... 40 4.2.4 L1-SAIF... 40 4.2.5 LEX... 40 4.2.6... 41 3.2.7... 41 5 QZSS GNSS... 42 2

5.1... 42 5.2... 46 5.3... 49 5.4... 49 5.5 GPS GPS/QZSS... 50 5.6 GPS/QZSS... 51 5.6.1... 51 5.6.2 DGNSS... 52 5.6.3... 53... 55... 55... 55 A... 56 3

1 1.1 GPSGlobal Positioning System GPS GPS 1973 GPS NNSSNavy Navigation Satellite SystemNNSS 1964 20 NNSS GPS PC GPS GPS 2010 9 11 QZSS QZSSQZSS GPS GPS 1.2 GPS 2010 9 QZSS L1C/A 1.3 GPS Navigation Positioning GPS GPS GPS 1 GPS 1 4

1GPS 1GPS GPS DoDDepartment of Defence GPS 100m SASelective Availability SA 1996 PDD Presidential Decision Directive:10 SA 2000 5 2 SA 100m m m GPS 2430 2 km L1 1575.42MHz 5

GPS GLONASSGlobal Navigation Satellite System GALILEO 2 8 QZSS 2010 9 11 QZSS 2 QZSS 3 2QZSS 2QZSS 1.4 GPS GPS pseudo-random-noise : PRN PRN 3 6

S S L1 L2 2P D t x tcos2f c 2P Y 2 L1 D t x tsin2f t L2 L1 t L2 2P Y1 D t x tsin 2f L1 t L1 1.1 2P Dt xt cos 2ft sin 2ft GPS 3 3GPS L1 L2 f L1 1575.42MHz 1227.60MHz f L2 UHFUltra-high frequency FM VHFvery-high frequency FM GPS 3 3 1/10 AM 68010 126010 Hz AM MFmedium frequencygps 1/1000 GPS 3 f 2 f L1 7

cos 2 f t L1 L1 sin 2 f t L1 L1 90 2 c[ m/ sec] 310 [ m] f [ Hz] f 8 1.1 f GPS L1 19[ cm] 24[ L2 cm] BPSKBPSK +1-1 xt 1.5 Baseband signal 8

4BPSK C/A 2MHzPY 20MHz 5 9

5L1 PRNpseudo-random-noise -1 1 Gold C/A coarse/acquisition code PYprecision encrypted codec/a 1023 1ms 1.023MHz Mcps 300m P PRN 10 4 10.23Mcps C/A 10 30m C/A P 1 Y PRN 0 k l C/A x k x l PRN 1022 i0 x k x l i n 0, for all n, k l 1.1 PRN PY PRN PRN C/A 10

1022 i0 x k x k i n 0, for all n 1 1.2 1.2 n PRN PRN 50bps 1 1 1bit 20ms 1 1500bit 1 30 5 13 45 1 25 25 12 30 6 6 11

1.5 Spread spectrumgps/qzss Direct Sequence Spread Spectrum LAN Direct Sequence Spread Spectrum ;PNGold M Maximal Length Linear Shift Register Sequence ;GPS M XOR Gold 7 M PN m 2 m -1 GPS 1023 8 M M 31 D1Dm 12

8 M 5 M 5,2 1,1,1,1,1 31 M 11111001101001000010101110110001111100110100100001010111011000 M 9M 5 M 1 0 M 10M 13

M GPS Gold 1023 2 M Gold m 0Mod4 N 2 m 1 1023 2 M 1025 GPS Gold 2 2 M N N N N u v 2 N Gold u { u v { v m m { u S k } } N 1 m0 N 1 m0 v} N 1 m0 1.3 S k v v k u S k v { u m v mk } N 1 m0 1.4 N=31 Gold 11 M m N=31 5 2 m N 1 N 31 log m 2 2 5 m log 2 2 2 5 m 32 1.5 14

11Gold 15

2 GPS 2.1 GPS GPS RF PVT 2.2 GPS GPS 12 GPS 12GPS GPS GPS FEFront End LNALow Noise Amplifire 16

,GPS 1575.42Mhz IF A/D A/D 2.3 GPS 10 10 100dB down convert frequency down conversion 1 cos xsin x [cos x y cos x y] 2 2.1 2P C D t x t cos2 f L1 f D t 2P C D t x t cos2 f L1 f IF t IF 2P C D t x t [cos{2 2 f L1 f D f IF t IF } cos{2 2 f IF f D t IF }] 2.2 P t GPS t D C x PRN C/A f D f IF IF GPS f L1 f IF 2 2.2 2 17 f IF bandpass filter:bpf

P D t x t cos2 f f t c IF IF BPF IF D IF 2.3 L1 IF 2.3 S t l l lt P D t S c l x t, l 0,1,2,3... l cos2 f IF f D t l IF 2.4 A/D T s t l f D HD f D Acquisition 18

2cos[2 f 2sin[2 f IF IF fˆ fˆ D D t ˆ] t ˆ] 2.5 fˆ D ˆ P D t c l x t l cos[2 f D fˆ D t l ˆ] P D t c l x t l sin[2 f D fˆ D t l ˆ] 2.6 I Q P c L P D c L D L l 1 L l 1 x t l x t l x t l x t l ˆcos[2 f ˆsin[2 f D D fˆ D fˆ D t l t l ˆ] ˆ] 2.7 ˆ T s L D 1 1 2 2 I Q I Q ˆ PC FFT 19

20 13 FFT FFT 1 0 L l l t l x t x z 2.8 z k Z * 1 0 / 2 1 0 / 2 1 0 / 2 1 0 k X k X e t x e t x e t x t x k Z L L kt j L l l L kt j l L L kt j L l l l l l l 2.9 * k Z z

14FFT 2.4 GPS 2 DLLPLL DLL C/A PLL PLL PC LPF NCO 15 k d H s k o 21

22 1 0 s F k k s F k k s s s H d o d o i 2.10 s j 1 0 j F k k j F k k j j j H d o d o i 2.11 DLL earlylate 1 d=1 d=0.5 d dt c 16 earlylate 2 C/A C/A prompt NCO

2 prompt C/A 17 early late Z Z E L S S E L N N E L 2.12 S E N E S L N L xt PRN P c nt P c x t n t baseband early late 23

24 2 / 2 / ˆ 1 2 / 2 / ˆ 1 0 0 c k c c k T k c L c k c c k T k c E dt R P dt dt t x t x P T S dt R P dt dt t x t x P T S 2.13 ˆ 2.13 2.5 Prompt Ip 1 TLMTelemetry Word 1 HOWHand Over Word 1 TLM 8bit 10001011HOW 17bit TOWtime of week2022bit ID TLM HOW 18TML HOW 30bit1 6bit 23

123 n 2 n 3 1 4 2 5 3 25

1 23 ephemerisbroadcast ephemeris 6 2.6 GPS GPS GPS GPS i r i [m] i [m] [s]c [m/s] r i c i 2.14 x, y, z i x, y, z i i i i i 2 2 xi x yi y zi z 2 2.15 r i 26

r i 2 2 x x y y z z i i i 2 c 2.16 4 x, y, z, 4 4 27

3 GPS 2010 5 29 GPS DGPS GPS 19 GPS GPSFE ublox OEMV2 Reference OEM4 19 3.1 DGPS GPS DGPS GPS 2 DGPS 1 DGPS 20 28

20DGPS 6 3.1.1 GPS 10 8 3m a f 0 ~ a f 2 t T b GPS t t t t t b a T b t t 2 f 0 a f 1 t toc a f 2 t toc T DG 3.1 GPS 3km/s 10 8 A E t r 2.3 k t t t b a T f 0 b a f 1 t t t oc a f 2 t t t oc 2 t r T DG t r 2 e 2 C e A sin E k 3.2 3.1.2 GPS GPS 12m 29

3.1.3 100km GPS 3.1.4 2.5m 3.1.5 GPS 3.1.6 3.2 2 A B 2 30

21 22 c 31

dt sv1 1 dt ref P P c dt dt ion tropo mp noise sv1 ref 3.3 ion tropo mp noise sv2 sv2 P P SV1 P P sv1 sv1 ref rov ref rov SV2 P sv1 ref sv1 ref sv1 rov sv2 ref P sv2 rov noise sv1 rov c dt c dt c dt c dt sv1 ref P sv1 sv1 sv2 sv2 noise sv2 ref dt sv1 rov ref dt dt rov ref dt P sv2 rov ion rov ion ion sv1 ref ion noise sv1 rov sv2 ref sv2 ref sv2 rov tropo tropo noise sv1 ref tropo sv1 rov tropo sv 2 ref sv2 rov mp sv2 rov mp sv1 ref mp sv1 rov mp sv2 ref noise sv2 rov noise sv1 ref sv1 rov noise noise sv2 ref sv 2 rov 3.4 3.3 OEMV2 OEM4 OEMV2 ublox OEMV2 DLL 0.01Hz OEMV2 OEM4 OEMV2 ublox OEMV2 0.12m 0.30m 1.72m 32

23OEMV2 OEM4 24OEMV2 25OEMV2 ublox 25 OEMV2 ublox GPS OEMV2 GPS GPS 70ms 150ms 33

26OEMV2 3.4 DGPS DGPS GPS DGPS DGPS 0.12m0.35m1.86m 0.22m/s0.81m/s0.35m/s 27 28 27 34

28 3.5 2011 5 29 16 earlypromptlate 16.367MHz 1.1 18m c[ m / sec] 310 [ m] f [ Hz] f 6 f 16.36710 8 310 16.36710 6 18 8 3.5 4000 3000 2000 1000 0-300 -200-100 0 100 200 300 2916 35

4 QZSS QZSS GPS QZSS 1.4GPS QZSS QZSS QZS MS Monitor StationMCS Master Control StationTMS Time Management Station QZSS QZS MS MCS MS QZS MCS QZS QZS MCS 1 QZS 30QZSS 36

QZSS 6 QZS QZSS 6 4.1 QZSS QZSS PRN PRN GPS Gold PRN 193 197 QZSS 193 194 198 202 2010 11 PRN 183 PRN QZSS PRN 6QZSS 7QZSS PRN 37

4.2 QZSS QZSS QZS L1-C/A L1-SAIF L2C L5 LEX 6 L1-C/A L1C L2C L5 4 GNSS L1-SAIF LEX GNSS 8QZSS 38

4.2.1 L1 L1 L1-C/A L1C L1-SAIF L1-C/A L1C L1 L1C 2 I L1-C/A L1CD Q L1CP L1-C/AL1CDL1CP L1-C/A L1C L1C C L1-C/A C L1CD C L1CP BPSK QZSS 39

L1CD 0 L1CD 0 L1CD L1CD 180 L1CP 1 L1CP 90 L1CP 0 L1CP 90 QZSS L1CD L1CP L1CD L1-C/A 31QZSS 4.2.2 L2C L2C C L2C BPSK 2 2 C L2CM C L2CL 4.2.3 L5 L5 2 2 2 C L5I5 C L5Q5 BPSK L5 I 0 L5 I 0 L5 I 1 L5 I 180 L5 Q 1 L5 Q 90 L5 Q 0 L5 Q 90 4.2.4 L1-SAIF L1-SAIF C L1-SAIF BPSK 4.2.5 LEX LEX C LEX BPSK C LEX 2 2 C LEXS C LEXL 40

4.2.6 QZS f s QZSS f 10. 23MHz 0 f s f 1 f0 f 0 1 5.39910 10 10230000Hz 10229999.994476823Hz 4.1 6 32 IS-QZSS 3.1.32 3.2.7 L1-C/A GPS 1 30 10 1 5 1.4 GPS 41

5 QZSS GNSS QZSS QZSS Spirent 2011 1 1 8QZSS QZSS L1-C/A GPS 5.2 GPS GPSQZSS 2010 12 2 3 1ms 5.1 QZSS 2.4 FFT PRN Gold M G2 PRN 193197 193197 3337 A GPS7 PRN No.:4 8 16 19 20 21 22QZSS3 PRN No.:193 194 195 9 GPS PRN422 3346 QZSS PRN193195 47 52 53 9 42

33PRN4 34PRN4 Ip,Ie,Il 358 368 Ip,Ie,Il 3500 3000 2500 2000 1500 1000 500 0-300 -200-100 0 100 200 300 [m] 3716 3816 Ip,Ie,Il 43

3000 2500 2000 1500 1000 500 0-300 -200-100 0 100 200 300 [m] 3919 4019 Ip,Ie,Il 3000 2500 2000 1500 1000 500 0-300 -200-100 0 100 200 300 [m] 4120 4220 Ip,Ie,Il 3000 2500 2000 1500 1000 500 0-300 -200-100 0 100 200 300 [m] 4321 44PRN21 Ip,Ie,Il 44

4522 4622 Ip,Ie,Il 47PRN193 48PRN193 Ip,Ie,Il 49PRN194 50PRN194 Ip,Ie,Il 45

51PRN195 52PRN195 Ip,Ie,Il 53GUI 5.2 2.4 DLLPLL 1ms 10ms 1 30 40 40 10ms PLL DLL 46

10ms 5410ms 1ms 10ms 2010 5 31 PRN16 Ip PLL 15Hz Ip Ip 551ms Ip 5610ms Ip 571ms Ip 5810ms Ip 47

10 1ms 10ms 59 60 102010 5 31 PRN16 591ms 6010ms 48

10ms 5.3 1 Ip 1 5.4 GPS/QZSS 2011 1 1 61 62 0 100[m] GPS ECEF X Y 90 Z Y[m] 10 8 6 4 2 0-10 -8-6 -4-2 -2 0 2 4 6 8 10-4 -6-8 -10 X[m] 61 120 100 80 Z[m] 60 40 20 0 518490 518500 518510 518520 518530 518540 518550 518560 518570 GPSTime[msec] 49

62 5.5 GPS GPS/QZSS GPS GPS/QZSS GPS GPSQZSS 100[m] 6364 2010 12 2 12 20 12 3 10 35 3 2Hz GPS Y[m] 10 8 6 4 2 0-10 -8-6 -4-2 0 2 4 6 8 10-2 -4-6 GPS -8 GPS+QZS -10 X[m] Z[m] 100 90 GPS 80 GPS+QZS 70 60 50 40 30 20 10 0 357550 357600 357650 357700 357750 357800 GPSTime[msec] 632010 12 2 12 20 Y[m] 10 GPS+QZS 8 GPS 6 4 2 0-10 -8-6 -4-2 -2 0 2 4 6 8 10-4 -6-8 -10 X[m] Z[m] 80 GPS+QZSS 70 GPS 60 50 40 30 20 10 0 476800 476850 476900 476950 477000 477050 GPSTime[msec] 642010 12 3 10 35 GPSQZSS GPS 12 3 50

5.6 GPS/QZSS GPS+QZSS 3 5 29 GPS 2010 12 12 12 54 13 4 10 2 11 33 QZSS PRN 193 11 5.6.1 65 66 12 13 65 FE 121 51

66ROVER FE 131 5.6.2 DGNSS QZSS 67 14 67DGNSS 141 52

5.6.3 3.1 3.4 ru 1 ru ti ru ti M t t ru 1 ru 1 M 1 [ ru t M i1 t t ru i ru i1 ] 5.1 5.1 ru r u ru r u 5.2 10 DGNSS 53

68 10 DGNSS 151 50 SGNSS 69 10 DGNSS 161 54

QZSS DGNSS DGNSS GPSQZSS DGPSGNSS GPS+QZSS JAXA [1] GPS 2007.12 55

A 1.1 GPS QZSS C/A generatecacode.cpp #include <stdio.h> #include <stdlib.h> #include <iostream> #include "global_extern.h" using namespace std; const double cs const double pi = 299792458.0;//speed of light = 3.1415926535898;//circular constant void generatecacodeint prn { int j,k; int g2shift,savebit; int g1[1024]={0},g2[1024]={0},g2original[1024]={0}; int reg[10]={-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}; //--- Make the code shift array. The shift depends on the PRN number ------- // The g2s vector holds the appropriate shift of the g2 code to generate // the C/A code ex. for SV#19 - use a G2 shift of g2s19 = 471 int g2s[37] = { 5, 6, 7, 8, 17, 18, 139, 140, 141, 251, 252, 254, 255, 256, 257, 258, 469, 470, 471, 472, 473, 474, 509, 512, 513, 514, 515, 516, 859, 860, 861, 862, 339 /*339*/, 208, 711, 189, 263}; //PRN188 -> 291 PRN193 -> 339 //--- Pick right shift for the given PRN number ---------------------------- g2shift = g2s[prn-1]; //--- Generate all G1 signal chips based on the G1 feedback polynomial ----- forj=1;j<=1023;j++{ g1[j-1] = reg[9]; savebit = reg[2]*reg[9]; fork=9;k>=1;k-- reg[k] = reg[k-1]; 56

} reg[0] = savebit; forj=0;j<=9;j++ reg[j] = -1; //--- Generate all G2 signal chips based on the G2 feedback polynomial ----- forj=1;j<=1023;j++{ g2[j-1] = reg[9]; g2original[j-1] = reg[9]; savebit = reg[1]*reg[2]*reg[5]*reg[7]*reg[8]*reg[9]; fork=9;k>=1;k-- reg[k] = reg[k-1]; reg[0] = savebit; } //--- Shift G2 code -------------------------------------------------------- //The idea: g2 = concatenate[ g2_right_part, g2_left_part ]; forj=1023-g2shift+1;j<=1023;j++ g2[j-1023-g2shift-1] = g2original[j-1]; forj=1;j<=1023-g2shift;j++ g2[g2shift+j-1] = g2original[j-1]; } //--- Form single sample C/A code by multiplying G1 and G2 ----------------- forj=1;j<=1023;j++ CAcode[j-1] = -1.0*g1[j-1]*g2[j-1]; 57