Changeset 6554 in ntrip for trunk/clock_and_orbit


Ignore:
Timestamp:
Jan 19, 2015, 11:51:09 AM (10 years ago)
Author:
stoecker
Message:

fix some compiler warnings

Location:
trunk/clock_and_orbit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/clock_and_orbit/makefile

    r6209 r6554  
    11all: readco readVtec readRTCM3
    2 CC       = gcc
    3 CXX      = g++
    4 DEFINES  = -DNO_RTCM3_MAIN
    5 CFLAGS   = -ggdb  $(DEFINES)
    6 CXXFLAGS = -ggdb  $(DEFINES)
     2CC         = gcc
     3CXX        = g++
     4DEFINES    = -DNO_RTCM3_MAIN
     5CFLAGS     = -ggdb -Wall $(DEFINES) -I lib
     6CFLAGSR    = $(CFLAGS) -I ../rtcm3torinex/lib/ -DNO_RTCM3_MAIN
     7LFLAGS     = -ggdb -lm
     8CXXFLAGS   = -ggdb -Wall $(DEFINES) -I lib
     9CXXFLAGSR  = $(CXXFLAGS) -I ../rtcm3torinex/lib/
     10CXXFLAGSRL = $(CXXFLAGSR) -lm
    711
    812clock_orbit_rtcm.o: lib/clock_orbit_rtcm.c
    9         $(CC) -c $(CFLAGS) -o $@ $< -I lib
     13        $(CC) -c $(CFLAGS) -o $@ $<
    1014
    11 rtcm3torinex.o: lib/rtcm3torinex.c
    12         $(CC) -c $(CFLAGS) -o $@ $< -I lib 
    13 
     15rtcm3torinex.o: ../rtcm3torinex/lib/rtcm3torinex.c
     16        $(CC) -c $(CFLAGSR) -o $@ $<
    1417
    1518readco.o: readco.c clock_orbit_rtcm.o
    16         $(CC) -c $(CFLAGS) $< -I lib
     19        $(CC) -c $(CFLAGS) -o $@ $<
    1720
    1821readVtec.o: readVtec.c
    19         $(CC) -c $(CFLAGS) $< -I lib
     22        $(CC) -c $(CFLAGS) -o $@ $<
    2023
    2124readRTCM3.o: readRTCM3.cpp
    22         $(CXX) -c $(CXXFLAGS) $< -I lib
    23        
     25        $(CXX) -c $(CXXFLAGSR) $< -I lib
    2426
    2527readco: readco.o clock_orbit_rtcm.o
    26         $(CC) $(CFLAGS) -lm -o $@ readco.o clock_orbit_rtcm.o
     28        $(CC) $(LFLAGS) -o $@ readco.o clock_orbit_rtcm.o
    2729
    2830readVtec: readVtec.o clock_orbit_rtcm.o
    29         $(CC) $(CFLAGS) -lm -o $@ readVtec.o clock_orbit_rtcm.o
     31        $(CC) $(LFLAGS) -o $@ readVtec.o clock_orbit_rtcm.o
    3032
    3133readRTCM3: readRTCM3.o clock_orbit_rtcm.o rtcm3torinex.o
    32         $(CXX) $(CXXFLAGS) -lm -o $@ readRTCM3.o clock_orbit_rtcm.o rtcm3torinex.o
    33        
     34        $(CXX) $(CXXFLAGSRL) -o $@ readRTCM3.o clock_orbit_rtcm.o rtcm3torinex.o
    3435
    3536clean:
  • trunk/clock_and_orbit/readco.c

    r5669 r6554  
    44#include <string.h>
    55#include <stdlib.h>
     6#include <unistd.h>
    67#include <math.h>
    78
     
    1819
    1920void printClockOrbit(const char* filename, struct ClockOrbit* clockOrb,
    20         char* flag, int ind, char satSys, int offsetGnss);
     21        const char* flag, int ind, char satSys, int offsetGnss);
    2122void printClockOrbitDiff(const char* filename, struct ClockOrbit* clockOrb1,
    22         struct ClockOrbit* clockOrb2, char* flag, int ind, char satSys, int offsetGnss);
     23        struct ClockOrbit* clockOrb2, const char* flag, int ind, char satSys, int offsetGnss);
    2324void printCodeBias(const char* filename, struct CodeBias* codeBias,
    24         char* flag,int ind, char satSys, int offsetGnss);
     25        const char* flag,int ind, char satSys, int offsetGnss);
    2526void printCodeBiasDiff(const char* filename, struct CodeBias* codeBias1,
    26         struct CodeBias* codeBias2, char* flag, int ind, char satSys,
     27        struct CodeBias* codeBias2, const char* flag, int ind, char satSys,
    2728        int offsetGnss);
    2829
    2930int main(void) {
    30     enum COR_SATSYSTEM sys;
    31     char* inputFile = "ssr1_cocb_data/CLK801330.14C";
     31    SATSYS sys;
     32    const char * inputFile = "ssr1_cocb_data/CLK801330.14C";
    3233    for (sys = GPS; sys <= BDS; ++sys) {
    33         char *outFilenameRaw, *outFilenameDbg;
     34        const char *outFilenameRaw, *outFilenameDbg;
    3435        enum COR_SATSYSTEM CLOCKORBIT_SATGNSS = sys;
    3536        enum COR_OFFSETS CLOCKORBIT_OFFSETGNSS;
     
    8485            double cbValue[3] = { 0.0 }, clock_a0 = 0.0, clock_a1 = 0.0, clock_a2 = 0.0, d_radial = 0.0;
    8586            double d_along = 0.0, d_outofplane = 0.0, dd_radial = 0.0, dd_along = 0.0, dd_outofplane = 0.0;
    86             enum CodeType cbType[3] = { 0 };
     87            int cbType[3] = { 0 };
    8788            static double tow_co, tow_cb;
    88             int num = sscanf(buffer, "%d ", &messageType);
     89            sscanf(buffer, "%d ", &messageType);
    8990            if (messageType == messageTypeCo[GPS]) {
    9091                sscanf(buffer,
     
    270271        }
    271272        free(buffer);
    272         close(asciiSsr);
     273        fclose(asciiSsr);
    273274    }
    274275    return 0;
     
    276277
    277278void printClockOrbit(const char* filename, struct ClockOrbit* clockOrb,
    278         char* flag, int ind, char satSys, int offsetGnss) {
     279        const char* flag, int ind, char satSys, int offsetGnss) {
    279280    int i = 0;
    280281    FILE *filestream = fopen(filename, "ab+");
     
    306307
    307308void printClockOrbitDiff(const char* filename, struct ClockOrbit* clockOrb1,
    308         struct ClockOrbit* clockOrb2, char* flag, int ind, char satSys,
     309        struct ClockOrbit* clockOrb2, const char* flag, int ind, char satSys,
    309310        int offsetGnss) {
    310311    int i = 0;
     
    349350}
    350351
    351 void printCodeBias(const char* filename, struct CodeBias* codeBias, char* flag,
     352void printCodeBias(const char* filename, struct CodeBias* codeBias, const char* flag,
    352353        int ind, char satSys, int offsetGnss) {
    353354    int i = 0;
     
    375376
    376377void printCodeBiasDiff(const char* filename, struct CodeBias* codeBias1,
    377         struct CodeBias* codeBias2, char* flag, int ind, char satSys,
     378        struct CodeBias* codeBias2, const char* flag, int ind, char satSys,
    378379        int offsetGnss) {
    379380    int i = 0;
Note: See TracChangeset for help on using the changeset viewer.