diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-04-14 02:20:36 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-04-14 02:20:36 -0400 |
commit | d9f97dd6d3b4bba2ebb4917a07701551e02ed132 (patch) | |
tree | c8560d0c83815451bdeb77a27fe9cf1ed1ed73bd | |
parent | c8b6a91fdfaedbf5e2e99f4a6279b52210596f73 (diff) | |
download | gpsd-d9f97dd6d3b4bba2ebb4917a07701551e02ed132.tar.gz |
Reindent some things again, needed due to new controls.
All regression tests pass.
-rw-r--r-- | cgps.c | 71 | ||||
-rw-r--r-- | driver_rtcm3.c | 194 |
2 files changed, 132 insertions, 133 deletions
@@ -195,7 +195,7 @@ static float true2magnetic(double lat, double lon, double heading) (0.000222521 * pow(lon, 3)) + heading); } else { /* We don't know how to compute magnetic heading for this - location. */ + * location. */ magnetic_flag = false; } @@ -250,23 +250,23 @@ static enum deg_str_type deg_type = deg_dd; static void windowsetup(void) { /* Set the window sizes per the following criteria: - - 1. Set the window size to display the maximum number of - satellites possible, but not more than the size required to - display the maximum number of satellites gpsd is capable of - tracking (MAXCHANNELS - 2). - - 2. If the screen size will not allow for the full complement of - satellites to be displayed, set the windows sizes smaller, but - not smaller than the number of lines necessary to display all of - the fields in the 'datawin'. The list of displayed satellites - will be truncated to fit the available window size. (TODO: If - the satellite list is truncated, omit the satellites not used to - obtain the current fix.) - - 3. If the screen is large enough to display all possible - satellites (MAXCHANNELS - 2) with space still left at the bottom, - add a window at the bottom in which to scroll raw gpsd data. + * + * 1. Set the window size to display the maximum number of + * satellites possible, but not more than the size required to + * display the maximum number of satellites gpsd is capable of + * tracking (MAXCHANNELS - 2). + * + * 2. If the screen size will not allow for the full complement of + * satellites to be displayed, set the windows sizes smaller, but + * not smaller than the number of lines necessary to display all of + * the fields in the 'datawin'. The list of displayed satellites + * will be truncated to fit the available window size. (TODO: If + * the satellite list is truncated, omit the satellites not used to + * obtain the current fix.) + * + * 3. If the screen is large enough to display all possible + * satellites (MAXCHANNELS - 2) with space still left at the bottom, + * add a window at the bottom in which to scroll raw gpsd data. */ int xsize, ysize; @@ -389,12 +389,12 @@ static void windowsetup(void) (void)mvwprintw(datawin, 9, DATAWIN_DESC_OFFSET, "GPS Type:"); /* Note that the following four fields are exceptions to the - sizing rule. The minimum window size does not include these - fields, if the window is too small, they get excluded. This - may or may not change if/when the output for these fields is - fixed and/or people request their permanance. They're only - there in the first place because I arbitrarily thought they - sounded interesting. ;^) */ + * sizing rule. The minimum window size does not include these + * fields, if the window is too small, they get excluded. This + * may or may not change if/when the output for these fields is + * fixed and/or people request their permanance. They're only + * there in the first place because I arbitrarily thought they + * sounded interesting. ;^) */ if (window_length >= (MIN_GPS_DATAWIN_SIZE + 4)) { (void)mvwprintw(datawin, 10, DATAWIN_DESC_OFFSET, @@ -492,9 +492,9 @@ static void update_gps_panel(struct gps_data_t *gpsdata, } /* This is for the satellite status display. Originally lifted from - xgps.c. Note that the satellite list may be truncated based on - available screen size, or may only show satellites used for the - fix. */ + * xgps.c. Note that the satellite list may be truncated based on + * available screen size, or may only show satellites used for the + * fix. */ if (gpsdata->satellites_visible != 0) { if (display_sats >= MAX_POSSIBLE_SATS) { for (i = 0; i < MAX_POSSIBLE_SATS; i++) { @@ -517,8 +517,7 @@ static void update_gps_panel(struct gps_data_t *gpsdata, if (n < display_sats) { if ((i < gpsdata->satellites_visible) && ((gpsdata->used[i] != 0) - || (gpsdata->satellites_visible <= - display_sats))) { + || (gpsdata->satellites_visible <= display_sats))) { (void)snprintf(scr, sizeof(scr), " %3d %02d %03d %02d %c", gpsdata->PRN[i], gpsdata->elevation[i], @@ -607,7 +606,7 @@ static void update_gps_panel(struct gps_data_t *gpsdata, (void)mvwprintw(datawin, 7, DATAWIN_VALUE_OFFSET, "%-*s", 27, scr); /* Fill in the GPS status and the time since the last state - change. */ + * change. */ if (gpsdata->online == 0) { newstate = 0; (void)snprintf(scr, sizeof(scr), "OFFLINE"); @@ -652,12 +651,12 @@ static void update_gps_panel(struct gps_data_t *gpsdata, (void)mvwprintw(datawin, 9, DATAWIN_VALUE_OFFSET, "%-*s", 27, scr); } /* Note that the following four fields are exceptions to the - sizing rule. The minimum window size does not include these - fields, if the window is too small, they get excluded. This - may or may not change if/when the output for these fields is - fixed and/or people request their permanance. They're only - there in the first place because I arbitrarily thought they - sounded interesting. ;^) */ + * sizing rule. The minimum window size does not include these + * fields, if the window is too small, they get excluded. This + * may or may not change if/when the output for these fields is + * fixed and/or people request their permanance. They're only + * there in the first place because I arbitrarily thought they + * sounded interesting. ;^) */ if (window_length >= (MIN_GPS_DATAWIN_SIZE + 4)) { diff --git a/driver_rtcm3.c b/driver_rtcm3.c index b04102aa..ba5b8858 100644 --- a/driver_rtcm3.c +++ b/driver_rtcm3.c @@ -60,7 +60,7 @@ BSD terms apply: see the file COPYING in the distribution root for details. /* Other magic values */ #define INVALID_PSEUDORANGE 0x80000 /* DF012 */ - /*@ -type @*//* re-enable when we're ready to take this live */ + /*@ -type @*//* re-enable when we're ready to take this live */ void rtcm3_unpack( /*@out@*/ struct rtcm3_t *rtcm, char *buf) /* break out the raw bits into the scaled report-structure fields */ @@ -584,13 +584,13 @@ void rtcm3_dump(struct rtcm3_t *rtcm, FILE * fp) (void)fprintf(fp, " ident=%u\n L1: ind=%u prange=%8.1f delta=%6.4f lockt=%u\n", rtcm->rtcmtypes.rtcm3_1001.rtk_data[i].ident, - CODE(rtcm->rtcmtypes.rtcm3_1003.rtk_data[i].L1. - indicator), - rtcm->rtcmtypes.rtcm3_1001.rtk_data[i].L1. - pseudorange, + CODE(rtcm->rtcmtypes.rtcm3_1003.rtk_data[i]. + L1.indicator), + rtcm->rtcmtypes.rtcm3_1001.rtk_data[i]. + L1.pseudorange, rtcm->rtcmtypes.rtcm3_1001.rtk_data[i].L1.rangediff, - INT(rtcm->rtcmtypes.rtcm3_1001.rtk_data[i].L1. - locktime)); + INT(rtcm->rtcmtypes.rtcm3_1001.rtk_data[i]. + L1.locktime)); } break; @@ -607,15 +607,15 @@ void rtcm3_dump(struct rtcm3_t *rtcm, FILE * fp) (void)fprintf(fp, " ident=%u\n L1: ind=%u prange=%8.1f delta=%6.4f lockt=%u amb=%u CNR=%.2f\n", rtcm->rtcmtypes.rtcm3_1002.rtk_data[i].ident, - CODE(rtcm->rtcmtypes.rtcm3_1003.rtk_data[i].L1. - indicator), - rtcm->rtcmtypes.rtcm3_1002.rtk_data[i].L1. - pseudorange, + CODE(rtcm->rtcmtypes.rtcm3_1003.rtk_data[i]. + L1.indicator), + rtcm->rtcmtypes.rtcm3_1002.rtk_data[i]. + L1.pseudorange, rtcm->rtcmtypes.rtcm3_1002.rtk_data[i].L1.rangediff, - INT(rtcm->rtcmtypes.rtcm3_1002.rtk_data[i].L1. - locktime), - INT(rtcm->rtcmtypes.rtcm3_1002.rtk_data[i].L1. - ambiguity), + INT(rtcm->rtcmtypes.rtcm3_1002.rtk_data[i]. + L1.locktime), + INT(rtcm->rtcmtypes.rtcm3_1002.rtk_data[i]. + L1.ambiguity), rtcm->rtcmtypes.rtcm3_1002.rtk_data[i].L1.CNR); } break; @@ -633,20 +633,20 @@ void rtcm3_dump(struct rtcm3_t *rtcm, FILE * fp) (void)fprintf(fp, " ident=%u\n L1: ind=%u prange=%8.1f delta=%6.4f lockt=%u\n L2: ind=%u prange=%8.1f delta=%6.4f lockt=%u\n", rtcm->rtcmtypes.rtcm3_1003.rtk_data[i].ident, - CODE(rtcm->rtcmtypes.rtcm3_1003.rtk_data[i].L1. - indicator), - rtcm->rtcmtypes.rtcm3_1003.rtk_data[i].L1. - pseudorange, + CODE(rtcm->rtcmtypes.rtcm3_1003.rtk_data[i]. + L1.indicator), + rtcm->rtcmtypes.rtcm3_1003.rtk_data[i]. + L1.pseudorange, rtcm->rtcmtypes.rtcm3_1003.rtk_data[i].L1.rangediff, - INT(rtcm->rtcmtypes.rtcm3_1003.rtk_data[i].L1. - locktime), - CODE(rtcm->rtcmtypes.rtcm3_1003.rtk_data[i].L2. - indicator), - rtcm->rtcmtypes.rtcm3_1003.rtk_data[i].L2. - pseudorange, + INT(rtcm->rtcmtypes.rtcm3_1003.rtk_data[i]. + L1.locktime), + CODE(rtcm->rtcmtypes.rtcm3_1003.rtk_data[i]. + L2.indicator), + rtcm->rtcmtypes.rtcm3_1003.rtk_data[i]. + L2.pseudorange, rtcm->rtcmtypes.rtcm3_1003.rtk_data[i].L2.rangediff, - INT(rtcm->rtcmtypes.rtcm3_1003.rtk_data[i].L2. - locktime)); + INT(rtcm->rtcmtypes.rtcm3_1003.rtk_data[i]. + L2.locktime)); } break; @@ -663,25 +663,25 @@ void rtcm3_dump(struct rtcm3_t *rtcm, FILE * fp) (void)fprintf(fp, " ident=%u\n L1: ind=%u prange=%8.1f delta=%6.4f lockt=%u amb=%u CNR=%.2f\n L2: ind=%u prange=%8.1f delta=%6.4f lockt=%u amb=%u CNR=%.2f\n", rtcm->rtcmtypes.rtcm3_1004.rtk_data[i].ident, - CODE(rtcm->rtcmtypes.rtcm3_1004.rtk_data[i].L1. - indicator), - rtcm->rtcmtypes.rtcm3_1004.rtk_data[i].L1. - pseudorange, + CODE(rtcm->rtcmtypes.rtcm3_1004.rtk_data[i]. + L1.indicator), + rtcm->rtcmtypes.rtcm3_1004.rtk_data[i]. + L1.pseudorange, rtcm->rtcmtypes.rtcm3_1004.rtk_data[i].L1.rangediff, - INT(rtcm->rtcmtypes.rtcm3_1004.rtk_data[i].L1. - locktime), - INT(rtcm->rtcmtypes.rtcm3_1002.rtk_data[i].L1. - ambiguity), + INT(rtcm->rtcmtypes.rtcm3_1004.rtk_data[i]. + L1.locktime), + INT(rtcm->rtcmtypes.rtcm3_1002.rtk_data[i]. + L1.ambiguity), rtcm->rtcmtypes.rtcm3_1002.rtk_data[i].L1.CNR, - CODE(rtcm->rtcmtypes.rtcm3_1004.rtk_data[i].L2. - indicator), - rtcm->rtcmtypes.rtcm3_1004.rtk_data[i].L2. - pseudorange, + CODE(rtcm->rtcmtypes.rtcm3_1004.rtk_data[i]. + L2.indicator), + rtcm->rtcmtypes.rtcm3_1004.rtk_data[i]. + L2.pseudorange, rtcm->rtcmtypes.rtcm3_1004.rtk_data[i].L2.rangediff, - INT(rtcm->rtcmtypes.rtcm3_1004.rtk_data[i].L2. - locktime), - INT(rtcm->rtcmtypes.rtcm3_1004.rtk_data[i].L2. - ambiguity), + INT(rtcm->rtcmtypes.rtcm3_1004.rtk_data[i]. + L2.locktime), + INT(rtcm->rtcmtypes.rtcm3_1004.rtk_data[i]. + L2.ambiguity), rtcm->rtcmtypes.rtcm3_1004.rtk_data[i].L2.CNR); } break; @@ -741,15 +741,15 @@ void rtcm3_dump(struct rtcm3_t *rtcm, FILE * fp) (void)fprintf(fp, " ident=%u\n L1: ind=%u channel=%u prange=%8.1f delta=%6.4f lockt=%u\n", rtcm->rtcmtypes.rtcm3_1009.rtk_data[i].ident, - CODE(rtcm->rtcmtypes.rtcm3_1003.rtk_data[i].L1. - indicator), - INT(rtcm->rtcmtypes.rtcm3_1009.rtk_data[i].L1. - channel), - rtcm->rtcmtypes.rtcm3_1009.rtk_data[i].L1. - pseudorange, + CODE(rtcm->rtcmtypes.rtcm3_1003.rtk_data[i]. + L1.indicator), + INT(rtcm->rtcmtypes.rtcm3_1009.rtk_data[i]. + L1.channel), + rtcm->rtcmtypes.rtcm3_1009.rtk_data[i]. + L1.pseudorange, rtcm->rtcmtypes.rtcm3_1009.rtk_data[i].L1.rangediff, - INT(rtcm->rtcmtypes.rtcm3_1009.rtk_data[i].L1. - locktime)); + INT(rtcm->rtcmtypes.rtcm3_1009.rtk_data[i]. + L1.locktime)); } break; @@ -766,17 +766,17 @@ void rtcm3_dump(struct rtcm3_t *rtcm, FILE * fp) (void)fprintf(fp, " ident=%u\n L1: ind=%u channel=%u prange=%8.1f delta=%6.4f lockt=%u amb=%u CNR=%.2f\n", rtcm->rtcmtypes.rtcm3_1010.rtk_data[i].ident, - CODE(rtcm->rtcmtypes.rtcm3_1003.rtk_data[i].L1. - indicator), - INT(rtcm->rtcmtypes.rtcm3_1010.rtk_data[i].L1. - channel), - rtcm->rtcmtypes.rtcm3_1010.rtk_data[i].L1. - pseudorange, + CODE(rtcm->rtcmtypes.rtcm3_1003.rtk_data[i]. + L1.indicator), + INT(rtcm->rtcmtypes.rtcm3_1010.rtk_data[i]. + L1.channel), + rtcm->rtcmtypes.rtcm3_1010.rtk_data[i]. + L1.pseudorange, rtcm->rtcmtypes.rtcm3_1010.rtk_data[i].L1.rangediff, - INT(rtcm->rtcmtypes.rtcm3_1010.rtk_data[i].L1. - locktime), - INT(rtcm->rtcmtypes.rtcm3_1010.rtk_data[i].L1. - ambiguity), + INT(rtcm->rtcmtypes.rtcm3_1010.rtk_data[i]. + L1.locktime), + INT(rtcm->rtcmtypes.rtcm3_1010.rtk_data[i]. + L1.ambiguity), rtcm->rtcmtypes.rtcm3_1010.rtk_data[i].L1.CNR); } break; @@ -794,22 +794,22 @@ void rtcm3_dump(struct rtcm3_t *rtcm, FILE * fp) (void)fprintf(fp, " ident=%u\n L1: ind=%u channel=%u prange=%8.1f delta=%6.4f lockt=%u\n L2: ind=%u prange=%8.1f delta=%6.4f lockt=%u\n", rtcm->rtcmtypes.rtcm3_1011.rtk_data[i].ident, - CODE(rtcm->rtcmtypes.rtcm3_1011.rtk_data[i].L1. - indicator), - INT(rtcm->rtcmtypes.rtcm3_1011.rtk_data[i].L1. - channel), - rtcm->rtcmtypes.rtcm3_1011.rtk_data[i].L1. - pseudorange, + CODE(rtcm->rtcmtypes.rtcm3_1011.rtk_data[i]. + L1.indicator), + INT(rtcm->rtcmtypes.rtcm3_1011.rtk_data[i]. + L1.channel), + rtcm->rtcmtypes.rtcm3_1011.rtk_data[i]. + L1.pseudorange, rtcm->rtcmtypes.rtcm3_1011.rtk_data[i].L1.rangediff, - INT(rtcm->rtcmtypes.rtcm3_1011.rtk_data[i].L1. - locktime), - CODE(rtcm->rtcmtypes.rtcm3_1011.rtk_data[i].L2. - indicator), - rtcm->rtcmtypes.rtcm3_1011.rtk_data[i].L2. - pseudorange, + INT(rtcm->rtcmtypes.rtcm3_1011.rtk_data[i]. + L1.locktime), + CODE(rtcm->rtcmtypes.rtcm3_1011.rtk_data[i]. + L2.indicator), + rtcm->rtcmtypes.rtcm3_1011.rtk_data[i]. + L2.pseudorange, rtcm->rtcmtypes.rtcm3_1011.rtk_data[i].L2.rangediff, - INT(rtcm->rtcmtypes.rtcm3_1011.rtk_data[i].L2. - locktime)); + INT(rtcm->rtcmtypes.rtcm3_1011.rtk_data[i]. + L2.locktime)); } break; @@ -826,27 +826,27 @@ void rtcm3_dump(struct rtcm3_t *rtcm, FILE * fp) (void)fprintf(fp, " ident=%u\n L1: ind=%u channel=%u prange=%8.1f delta=%6.4f lockt=%u amb=%u CNR=%.2f\n L2: ind=%u prange=%8.1f delta=%6.4f lockt=%u amb=%u CNR=%.2f\n", rtcm->rtcmtypes.rtcm3_1012.rtk_data[i].ident, - CODE(rtcm->rtcmtypes.rtcm3_1012.rtk_data[i].L1. - indicator), - INT(rtcm->rtcmtypes.rtcm3_1012.rtk_data[i].L1. - channel), - rtcm->rtcmtypes.rtcm3_1012.rtk_data[i].L1. - pseudorange, + CODE(rtcm->rtcmtypes.rtcm3_1012.rtk_data[i]. + L1.indicator), + INT(rtcm->rtcmtypes.rtcm3_1012.rtk_data[i]. + L1.channel), + rtcm->rtcmtypes.rtcm3_1012.rtk_data[i]. + L1.pseudorange, rtcm->rtcmtypes.rtcm3_1012.rtk_data[i].L1.rangediff, - INT(rtcm->rtcmtypes.rtcm3_1012.rtk_data[i].L1. - locktime), - INT(rtcm->rtcmtypes.rtcm3_1012.rtk_data[i].L1. - ambiguity), + INT(rtcm->rtcmtypes.rtcm3_1012.rtk_data[i]. + L1.locktime), + INT(rtcm->rtcmtypes.rtcm3_1012.rtk_data[i]. + L1.ambiguity), rtcm->rtcmtypes.rtcm3_1012.rtk_data[i].L1.CNR, - CODE(rtcm->rtcmtypes.rtcm3_1012.rtk_data[i].L2. - indicator), - rtcm->rtcmtypes.rtcm3_1012.rtk_data[i].L2. - pseudorange, + CODE(rtcm->rtcmtypes.rtcm3_1012.rtk_data[i]. + L2.indicator), + rtcm->rtcmtypes.rtcm3_1012.rtk_data[i]. + L2.pseudorange, rtcm->rtcmtypes.rtcm3_1012.rtk_data[i].L2.rangediff, - INT(rtcm->rtcmtypes.rtcm3_1012.rtk_data[i].L2. - locktime), - INT(rtcm->rtcmtypes.rtcm3_1012.rtk_data[i].L2. - ambiguity), + INT(rtcm->rtcmtypes.rtcm3_1012.rtk_data[i]. + L2.locktime), + INT(rtcm->rtcmtypes.rtcm3_1012.rtk_data[i]. + L2.ambiguity), rtcm->rtcmtypes.rtcm3_1012.rtk_data[i].L2.CNR); } break; @@ -863,10 +863,10 @@ void rtcm3_dump(struct rtcm3_t *rtcm, FILE * fp) (void)fprintf(fp, " id=%u sync=%c interval=%u\n", rtcm->rtcmtypes.rtcm3_1013.announcements[i].id, - BOOL(rtcm->rtcmtypes.rtcm3_1013.announcements[i]. - sync), - rtcm->rtcmtypes.rtcm3_1013.announcements[i]. - interval); + BOOL(rtcm->rtcmtypes.rtcm3_1013. + announcements[i].sync), + rtcm->rtcmtypes.rtcm3_1013. + announcements[i].interval); break; case 1014: |