Shop OBEX P1 Docs P2 Docs Learn Events
How to get Heading from Parallax VON1513 GPS Module? — Parallax Forums

How to get Heading from Parallax VON1513 GPS Module?

TylerSkylerTylerSkyler Posts: 72
edited 2012-06-02 22:25 in Propeller 1
Hey All! I'm using the Parallax Gps Module(This one) in a robotics project. I have been able to get Lat and Long points using:
CON


_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000


  GetLat   = $05
  GetLong  = $06






VAR


  long stack[30]
OBJ

   GPS    :  "FullDuplexSerial"
  

PUB Main
     GPS.start(5, 5, 00, 9600)
     cognew(GetGpsData,@stack)


PUB GetGpsData

  repeat
    GPS.str(string("!GPS"))                   ' GPS command header
    GPS.tx(GetLat)                            '  for latitude
    WriteVal
    Debug.str(string(","))
    GPS.str(string("!GPS"))                   ' GPS command header
    GPS.tx(GetLong)                           '  for longitude
    WriteVal
    Debug.str(string(13))


PRI  WriteVal | Degrees, Minutes, MinutesD, Dir


  WaitCnt(ClkFreq / 10 + Cnt)                 ' 1/10 second wait


  Degrees := GPS.rx                           ' Retrieve bytes from GPS
  Minutes := GPS.rx
  MinutesD := (GPS.rx << 8) | GPS.rx
  Dir := GPS.rx==1


  if dir == -1                                ' If Dir = -1, prepend - sign
    Debug.str(string("-"))
  Debug.dec(Degrees)
  Debug.str(string("."))


  workVal := (Minutes * 1000 / 6) + (MinutesD / 60)
  Debug.dec(workVal)


But I cant seem to figure out how to "serin" the head(which is a word and has a value of $09). I know it is two bytes, but how do you receive them and then combine them to create the heading from the gps module? All help or suggestions are appreciated!

Thanks,

Tyler

Comments

  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2012-06-02 20:26
    You use the same bit-shifting technique as demonstrated for the decimal minutes portion:

    SomeVar := (GPS.rx << 8) | GPS.rx

    This places the values returned in two successive byte reads from the GPS into a single variable. The first byte is shifted up by eight bits; the second byte takes the lower eight bits. Viola! A 16-bit value, suitable for framing and catching fish.

    Do note that heading is inaccurate if the module is not moving. Anything under 5-10 MPH cannot be trusted.

    -- Gordon
  • TylerSkylerTylerSkyler Posts: 72
    edited 2012-06-02 21:11
    Thanks Gordon! Works like a treat. here is a log of my numbers where it goes Lat, Long, Heading
    35.4035,-118.9375,3533
    35.4035,-118.9375,3401
    35.4035,-118.9375,3401
    35.4036,-118.9376,3401
    35.4036,-118.9376,3363
    35.4036,-118.9376,3363
    35.4036,-118.9376,3363
    35.4036,-118.9376,3362
    35.4036,-118.9376,3362
    35.4036,-118.9376,3359
    35.4037,-118.9376,3359
    35.4037,-118.9376,3351
    35.4037,-118.9377,3351
    35.4038,-118.9377,3347
    35.4038,-118.9377,3347
    35.4038,-118.9377,3347
    35.4038,-118.9377,3330
    35.4038,-118.9377,3330
    35.4038,-118.9378,3295
    35.4039,-118.9378,3295
    35.4040,-118.9378,3270
    35.4040,-118.9378,3270
    35.4040,-118.9379,3270
    35.4040,-118.9379,3263
    35.4041,-118.9379,3263
    35.4041,-118.9379,3263
    35.4041,-118.9379,3258
    35.4041,-118.9379,3258
    35.4042,-118.9380,3254
    35.4043,-118.9381,3254
    35.4043,-118.9381,3238
    35.4043,-118.9381,3238
    35.4043,-118.9381,3173
    35.4043,-118.9381,3173
    35.4044,-118.9382,3173
    35.4044,-118.9382,3051
    35.4044,-118.9382,3051
    35.4044,-118.9383,2895
    35.4044,-118.9384,2895
    35.4044,-118.9384,2761
    35.4044,-118.9384,2761
    35.4044,-118.9385,2686
    35.4044,-118.9385,2686
    35.4044,-118.9386,2686
    35.4044,-118.9386,2686
    35.4044,-118.9386,2597
    35.4044,-118.9386,2564
    35.4044,-118.9387,2564
    35.4044,-118.9388,2564
    35.4044,-118.9388,2564
    35.4044,-118.9390,2564
    35.4044,-118.9390,2563
    35.4044,-118.9390,2563
    35.4043,-118.9391,2563
    35.4043,-118.9391,2563
    35.4043,-118.9391,2563
    35.4043,-118.9392,2557
    35.4043,-118.9393,2557
    35.4043,-118.9393,2525
    35.4043,-118.9393,2525
    35.4042,-118.9394,2437
    35.4042,-118.9394,2437
    35.4042,-118.9395,2437
    35.4042,-118.9395,2437
    35.4042,-118.9395,2301
    35.4042,-118.9395,2177
    35.4041,-118.9396,2177
    35.4040,-118.9396,2046
    35.4040,-118.9396,2046
    35.4040,-118.9397,2046
    35.4040,-118.9397,1922
    35.4040,-118.9397,1922
    35.4039,-118.9397,1922
    35.4039,-118.9397,1873
    35.4039,-118.9397,1873
    35.4038,-118.9397,1879
    35.4037,-118.9397,1879
    35.4037,-118.9397,1884
    35.4037,-118.9397,1884
    35.4036,-118.9397,1883
    35.4036,-118.9397,1883
    35.4035,-118.9397,1883
    35.4035,-118.9397,1883
    35.4035,-118.9397,1915
    35.4035,-118.9398,1929
    35.4034,-118.9398,1929
    35.4034,-118.9398,1988
    35.4034,-118.9398,1988
    35.4034,-118.9398,1988
    35.4034,-118.9398,2139
    35.4034,-118.9398,2139
    35.4034,-118.9398,2139
    35.4034,-118.9398,2229
    35.4034,-118.9398,2229
    35.4034,-118.9398,2274
    35.4034,-118.9398,2274
    35.4034,-118.9398,2444
    35.4034,-118.9399,2444
    35.4033,-118.9399,2593
    35.4033,-118.9399,2593
    35.4033,-118.9400,2593
    35.4033,-118.9400,2593
    35.4033,-118.9400,2643
    35.4033,-118.9401,2688
    35.4033,-118.9402,2688
    35.4033,-118.9402,2703
    35.4033,-118.9402,2703
    35.4033,-118.9403,2703
    35.4033,-118.9403,2706
    35.4033,-118.9404,2706
    35.4033,-118.9404,2706
    35.4033,-118.9404,2718
    35.4033,-118.9404,2718
    35.4033,-118.9405,2715
    35.4033,-118.9406,2715
    35.4033,-118.9406,2710
    35.4033,-118.9407,2710
    35.4033,-118.9407,2719
    35.4033,-118.9407,2719
    35.4033,-118.9407,2719
    35.4033,-118.9407,2778
    35.4033,-118.9407,2778
    35.4033,-118.9407,2825
    35.4033,-118.9407,2825
    35.4033,-118.9407,2885
    35.4033,-118.9407,2885
    35.4033,-118.9408,2985
    35.4033,-118.9408,2985
    35.4034,-118.9408,2985
    35.4034,-118.9408,2985
    35.4034,-118.9408,3054
    35.4034,-118.9408,3198
    35.4034,-118.9408,3198
    35.4034,-118.9408,3198
    35.4034,-118.9408,3331
    35.4035,-118.9408,3331
    35.4035,-118.9408,3457
    35.4035,-118.9408,3457
    35.4035,-118.9408,3457
    35.4035,-118.9408,3569
    35.4035,-118.9408,3569
    35.4036,-118.9408,33
    35.4036,-118.9408,33
    35.4037,-118.9408,39
    35.4037,-118.9408,39
    35.4038,-118.9408,46
    35.4038,-118.9408,46
    35.4039,-118.9408,46
    35.4039,-118.9408,46
    35.4039,-118.9408,32
    35.4039,-118.9408,3599
    35.4040,-118.9408,3599
    35.4041,-118.9408,7
    35.4041,-118.9408,7
    35.4042,-118.9408,7
    35.4042,-118.9408,15
    35.4042,-118.9408,15
    35.4043,-118.9408,15
    35.4043,-118.9408,13
    35.4043,-118.9408,13
    35.4044,-118.9408,29
    35.4045,-118.9408,29
    35.4045,-118.9408,23
    35.4045,-118.9408,23
    35.4046,-118.9408,25
    35.4046,-118.9408,25
    35.4047,-118.9408,25
    35.4047,-118.9408,25
    35.4047,-118.9408,29
    35.4047,-118.9408,41
    35.4048,-118.9408,41
    35.4049,-118.9408,60
    35.4049,-118.9408,60
    35.4049,-118.9408,60
    35.4049,-118.9408,93
    35.4049,-118.9408,93
    35.4049,-118.9408,93
    35.4049,-118.9408,61
    35.4049,-118.9408,61
    35.4049,-118.9408,1
    35.4049,-118.9408,1
    35.4049,-118.9408,1419
    35.4049,-118.9408,1419
    35.4049,-118.9408,1377
    35.4049,-118.9408,1377
    35.4049,-118.9408,1377
    35.4049,-118.9408,1377
    35.4049,-118.9408,1668
    35.4049,-118.9408,590
    35.4049,-118.9408,590
    35.4049,-118.9408,262
    35.4049,-118.9408,262
    35.4049,-118.9408,262
    35.4049,-118.9408,233
    35.4050,-118.9407,233
    35.4050,-118.9407,233
    35.4050,-118.9407,424
    35.4050,-118.9407,424
    35.4050,-118.9407,597
    35.4050,-118.9406,597
    35.4050,-118.9406,759
    35.4050,-118.9406,759
    35.4050,-118.9406,882
    35.4050,-118.9406,882
    35.4050,-118.9405,882
    35.4050,-118.9405,909
    35.4050,-118.9405,909
    35.4050,-118.9404,899
    35.4050,-118.9403,899
    35.4050,-118.9403,879
    35.4050,-118.9403,879
    35.4050,-118.9401,861
    35.4050,-118.9401,861
    35.4050,-118.9400,861
    35.4050,-118.9400,861
    35.4050,-118.9400,841
    35.4050,-118.9400,841
    35.4051,-118.9399,828
    35.4051,-118.9397,828
    35.4051,-118.9397,817
    35.4051,-118.9396,817
    35.4051,-118.9396,804
    35.4051,-118.9396,804
    35.4051,-118.9395,804
    35.4051,-118.9395,789
    35.4051,-118.9395,789
    35.4051,-118.9393,773
    35.4051,-118.9392,773
    35.4052,-118.9392,758
    35.4052,-118.9392,758
    35.4052,-118.9390,740
    35.4052,-118.9390,740
    35.4052,-118.9389,740
    35.4052,-118.9389,740
    35.4052,-118.9389,727
    35.4052,-118.9389,720
    35.4053,-118.9387,720
    35.4053,-118.9386,710
    35.4053,-118.9386,710
    35.4054,-118.9385,710
    35.4054,-118.9385,703
    35.4054,-118.9383,703
    35.4054,-118.9383,703
    35.4054,-118.9383,697
    35.4054,-118.9383,697
    35.4054,-118.9382,693
    35.4055,-118.9381,693
    35.4055,-118.9381,695
    35.4055,-118.9381,695
    35.4055,-118.9380,704
    35.4055,-118.9380,704
    35.4055,-118.9380,704
    35.4055,-118.9380,704
    35.4055,-118.9380,722
    35.4055,-118.9380,775
    35.4055,-118.9379,775
    35.4055,-118.9379,827
    35.4055,-118.9379,827
    35.4055,-118.9379,827
    35.4055,-118.9379,867
    35.4055,-118.9379,867
    35.4055,-118.9379,867
    35.4055,-118.9379,940
    35.4055,-118.9379,940
    35.4055,-118.9378,1103
    35.4055,-118.9378,1103
    35.4055,-118.9378,1340
    35.4055,-118.9378,1340
    35.4054,-118.9378,1494
    35.4054,-118.9378,1494
    35.4054,-118.9377,1494
    35.4054,-118.9377,1494
    35.4054,-118.9377,1532
    35.4054,-118.9377,1532
    35.4053,-118.9377,1532
    35.4052,-118.9376,1522
    35.4052,-118.9376,1522
    35.4051,-118.9376,1522
    35.4051,-118.9376,1510
    35.4051,-118.9375,1510
    35.4050,-118.9375,1510
    35.4050,-118.9375,1495
    35.4050,-118.9375,1495
    35.4049,-118.9374,1472
    35.4048,-118.9373,1472
    35.4048,-118.9373,1447
    35.4048,-118.9373,1447
    35.4047,-118.9373,1432
    35.4047,-118.9373,1432
    35.4046,-118.9372,1432
    35.4046,-118.9372,1417
    35.4046,-118.9372,1417
    35.4046,-118.9371,1403
    35.4045,-118.9370,1403
    35.4044,-118.9370,1391
    35.4044,-118.9370,1391
    35.4043,-118.9369,1391
    35.4043,-118.9369,1378
    35.4042,-118.9368,1378
    35.4042,-118.9368,1378
    35.4042,-118.9368,1358
    35.4042,-118.9368,1358
    35.4042,-118.9367,1340
    35.4041,-118.9366,1340
    35.4041,-118.9366,1326
    35.4041,-118.9365,1326
    35.4040,-118.9365,1326
    35.4040,-118.9365,1326
    35.4040,-118.9364,1326
    35.4040,-118.9364,1355
    35.4040,-118.9364,1355
    35.4040,-118.9364,1436
    35.4039,-118.9364,1436
    35.4039,-118.9364,1581
    35.4039,-118.9364,1581
    35.4038,-118.9363,1749
    35.4038,-118.9363,1749
    35.4038,-118.9364,1749
    35.4038,-118.9364,1749
    35.4038,-118.9364,1915
    35.4038,-118.9364,1941
    35.4037,-118.9364,1941
    35.4037,-118.9364,1914
    35.4037,-118.9364,1914
    35.4036,-118.9364,1914
    35.4036,-118.9364,1881
    35.4036,-118.9364,1881
    35.4035,-118.9364,1881
    35.4035,-118.9364,1843
    35.4035,-118.9364,1843
    35.4034,-118.9364,1822
    35.4033,-118.9364,1822
    35.4033,-118.9364,1815
    35.4033,-118.9364,1815
    35.4032,-118.9364,1811
    35.4032,-118.9364,1811
    35.4031,-118.9364,1811
    35.4031,-118.9364,1811
    35.4031,-118.9364,1811
    35.4031,-118.9364,1813
    35.4030,-118.9364,1813
    35.4029,-118.9364,1813
    35.4029,-118.9364,1813
    35.4029,-118.9364,1813
    35.4029,-118.9364,1808
    35.4029,-118.9364,1808
    35.4028,-118.9364,1808
    35.4028,-118.9364,1804
    35.4028,-118.9364,1804
    35.4027,-118.9364,1796
    35.4027,-118.9364,1796
    35.4027,-118.9364,1786
    35.4027,-118.9364,1786
    35.4027,-118.9364,1773
    35.4027,-118.9364,1773
    35.4027,-118.9364,1773
    35.4027,-118.9364,1773
    35.4027,-118.9364,1721
    35.4027,-118.9364,1748
    35.4026,-118.9364,1748
    35.4026,-118.9364,1649
    35.4026,-118.9364,1649
    35.4026,-118.9364,1649
    35.4026,-118.9364,1481
    35.4026,-118.9364,1481
    35.4026,-118.9364,1481
    35.4026,-118.9364,1255
    35.4026,-118.9364,1255
    35.4026,-118.9363,1049
    35.4026,-118.9362,1049
    35.4026,-118.9362,895
    35.4026,-118.9361,895
    35.4026,-118.9361,873
    35.4026,-118.9361,873
    35.4026,-118.9360,873
    35.4026,-118.9360,873
    35.4026,-118.9360,888
    35.4026,-118.9359,922
    35.4026,-118.9358,922
    35.4026,-118.9358,927
    35.4026,-118.9358,927
    35.4026,-118.9357,927
    35.4026,-118.9357,906
    35.4026,-118.9356,906
    35.4026,-118.9356,906
    35.4026,-118.9356,918
    35.4026,-118.9356,918
    35.4026,-118.9354,904
    35.4026,-118.9353,904
    35.4026,-118.9353,906
    35.4026,-118.9351,906
    35.4026,-118.9351,907
    35.4026,-118.9351,907
    35.4026,-118.9350,907
    35.4026,-118.9350,902
    35.4026,-118.9350,902
    35.4026,-118.9348,898
    35.4026,-118.9347,898
    35.4026,-118.9347,900
    35.4026,-118.9347,900
    35.4026,-118.9345,901
    35.4026,-118.9345,901
    35.4026,-118.9344,901
    35.4026,-118.9344,901
    35.4026,-118.9344,897
    35.4026,-118.9344,894
    35.4026,-118.9342,894
    35.4026,-118.9341,894
    35.4026,-118.9341,893
    35.4026,-118.9339,893
    35.4026,-118.9339,893
    35.4026,-118.9339,893
    35.4026,-118.9338,893
    35.4026,-118.9338,892
    35.4026,-118.9338,892
    35.4026,-118.9336,897
    35.4026,-118.9335,897
    35.4026,-118.9335,900
    35.4026,-118.9335,900
    35.4026,-118.9333,899
    35.4026,-118.9333,899
    35.4026,-118.9331,899
    35.4026,-118.9331,899
    35.4026,-118.9331,899
    35.4026,-118.9331,913
    35.4026,-118.9330,913
    35.4026,-118.9328,968
    35.4026,-118.9328,968
    35.4026,-118.9327,968
    35.4026,-118.9327,1040
    35.4026,-118.9325,1040
    35.4025,-118.9325,1040
    35.4025,-118.9325,1118
    35.4025,-118.9325,1118
    35.4025,-118.9324,1186
    35.4024,-118.9322,1186
    35.4024,-118.9322,1229
    35.4024,-118.9322,1229
    35.4023,-118.9321,1255
    35.4023,-118.9321,1255
    35.4022,-118.9319,1255
    35.4022,-118.9319,1255
    35.4022,-118.9319,1256
    35.4022,-118.9319,1255
    35.4022,-118.9318,1255
    35.4021,-118.9317,1255
    35.4021,-118.9317,1255
    35.4020,-118.9315,1255
    35.4020,-118.9315,1255
    35.4020,-118.9314,1255
    35.4019,-118.9314,1255
    35.4019,-118.9314,1254
    35.4019,-118.9314,1254
    35.4019,-118.9313,1258
    35.4018,-118.9312,1258
    35.4018,-118.9312,1283
    35.4018,-118.9311,1283
    35.4017,-118.9311,1349
    35.4017,-118.9311,1349
    35.4016,-118.9310,1349
    35.4016,-118.9310,1349
    35.4016,-118.9310,1425
    35.4016,-118.9309,1504
    35.4015,-118.9309,1504
    35.4015,-118.9309,1579
    35.4015,-118.9309,1579
    35.4014,-118.9308,1579
    35.4014,-118.9308,1650
    35.4013,-118.9308,1650
    35.4013,-118.9308,1650
    35.4013,-118.9308,1719
    35.4013,-118.9308,1719
    35.4011,-118.9308,1765
    35.4010,-118.9308,1765
    35.4010,-118.9308,1782
    35.4010,-118.9308,1782
    35.4009,-118.9308,1783
    35.4009,-118.9308,1783
    35.4008,-118.9308,1783
    35.4008,-118.9308,1792
    35.4008,-118.9308,1792
    35.4008,-118.9308,1797
    35.4007,-118.9308,1797
    35.4006,-118.9308,1800
    35.4006,-118.9308,1800
    35.4005,-118.9308,1805
    35.4005,-118.9308,1805
    35.4004,-118.9308,1805
    35.4004,-118.9308,1805
    35.4004,-118.9308,1802
    35.4004,-118.9308,1802
    35.4003,-118.9308,1799
    35.4001,-118.9308,1799
    35.4001,-118.9308,1794
    35.4000,-118.9308,1794
    35.4000,-118.9308,1790
    35.4000,-118.9308,1790
    35.3999,-118.9308,1790
    35.3999,-118.9308,1787
    35.3999,-118.9308,1787
    35.3998,-118.9308,1791
    35.3998,-118.9308,1791
    35.3997,-118.9308,1796
    35.3997,-118.9308,1796
    35.3996,-118.9308,1797
    35.3996,-118.9308,1797
    35.3994,-118.9308,1797
    35.3994,-118.9308,1797
    35.3994,-118.9308,1789
    35.3994,-118.9308,1777
    35.3993,-118.9308,1777
    35.3992,-118.9308,1787
    35.3992,-118.9308,1787
    35.3992,-118.9308,1787
    35.3992,-118.9308,1840
    35.3992,-118.9308,1840
    35.3991,-118.9308,1840
    35.3991,-118.9308,1945
    35.3991,-118.9308,1945
    35.3990,-118.9309,2138
    35.3990,-118.9309,2138
    35.3990,-118.9309,2373
    35.3990,-118.9309,2373
    35.3990,-118.9310,2564
    35.3990,-118.9310,2564
    35.3990,-118.9311,2564
    35.3990,-118.9311,2564
    35.3990,-118.9311,2668
    35.3990,-118.9311,2700
    35.3990,-118.9312,2700
    35.3990,-118.9312,2708
    35.3990,-118.9312,2708
    35.3990,-118.9313,2708
    35.3990,-118.9313,2707
    35.3990,-118.9313,2707
    35.3990,-118.9313,2707
    35.3990,-118.9313,2685
    35.3990,-118.9313,2685
    35.3990,-118.9313,2609
    35.3990,-118.9314,2609
    35.3990,-118.9314,2484
    35.3990,-118.9314,2484
    35.3989,-118.9314,2264
    35.3989,-118.9314,2264
    35.3989,-118.9314,2264
    35.3989,-118.9314,2264
    35.3989,-118.9314,2062
    35.3989,-118.9314,1931
    35.3989,-118.9314,1931
    35.3988,-118.9314,1859
    35.3988,-118.9314,1859
    35.3987,-118.9315,1859
    35.3987,-118.9315,1827
    35.3987,-118.9315,1827
    35.3986,-118.9315,1827
    35.3986,-118.9315,1808
    35.3986,-118.9315,1808
    35.3986,-118.9315,1800
    35.3985,-118.9315,1800
    35.3985,-118.9315,1799
    35.3985,-118.9315,1799
    35.3984,-118.9315,1803
    35.3984,-118.9315,1803
    35.3983,-118.9315,1803
    35.3983,-118.9315,1807
    35.3983,-118.9315,1807
    35.3983,-118.9315,1801
    35.3982,-118.9315,1801
    35.3981,-118.9315,1800
    35.3981,-118.9315,1800
    35.3980,-118.9315,1807
    35.3980,-118.9315,1807
    35.3980,-118.9315,1807
    35.3980,-118.9315,1807
    35.3980,-118.9315,1847
    35.3980,-118.9315,1912
    35.3980,-118.9315,1912
    35.3979,-118.9315,1912
    35.3979,-118.9315,1970
    35.3979,-118.9315,1970
    35.3979,-118.9315,1957
    35.3979,-118.9315,1957
    35.3979,-118.9315,1957
    35.3979,-118.9315,2067
    35.3979,-118.9315,2067
    35.3979,-118.9315,2262
    35.3979,-118.9316,2262
    35.3979,-118.9316,2496
    35.3979,-118.9316,2496
    35.3979,-118.9316,2631
    35.3979,-118.9316,2631
    35.3979,-118.9317,2631
    35.3979,-118.9317,2631
    35.3979,-118.9317,2662
    35.3979,-118.9317,2689
    35.3979,-118.9318,2689
    35.3979,-118.9319,2690
    35.3979,-118.9319,2690
    35.3979,-118.9320,2690
    35.3979,-118.9320,2692
    35.3979,-118.9322,2692
    35.3979,-118.9322,2692
    35.3979,-118.9322,2691
    35.3979,-118.9322,2691
    35.3979,-118.9323,2689
    35.3979,-118.9325,2689
    35.3979,-118.9325,2688
    35.3979,-118.9325,2688
    35.3979,-118.9327,2690
    35.3979,-118.9327,2690
    35.3979,-118.9329,2690
    35.3979,-118.9329,2690
    35.3979,-118.9329,2690
    35.3979,-118.9329,2689
    35.3979,-118.9331,2689
    35.3979,-118.9333,2689
    35.3979,-118.9333,2689
    35.3979,-118.9335,2689
    35.3979,-118.9335,2690
    35.3979,-118.9337,2690
    35.3979,-118.9337,2690
    35.3979,-118.9337,2691
    35.3979,-118.9337,2691
    35.3978,-118.9339,2691
    35.3978,-118.9342,2691
    35.3978,-118.9342,2692
    35.3978,-118.9344,2692
    35.3978,-118.9344,2692
    35.3978,-118.9344,2692
    35.3978,-118.9346,2692
    35.3978,-118.9346,2692
    35.3978,-118.9346,2689
    35.3978,-118.9348,2687
    35.3978,-118.9348,2687
    35.3978,-118.9351,2687
    35.3978,-118.9351,2687
    35.3978,-118.9353,2687
    35.3978,-118.9353,2689
    35.3978,-118.9355,2689
    35.3978,-118.9355,2689
    35.3978,-118.9355,2687
    35.3978,-118.9355,2687
    35.3978,-118.9357,2688
    35.3978,-118.9359,2688
    35.3978,-118.9359,2690
    35.3978,-118.9362,2690
    35.3978,-118.9362,2694
    35.3978,-118.9362,2694
    35.3978,-118.9364,2694
    35.3978,-118.9364,2695
    35.3978,-118.9364,2695
    35.3978,-118.9366,2696
    35.3978,-118.9368,2696
    35.3978,-118.9368,2697
    35.3978,-118.9368,2697
    35.3978,-118.9370,2697
    35.3978,-118.9370,2691
    35.3978,-118.9372,2691
    35.3978,-118.9372,2691
    35.3978,-118.9372,2691
    35.3978,-118.9372,2691
    35.3978,-118.9374,2691
    35.3978,-118.9376,2691
    35.3978,-118.9376,2692
    35.3978,-118.9378,2692
    35.3978,-118.9378,2694
    35.3978,-118.9378,2694
    35.3978,-118.9380,2694
    35.3978,-118.9380,2697
    35.3978,-118.9380,2697
    35.3978,-118.9381,2688
    35.3978,-118.9383,2688
    35.3978,-118.9383,2687
    35.3978,-118.9383,2687
    35.3978,-118.9384,2690
    35.3978,-118.9384,2690
    35.3978,-118.9385,2690
    35.3978,-118.9385,2690
    35.3978,-118.9385,2717
    35.3978,-118.9385,2814
    35.3978,-118.9385,2814
    35.3978,-118.9386,2990
    35.3978,-118.9386,2990
    35.3979,-118.9386,2990
    35.3979,-118.9386,3246
    35.3979,-118.9386,3246
    35.3979,-118.9386,3246
    35.3979,-118.9386,3461
    35.3979,-118.9386,3461
    35.3980,-118.9387,3591
    35.3980,-118.9387,3591
    35.3980,-118.9387,15
    35.3980,-118.9387,15
    35.3981,-118.9386,19
    35.3981,-118.9386,19
    35.3982,-118.9386,19
    35.3982,-118.9386,19
    35.3982,-118.9386,11
    35.3982,-118.9386,8
    35.3983,-118.9386,8
    35.3984,-118.9386,3
    35.3984,-118.9386,3
    35.3985,-118.9386,3
    35.3985,-118.9386,2
    35.3985,-118.9386,2
    35.3986,-118.9386,2
    35.3986,-118.9386,2
    35.3986,-118.9386,2
    35.3987,-118.9386,3
    35.3988,-118.9386,3
    35.3988,-118.9386,2
    35.3988,-118.9386,2
    35.3989,-118.9386,5
    35.3989,-118.9386,5
    35.3991,-118.9386,5
    35.3991,-118.9386,5
    35.3991,-118.9386,5
    35.3991,-118.9386,5
    35.3992,-118.9386,5
    35.3993,-118.9386,2
    35.3993,-118.9386,2
    35.3994,-118.9386,2
    35.3994,-118.9386,0
    35.3994,-118.9386,0
    35.3995,-118.9386,0
    35.3995,-118.9386,1
    35.3995,-118.9386,1
    35.3997,-118.9386,1
    35.3998,-118.9386,1
    35.3998,-118.9386,6
    35.3998,-118.9386,6
    35.3999,-118.9386,4
    35.3999,-118.9386,4
    35.4000,-118.9386,4
    35.4000,-118.9386,4
    35.4000,-118.9386,1
    35.4000,-118.9386,3599
    35.4001,-118.9386,3599
    35.4002,-118.9386,1
    35.4002,-118.9386,1
    35.4003,-118.9386,1
    35.4003,-118.9386,2
    35.4005,-118.9386,2
    35.4005,-118.9386,2
    35.4005,-118.9386,2
    35.4005,-118.9386,2
    35.4006,-118.9386,2
    35.4007,-118.9386,2
    35.4007,-118.9386,2
    35.4007,-118.9386,2
    35.4008,-118.9386,1
    35.4008,-118.9386,1
    35.4009,-118.9386,1
    35.4009,-118.9386,3599
    35.4009,-118.9386,3599
    35.4009,-118.9386,3592
    35.4010,-118.9386,3592
    35.4012,-118.9386,3597
    35.4012,-118.9386,3597
    35.4013,-118.9386,3594
    35.4013,-118.9386,3594
    35.4014,-118.9386,3594
    35.4014,-118.9386,3594
    35.4014,-118.9386,3594
    35.4014,-118.9386,3
    35.4015,-118.9386,3
    35.4016,-118.9386,3
    35.4016,-118.9386,6
    35.4018,-118.9386,6
    35.4018,-118.9386,6
    35.4018,-118.9386,6
    35.4019,-118.9386,6
    35.4019,-118.9386,4
    35.4019,-118.9386,4
    35.4020,-118.9386,1
    35.4020,-118.9386,1
    35.4021,-118.9386,3598
    35.4021,-118.9386,3598
    35.4022,-118.9386,0
    35.4022,-118.9386,0
    35.4023,-118.9386,0
    35.4023,-118.9386,0
    35.4023,-118.9386,2
    35.4023,-118.9386,8
    35.4024,-118.9386,8
    35.4025,-118.9386,67
    35.4025,-118.9386,67
    35.4025,-118.9386,67
    35.4025,-118.9386,201
    35.4025,-118.9386,201
    35.4026,-118.9386,201
    35.4026,-118.9386,414
    35.4026,-118.9386,414
    35.4026,-118.9385,617
    35.4026,-118.9385,617
    35.4026,-118.9385,756
    35.4026,-118.9385,756
    35.4026,-118.9384,857
    35.4026,-118.9384,857
    35.4026,-118.9383,857
    35.4026,-118.9383,857
    35.4026,-118.9383,898
    35.4026,-118.9383,916
    35.4026,-118.9382,916
    35.4026,-118.9381,918
    35.4026,-118.9381,918
    35.4026,-118.9380,918
    35.4026,-118.9380,917
    35.4026,-118.9378,917
    35.4026,-118.9378,917
    35.4026,-118.9378,913
    35.4026,-118.9378,913
    35.4026,-118.9377,895
    35.4026,-118.9377,895
    35.4026,-118.9377,837
    35.4026,-118.9376,837
    35.4026,-118.9376,722
    35.4026,-118.9376,722
    35.4027,-118.9375,722
    35.4027,-118.9375,722
    35.4027,-118.9375,539
    35.4027,-118.9375,377
    35.4027,-118.9375,377
    35.4028,-118.9375,193
    35.4028,-118.9375,193
    35.4028,-118.9374,193
    35.4028,-118.9374,63
    35.4028,-118.9374,63
    35.4029,-118.9374,63
    35.4029,-118.9374,15
    35.4029,-118.9374,15
    35.4029,-118.9374,3583
    35.4030,-118.9375,3583
    35.4030,-118.9375,3582
    35.4030,-118.9375,3582
    35.4031,-118.9375,3575
    35.4031,-118.9375,3575
    35.4032,-118.9375,3575
    35.4032,-118.9375,3561
    35.4032,-118.9375,3561
    35.4032,-118.9375,3547
    35.4032,-118.9375,3547
    35.4033,-118.9375,3533
    35.4033,-118.9375,3533
    35.4034,-118.9375,3533
    35.4034,-118.9375,3522
    35.4034,-118.9375,3522
    35.4034,-118.9375,3522
    35.4034,-118.9375,3521
    35.4034,-118.9375,3521
    35.4035,-118.9375,5
    35.4035,-118.9375,5
    35.4035,-118.9375,200
    35.4035,-118.9375,200
    35.4035,-118.9375,403
    35.4035,-118.9375,403
    35.4035,-118.9375,403
    35.4035,-118.9375,596
    35.4035,-118.9375,596
    35.4035,-118.9374,686
    35.4035,-118.9374,686
    35.4036,-118.9374,681
    35.4036,-118.9374,681
    35.4036,-118.9374,662
    35.4036,-118.9374,662
    35.4036,-118.9374,662
    35.4036,-118.9374,662
    35.4036,-118.9374,645
    35.4036,-118.9374,753
    35.4036,-118.9374,753
    35.4036,-118.9374,753
    35.4036,-118.9374,1577
    35.4036,-118.9374,1577
    35.4036,-118.9374,1255
    35.4036,-118.9374,1255
    35.4036,-118.9374,1255
    35.4036,-118.9374,1183
    35.4036,-118.9374,1183
    35.4036,-118.9374,1288
    35.4036,-118.9374,1288
    35.4036,-118.9374,1165
    35.4036,-118.9374,1165
    35.4036,-118.9374,1190
    


    The numbers defiantly aren't in degrees, but they seem consistant in that one direction yields the same number. Is there a way to convert these numbers into degrees or have I done something wrong here is my code for the capture:
    PUB GetGpsData
    
    
    
    
      repeat
        GPS.str(string("!GPS"))
        GPS.tx(GetLat)
        WriteVal
        Debug.str(string(","))
        GPS.str(string("!GPS"))
        GPS.tx(GetLong)
        WriteVal
        Debug.str(string(","))
        GPS.str(string("!GPS"))
        GPS.tx(GetHead)
        WaitCnt(ClkFreq / 10 + Cnt)
        Head := (GPS.rx << 8) | GPS.rx
        Debug.dec(Head)
        Debug.str(string(13))
        WaitCnt(ClkFreq / 10 + Cnt)
    

    Thanks,

    Tyler
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2012-06-02 22:15
    Looks like degrees. Just lop off the last digit; it's the tenths of degrees -- 3359 is 335.9 degrees. You don't really need it down to tenths, as it's not all that accurate anyway. If you need accurate heading you should go with a magnetometer/compass, and even then it has to be tilt compensated (if the sensor is not level) using an accelerometer.

    -- Gordon
  • TylerSkylerTylerSkyler Posts: 72
    edited 2012-06-02 22:25
    Ohhhh...Duh!! How did I not see that. Thanks Gordon for your help. For my purposes the heading seems to be accurate enough thankfully

    Thanks,

    Tyler
Sign In or Register to comment.