Classes | Defines | Functions | Variables
rtkrcv.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <ctype.h>
#include <unistd.h>
#include <errno.h>
#include <pthread.h>
#include <rtklib/rtklib.h>
Include dependency graph for rtkrcv.cpp:

Go to the source code of this file.

Classes

struct  vt_t

Defines

#define _POSIX_C_SOURCE   2
#define CONOPT   "0:dms,1:deg,2:xyz,3:enu,4:pyl"
#define FLGOPT   "0:off,1:std+2:age/ratio/ns"
#define FMTOPT   "0:rtcm2,1:rtcm3,2:oem4,3:oem3,4:ubx,5:ss2,6:hemis,7:skytraq,8:gw10,9:javad,10:nvs,15:sp3"
#define INTKEEPALIVE   1000 /* keep alive interval (ms) */
#define ISTOPT   "0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,7:ntripcli,8:ftp,9:http"
#define MAX(x, y)   ((x)>(y)?(x):(y))
#define MAXBUFF   1024 /* max input buffer */
#define MAXRCVCMD   4096 /* max receiver command */
#define MAXSTR   1024 /* max length of a string */
#define MIN(x, y)   ((x)<(y)?(x):(y))
#define MSGOPT   "0:all,1:rover,2:base,3:corr"
#define NAVIFILE   "rtkrcv.nav" /* navigation save file */
#define NMEOPT   "0:off,1:latlon,2:single"
#define OSTOPT   "0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,6:ntripsvr"
#define SOLOPT   "0:llh,1:xyz,2:enu,3:nmea"
#define SQRT(x)   ((x)<=0.0?0.0:sqrt(x))
#define STATFILE   "rtkrcv.stat" /* solution status file */
#define TIMOPT   "0:gpst,1:utc,2:jst,3:tow"
#define TRACEFILE   "rtkrcv.trace" /* trace file */

Functions

static void chop (char *str)
static void closemoni (void)
static int confwrite (vt_t *vt, const char *file)
char get_solution (double &lat, double &lon, double &height)
static int inpvt (vt_t *vt, char *buff, int nmax)
int loadrosopts (opt_t *opts)
static int openmoni (int port)
static int outvt (vt_t *vt, char *buff, int n)
static int printvt (vt_t *vt, const char *format,...)
static void readant (vt_t *vt, prcopt_t *opt, nav_t *nav)
static int readcmd (const char *file, char *cmd, int type)
static int readremote (vt_t *vt, char *buff, int nmax)
static void * sendkeepalive (void *arg)
int start_rtkrcv (int argc, char **argv)
static int startsvr (vt_t *vt)
void stop_rtkrcv ()
static void stopsvr (vt_t *vt)
static int writeremote (vt_t *vt, char *buff, int n)

Variables

static int buffsize = 32768
static filopt_t filopt = {""}
static int fswapmargin = 30
static int keepalive = 0
static FILE * logfp = NULL
static int modflgr [256] = {0}
static int modflgs [256] = {0}
static stream_t moni
static int moniport = 0
static int navmsgsel = 0
static int nmeacycle = 5000
static double nmeapos [] = {0,0}
static int nmeareq = 0
static int outstat = 0
static char passwd [MAXSTR] = "admin"
static prcopt_t prcopt
static char proxyaddr [256] = ""
static int rcv_trace = 0
static char rcvcmds [3][MAXSTR] = {""}
static opt_t rcvopts []
static int reconnect = 10000
static int solflag = 2
static solopt_t solopt [2] = {{0}}
static int soltype = 0
static char startcmd [MAXSTR] = ""
static char stopcmd [MAXSTR] = ""
static int strfmt []
static char strpath [8][MAXSTR] = {""}
static int strtype []
static rtksvr_t svr
static vt_t svr_vt = {0}
static int svrcycle = 10
static int timeout = 10000
static int timetype = 0

Define Documentation

#define _POSIX_C_SOURCE   2

Definition at line 22 of file rtkrcv.cpp.

#define CONOPT   "0:dms,1:deg,2:xyz,3:enu,4:pyl"

Definition at line 103 of file rtkrcv.cpp.

#define FLGOPT   "0:off,1:std+2:age/ratio/ns"

Definition at line 104 of file rtkrcv.cpp.

#define FMTOPT   "0:rtcm2,1:rtcm3,2:oem4,3:oem3,4:ubx,5:ss2,6:hemis,7:skytraq,8:gw10,9:javad,10:nvs,15:sp3"

Definition at line 107 of file rtkrcv.cpp.

#define INTKEEPALIVE   1000 /* keep alive interval (ms) */

Definition at line 43 of file rtkrcv.cpp.

#define ISTOPT   "0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,7:ntripcli,8:ftp,9:http"

Definition at line 105 of file rtkrcv.cpp.

#define MAX (   x,
 
)    ((x)>(y)?(x):(y))

Definition at line 46 of file rtkrcv.cpp.

#define MAXBUFF   1024 /* max input buffer */

Definition at line 38 of file rtkrcv.cpp.

#define MAXRCVCMD   4096 /* max receiver command */

Definition at line 39 of file rtkrcv.cpp.

#define MAXSTR   1024 /* max length of a string */

Definition at line 37 of file rtkrcv.cpp.

#define MIN (   x,
 
)    ((x)<(y)?(x):(y))

Definition at line 45 of file rtkrcv.cpp.

#define MSGOPT   "0:all,1:rover,2:base,3:corr"

Definition at line 110 of file rtkrcv.cpp.

#define NAVIFILE   "rtkrcv.nav" /* navigation save file */

Definition at line 40 of file rtkrcv.cpp.

#define NMEOPT   "0:off,1:latlon,2:single"

Definition at line 108 of file rtkrcv.cpp.

#define OSTOPT   "0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,6:ntripsvr"

Definition at line 106 of file rtkrcv.cpp.

#define SOLOPT   "0:llh,1:xyz,2:enu,3:nmea"

Definition at line 109 of file rtkrcv.cpp.

#define SQRT (   x)    ((x)<=0.0?0.0:sqrt(x))

Definition at line 47 of file rtkrcv.cpp.

#define STATFILE   "rtkrcv.stat" /* solution status file */

Definition at line 41 of file rtkrcv.cpp.

#define TIMOPT   "0:gpst,1:utc,2:jst,3:tow"

Definition at line 102 of file rtkrcv.cpp.

#define TRACEFILE   "rtkrcv.trace" /* trace file */

Definition at line 42 of file rtkrcv.cpp.


Function Documentation

static void chop ( char *  str) [static]

Definition at line 163 of file rtkrcv.cpp.

static void closemoni ( void  ) [static]

Definition at line 196 of file rtkrcv.cpp.

static int confwrite ( vt_t vt,
const char *  file 
) [static]

Definition at line 293 of file rtkrcv.cpp.

char get_solution ( double &  lat,
double &  lon,
double &  height 
)

Definition at line 550 of file rtkrcv.cpp.

static int inpvt ( vt_t vt,
char *  buff,
int  nmax 
) [static]

Definition at line 255 of file rtkrcv.cpp.

int loadrosopts ( opt_t *  opts)

Definition at line 6 of file ros_options.cpp.

static int openmoni ( int  port) [static]

Definition at line 181 of file rtkrcv.cpp.

static int outvt ( vt_t vt,
char *  buff,
int  n 
) [static]

Definition at line 246 of file rtkrcv.cpp.

static int printvt ( vt_t vt,
const char *  format,
  ... 
) [static]

Definition at line 273 of file rtkrcv.cpp.

static void readant ( vt_t vt,
prcopt_t *  opt,
nav_t *  nav 
) [static]

Definition at line 327 of file rtkrcv.cpp.

static int readcmd ( const char *  file,
char *  cmd,
int  type 
) [static]

Definition at line 307 of file rtkrcv.cpp.

static int readremote ( vt_t vt,
char *  buff,
int  nmax 
) [static]

Definition at line 210 of file rtkrcv.cpp.

static void* sendkeepalive ( void *  arg) [static]

Definition at line 169 of file rtkrcv.cpp.

int start_rtkrcv ( int  argc,
char **  argv 
)

Definition at line 493 of file rtkrcv.cpp.

static int startsvr ( vt_t vt) [static]

Definition at line 363 of file rtkrcv.cpp.

void stop_rtkrcv ( )

Definition at line 534 of file rtkrcv.cpp.

static void stopsvr ( vt_t vt) [static]

Definition at line 439 of file rtkrcv.cpp.

static int writeremote ( vt_t vt,
char *  buff,
int  n 
) [static]

Definition at line 227 of file rtkrcv.cpp.


Variable Documentation

int buffsize = 32768 [static]

Definition at line 83 of file rtkrcv.cpp.

filopt_t filopt = {""} [static]

Definition at line 99 of file rtkrcv.cpp.

int fswapmargin = 30 [static]

Definition at line 95 of file rtkrcv.cpp.

int keepalive = 0 [static]

Definition at line 94 of file rtkrcv.cpp.

FILE* logfp = NULL [static]

Definition at line 66 of file rtkrcv.cpp.

int modflgr[256] = {0} [static]

Definition at line 91 of file rtkrcv.cpp.

int modflgs[256] = {0} [static]

Definition at line 92 of file rtkrcv.cpp.

stream_t moni [static]

Definition at line 64 of file rtkrcv.cpp.

int moniport = 0 [static]

Definition at line 93 of file rtkrcv.cpp.

int navmsgsel = 0 [static]

Definition at line 84 of file rtkrcv.cpp.

int nmeacycle = 5000 [static]

Definition at line 82 of file rtkrcv.cpp.

double nmeapos[] = {0,0} [static]

Definition at line 87 of file rtkrcv.cpp.

int nmeareq = 0 [static]

Definition at line 86 of file rtkrcv.cpp.

int outstat = 0 [static]

Definition at line 489 of file rtkrcv.cpp.

char passwd[MAXSTR] = "admin" [static]

Definition at line 68 of file rtkrcv.cpp.

prcopt_t prcopt [static]

Definition at line 97 of file rtkrcv.cpp.

char proxyaddr[256] = "" [static]

Definition at line 85 of file rtkrcv.cpp.

int rcv_trace = 0 [static]

Definition at line 489 of file rtkrcv.cpp.

char rcvcmds[3][MAXSTR] = {""} [static]

Definition at line 88 of file rtkrcv.cpp.

opt_t rcvopts[] [static]

Definition at line 112 of file rtkrcv.cpp.

int reconnect = 10000 [static]

Definition at line 81 of file rtkrcv.cpp.

int solflag = 2 [static]

Definition at line 71 of file rtkrcv.cpp.

solopt_t solopt[2] = {{0}} [static]

Definition at line 98 of file rtkrcv.cpp.

int soltype = 0 [static]

Definition at line 70 of file rtkrcv.cpp.

char startcmd[MAXSTR] = "" [static]

Definition at line 89 of file rtkrcv.cpp.

char stopcmd[MAXSTR] = "" [static]

Definition at line 90 of file rtkrcv.cpp.

int strfmt[] [static]
Initial value:
{                   
    STRFMT_UBX,STRFMT_RTCM3,STRFMT_SP3,SOLF_LLH,SOLF_NMEA
}

Definition at line 76 of file rtkrcv.cpp.

char strpath[8][MAXSTR] = {""} [static]

Definition at line 75 of file rtkrcv.cpp.

int strtype[] [static]
Initial value:
{                  
    STR_SERIAL,STR_NONE,STR_NONE,STR_NONE,STR_NONE,STR_NONE,STR_NONE,STR_NONE
}

Definition at line 72 of file rtkrcv.cpp.

rtksvr_t svr [static]

Definition at line 63 of file rtkrcv.cpp.

vt_t svr_vt = {0} [static]

Definition at line 488 of file rtkrcv.cpp.

int svrcycle = 10 [static]

Definition at line 79 of file rtkrcv.cpp.

int timeout = 10000 [static]

Definition at line 80 of file rtkrcv.cpp.

int timetype = 0 [static]

Definition at line 69 of file rtkrcv.cpp.



rtkrcv
Author(s): Manuel Stahl
autogenerated on Mon Oct 6 2014 00:14:21