[FOSS-GPS] Decoding UBX data

Tomoji TAKASU ttaka at yk.rim.or.jp
Tue Mar 12 07:09:30 PDT 2013


Dear Par,

> Can anyone provide me with a working code example
> on how to decode the data for this setup?

Like the following codes.
observation or navigation data are saved in the buffer
in raw data struct if input_raw() returns 1 or 2.

raw_t raw;
unsigned char buff[SIZ_BUFF];
int i,len;

init_raw(&raw);

while ((len=read(fd,buff,sizeof(buff)))>=0) {
    for (i=0;i<len;i++) {
        switch (input_raw(&raw,STRFMT_UBX,buff[i])) {
            case 1: your_proc_obs(&raw); break;
            case 2: your_proc_nav(&raw); break;
        }
    }
}
free_raw(&raw);

regards,

Tomoji TAKASU

--------------------------------------------------
From: "Degerman Pär" <par.degerman at scania.com>
Sent: Tuesday, March 12, 2013 10:29 PM
To: <foss-gps at lists.osgeo.org>
Subject: [FOSS-GPS] Decoding UBX data

> Hi,
> I have a ublox 5t receiver and I would like to decode the pseudoranges and 
> Doppler shift that is included in the ubx output. I checked briefly 
> through the rtklib source, and realize that everything is in there, but 
> unfortunately a bit poorly documented.
>
> The situation I have is that I'm using rtklibs strsvr to read the data 
> from the receiver or a log file, this is then published using the TCP 
> server output and my application uses another TCP socket to read the data. 
> Now I'm trying to decode the data using the input_raw functions, but I'm 
> apparently using them wrong since I get segmentation faults.
>
> Can anyone provide me with a working code example on how to decode the 
> data for this setup?
>
> Best regards from Sweden
> Pär Degerman
> _______________________________________________
> This message is sent to you from FOSS-GPS at lists.osgeo.org mailing list.
> Visit http://lists.osgeo.org/mailman/listinfo/foss-gps to manage your 
> subscription
> For more information, check http://wiki.osgeo.org/wiki/FOSS-GPS 



More information about the FOSS-GPS mailing list