RTK-GPS with freerunner: decimeter-level accuracy with Free Software

RANJAN infibit at gmail.com
Wed Nov 9 20:24:43 CET 2011


Dear Timo,

This is what I wrote from you code:

1)Sets NMEA OFF and only UBX on
2)Enable-raw
3)raw-rate-monitor

*import struct
import calendar
import os
import gobject
import logging
import sys
import socket
import time

loop = gobject.MainLoop()

def callback(ty, packet):
    print("callback %s" % repr([ty, packet]))
    # setting NMEA OFF AND ONLY UBX
    if ty == "CFG-PRT":
        packet[1]["In_proto_mask"] = 1
        packet[1]["Out_proto_mask"] = 1
        t.send("CFG-PRT", 20, packet)
    elif ty == "ACK-ACK":
        loop.quit()
    return True

#raw rate monitor
def callback(ty, *args):
    global prev_t
    if ty == "RXM-RAW":
        t = time.time()
        d = t - prev_t
        print("%f %f" % (d, 1.0/d))
        prev_t = t

assert len(sys.argv) == 2
t = ubx.Parser(callback)
t.send("CFG-PRT", 0, [])

#enabling raw
t = ubx.Parser(callback)
t.send("UPD-DOWNL", 8 + 1, {"StartAddr" : 0x6c14, "Flags" : 0, "B0" : 255})
loop.run()*


Please advice.
Ranjan
On Thu, Nov 1
0, 2011 at 12:25 AM, RANJAN <infibit at gmail.com> wrote:

>
>
>> GPSD? You can't use gpsd here. You can just read the raw data from
>> serial port using cat or netcat.
>
>
> I do this to send NMEA data over serial by listening into the gps daemon.
>
> import socket
> import sys
> import serial
> host, port = 'localhost', 2947
> sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> sock.connect((host, port))
> sock.send('r')
> file = open("gpstextlog.txt","w")
> while True:
>     reply = sock.recv(16384)
>     file.write(reply)
>
> What shall I do now? Shall I send the UBX data over serial without using
> the GPS parser or should I send just RAW data after parsing it on the
> phone? (My last mail tell you more about these doubts).
>
> Ranjan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmoko.org/pipermail/community/attachments/20111110/7c860f81/attachment-0001.htm>


More information about the community mailing list