Campbell Scientific GPS16-HVS Garmin GPS Receiver User Manual

Page 20

Advertising
background image

Appendix A. CR23X/CR10X Programs

6: 65

Option ;A

7: 0

Option

8: 0

Option


; Test for valid GPS fix and string read
4: If (X<=>F) (P89)
1: 6

X Loc [ Quality ]

2: 3

>=

3: 1

F

4: 30

Then Do


; Make a copy of time
5: Z=X (P31)
1: 1

X Loc [ Raw_Time ]

2: 18

Z Loc [ Orig_TM ]


; Add 0.45 to time stamp to eliminate complications with
; floating point math, P44, and P45
6: Z=X+F (P34)
1: 18

X Loc [ Orig_TM ]

2: 0.45

F

3: 18

Z Loc [ Orig_TM ]


; Move minutes and seconds right of decimal
7: Z=X*F (P37)
1: 18

X Loc [ Orig_TM ]

2: .0001

F

3: 19

Z Loc [ Int1 ]


; Pluck off hours
8: Z=INT(X) (P45)
1: 19

X Loc [ Int1 ]

2: 20

Z Loc [ Hours ]


; Subtract hours out
9: Z=X-Y (P35)
1: 19

X Loc [ Int1 ]

2: 20

Y Loc [ Hours ]

3: 19

Z Loc [ Int1 ]


; Move decimal left 2 places
10: Z=X*F (P37)
1: 19

X Loc [ Int1 ]

2: 100

F

3: 19

Z Loc [ Int1 ]


; Pluck off minutes
11: Z=INT(X) (P45)
1: 19

X Loc [ Int1 ]

2: 21

Z Loc [ Minutes ]


; Subtract out minutes
12: Z=X-Y (P35)
1: 19

X Loc [ Int1 ]

2: 21

Y Loc [ Minutes ]

3: 19

Z Loc [ Int1 ]


; Move decimal left 2 places
13: Z=X*F (P37)
1: 19

X Loc [ Int1 ]

2: 100

F

3: 19

Z Loc [ Int1 ]


; Pluck of seconds
14: Z=INT(X) (P45)
1: 19

X Loc [ Int1 ]

2: 22

Z Loc [ Seconds ]

A-6

Advertising