[Git][NTPsec/ntpsec][master] 3 commits: libparse: remove unused array, and wrong file comment.
Gary E. Miller
gitlab at mg.gitlab.com
Tue May 23 05:06:27 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
01905e33 by Gary E. Miller at 2017-05-22T21:32:58-07:00
libparse: remove unused array, and wrong file comment.
- - - - -
bde80491 by Gary E. Miller at 2017-05-22T21:37:01-07:00
remove unused extern: get_free_recv_buffer_alloc()
- - - - -
988e009c by Gary E. Miller at 2017-05-22T22:05:32-07:00
mbg_gps166: remove lots of unused cruft.
- - - - -
3 changed files:
- include/mbg_gps166.h
- include/recvbuff.h
- libparse/info_trimble.c
Changes:
=====================================
include/mbg_gps166.h
=====================================
--- a/include/mbg_gps166.h
+++ b/include/mbg_gps166.h
@@ -58,11 +58,6 @@
/**
- * @brief Enumeration of handshake modes
- */
-enum COM_HANSHAKE_MODES { HS_NONE, HS_XONXOFF, HS_RTSCTS, N_COM_HS };
-
-/**
* @brief A data type to configure a serial port's baud rate
*
* @see ::MBG_BAUD_RATES
@@ -70,13 +65,6 @@ enum COM_HANSHAKE_MODES { HS_NONE, HS_XONXOFF, HS_RTSCTS, N_COM_HS };
typedef int32_t BAUD_RATE;
/**
- * @brief Indices used to identify a parameter in the framing string
- *
- * @see ::MBG_FRAMING_STRS
- */
-enum MBG_FRAMING_STR_IDXS { F_DBITS, F_PRTY, F_STBITS };
-
-/**
* @brief A structure to store the configuration of a serial port
*/
typedef struct
@@ -109,29 +97,6 @@ enum STR_MODES
/**
- * The number of serial ports which are at least available
- * even with very old GPS receiver models. For devices providing
- * a ::RECEIVER_INFO structure the number of provided COM ports
- * is available in ::RECEIVER_INFO::n_com_ports.
- */
-#define DEFAULT_N_COM 2
-
-
-/**
- * @brief A The structure used to store the configuration of two serial ports
- *
- * @deprecated This structure is deprecated, ::PORT_SETTINGS and related structures
- * should be used instead, if supported by the device.
- */
-typedef struct
-{
- COM_PARM com[DEFAULT_N_COM]; ///< COM0 and COM1 settings
- uint8_t mode[DEFAULT_N_COM]; ///< COM0 and COM1 output mode
-
-} PORT_PARM;
-
-
-/**
* @brief The type of a GPS command code
*
* @see ::GPS_CMD_CODES
@@ -441,24 +406,6 @@ enum TM_GPS_STATUS_BIT_MASKS
};
-/**
- * @brief A structure used to transmit information on date and time
- *
- * This structure can be used to transfer the current time, in which
- * case the channel field has to be set to -1, or an event capture time
- * retrieved from the on-board FIFO, in which case the channel field
- * contains the index of the time capture input, e.g. 0 or 1.
- */
-typedef struct
-{
- int16_t channel; ///< -1: the current on-board time; >= 0 the capture channel number
- T_GPS t; ///< time in GPS scale and format
- TM_GPS tm; ///< time converted to %UTC and/or local time according to ::TZDL settings
-
-} TTM;
-
-
-
/* Two types of variables used to store a position. Type XYZ is */
/* used with a position in earth centered, earth fixed (ECEF) */
/* coordinates whereas type LLA holds such a position converted */
@@ -557,11 +504,6 @@ typedef l_fp LLA[N_LLA];
/* == MAX_SYNTH_FREQ * 10^(MAX_SYNTH_RANGE-1) */
/**
- * @brief The synthesizer's phase is only be synchronized if the frequency is below this limit
- */
-#define SYNTH_PHASE_SYNC_LIMIT 10000UL ///< 10 kHz
-
-/**
* A Macro used to determine the position of the decimal point
* when printing the synthesizer frequency as 4 digit value
*/
@@ -597,14 +539,6 @@ typedef struct
} SYNTH;
-#define _mbg_swab_synth( _p ) \
-{ \
- _mbg_swab16( &(_p)->freq ); \
- _mbg_swab16( &(_p)->range ); \
- _mbg_swab16( &(_p)->phase ); \
-}
-
-
/**
* @brief Enumeration of synthesizer states
*/
@@ -629,29 +563,9 @@ typedef struct
} SYNTH_STATE;
-#define _mbg_swab_synth_state( _p ) _nop_macro_fnc()
-
-#define SYNTH_FLAG_PHASE_IGNORED 0x01
-
/** @} defgroup group_synth */
-
-/**
- * @defgroup group_tzdl Time zone / daylight saving parameters
- *
- * Example: <br>
- * For automatic daylight saving enable/disable in Central Europe,
- * the variables are to be set as shown below: <br>
- * - offs = 3600L one hour from %UTC
- * - offs_dl = 3600L one additional hour if daylight saving enabled
- * - tm_on = first Sunday from March 25, 02:00:00h ( year |= ::DL_AUTO_FLAG )
- * - tm_off = first Sunday from October 25, 03:00:00h ( year |= ::DL_AUTO_FLAG )
- * - name[0] == "CET " name if daylight saving not enabled
- * - name[1] == "CEST " name if daylight saving is enabled
- *
- * @{ */
-
/**
* @brief The name of a time zone
*
@@ -660,41 +574,6 @@ typedef struct
typedef char TZ_NAME[6];
/**
- * @brief Time zone / daylight saving parameters
- *
- * This structure is used to specify how a device converts on-board %UTC
- * to local time, including computation of beginning and end of daylight
- * saving time (DST), if required.
- *
- * @note The ::TZDL structure contains members of type ::TM_GPS to specify
- * the times for beginning and end of DST. However, the ::TM_GPS::frac,
- * ::TM_GPS::offs_from_utc, and ::TM_GPS::status fields of these ::TZDL::tm_on
- * and ::TZDL::tm_off members are ignored for the conversion to local time,
- * and thus should be 0.
- */
-typedef struct
-{
- int32_t offs; ///< standard offset from %UTC to local time [sec]
- int32_t offs_dl; ///< additional offset if daylight saving enabled [sec]
- TM_GPS tm_on; ///< date/time when daylight saving starts
- TM_GPS tm_off; ///< date/time when daylight saving ends
- TZ_NAME name[2]; ///< names without and with daylight saving enabled
-
-} TZDL;
-
-/**
- * @brief A flag indicating automatic computation of DST
- *
- * If this flag is or'ed to the year numbers in ::TZDL::tm_on and ::TZDL::tm_off
- * then daylight saving is computed automatically year by year.
- */
-#define DL_AUTO_FLAG 0x8000
-
-/** @} defgroup group_tzdl */
-
-
-
-/**
* @brief Antenna status and error at reconnect information
*
* The structure below reflects the status of the antenna,
@@ -818,107 +697,6 @@ typedef struct
} ASCII_MSG;
-/**
- * @brief Ephemeris parameters of one specific satellite
- *
- * Needed to compute the position of a satellite at a given time with
- * high precision. Valid for an interval of 4 to 6 hours from start
- * of transmission.
- */
-typedef struct
-{
- CSUM csum; ///< checksum of the remaining bytes
- int16_t valid; ///< flag data are valid
-
- HEALTH health; ///< health indication of transmitting SV [---]
- IOD IODC; ///< Issue Of Data, Clock
- IOD IODE2; ///< Issue of Data, Ephemeris (Subframe 2)
- IOD IODE3; ///< Issue of Data, Ephemeris (Subframe 3)
- T_GPS tt; ///< time of transmission
- T_GPS t0c; ///< Reference Time Clock [---]
- T_GPS t0e; ///< Reference Time Ephemeris [---]
-
- l_fp sqrt_A; ///< Square Root of semi-major Axis [sqrt(m)]
- l_fp e; ///< Eccentricity [---]
- l_fp M0; ///< +- Mean Anomaly at Ref. Time [rad]
- l_fp omega; ///< +- Argument of Perigee [rad]
- l_fp OMEGA0; ///< +- Longit. of Asc. Node of orbit plane [rad]
- l_fp OMEGADOT; ///< +- Rate of Right Ascension [rad/sec]
- l_fp deltan; ///< +- Mean Motion Diff. from computed value [rad/sec]
- l_fp i0; ///< +- Inclination Angle [rad]
- l_fp idot; ///< +- Rate of Inclination Angle [rad/sec]
- l_fp crc; ///< +- Cosine Corr. Term to Orbit Radius [m]
- l_fp crs; ///< +- Sine Corr. Term to Orbit Radius [m]
- l_fp cuc; ///< +- Cosine Corr. Term to Arg. of Latitude [rad]
- l_fp cus; ///< +- Sine Corr. Term to Arg. of Latitude [rad]
- l_fp cic; ///< +- Cosine Corr. Term to Inclination Angle [rad]
- l_fp cis; ///< +- Sine Corr. Term to Inclination Angle [rad]
-
- l_fp af0; ///< +- Clock Correction Coefficient 0 [sec]
- l_fp af1; ///< +- Clock Correction Coefficient 1 [sec/sec]
- l_fp af2; ///< +- Clock Correction Coefficient 2 [sec/sec^2]
- l_fp tgd; ///< +- estimated group delay differential [sec]
-
- uint16_t URA; ///< predicted User Range Accuracy
-
- uint8_t L2code; ///< code on L2 channel [---]
- uint8_t L2flag; ///< L2 P data flag [---]
-
-} EPH;
-
-
-
-/**
- * @brief Almanac parameters of one specific satellite
- *
- * A reduced precision set of parameters used to check if a satellite
- * is in view at a given time. Valid for an interval of more than 7 days
- * from start of transmission.
- */
-typedef struct
-{
- CSUM csum; ///< checksum of the remaining bytes
- int16_t valid; ///< flag data are valid
-
- HEALTH health; ///< [---]
- T_GPS t0a; ///< Reference Time Almanac [sec]
-
- l_fp sqrt_A; ///< Square Root of semi-major Axis [sqrt(m)]
- l_fp e; ///< Eccentricity [---]
-
- l_fp M0; ///< +- Mean Anomaly at Ref. Time [rad]
- l_fp omega; ///< +- Argument of Perigee [rad]
- l_fp OMEGA0; ///< +- Longit. of Asc. Node of orbit plane [rad]
- l_fp OMEGADOT; ///< +- Rate of Right Ascension [rad/sec]
- l_fp deltai; ///< +- [rad]
- l_fp af0; ///< +- Clock Correction Coefficient 0 [sec]
- l_fp af1; ///< +- Clock Correction Coefficient 1 [sec/sec]
-
-} ALM;
-
-
-
-/**
- * @brief Ionospheric correction parameters
- */
-typedef struct
-{
- CSUM csum; ///< checksum of the remaining bytes
- int16_t valid; ///< flag data are valid
-
- l_fp alpha_0; ///< Ionosph. Corr. Coeff. Alpha 0 [sec]
- l_fp alpha_1; ///< Ionosph. Corr. Coeff. Alpha 1 [sec/deg]
- l_fp alpha_2; ///< Ionosph. Corr. Coeff. Alpha 2 [sec/deg^2]
- l_fp alpha_3; ///< Ionosph. Corr. Coeff. Alpha 3 [sec/deg^3]
-
- l_fp beta_0; ///< Ionosph. Corr. Coeff. Beta 0 [sec]
- l_fp beta_1; ///< Ionosph. Corr. Coeff. Beta 1 [sec/deg]
- l_fp beta_2; ///< Ionosph. Corr. Coeff. Beta 2 [sec/deg^2]
- l_fp beta_3; ///< Ionosph. Corr. Coeff. Beta 3 [sec/deg^3]
-
-} IONO;
-
-
void mbg_tm_str (char **, TM_GPS *, size_t, int);
void mbg_tgps_str (char **, T_GPS *, size_t);
=====================================
include/recvbuff.h
=====================================
--- a/include/recvbuff.h
+++ b/include/recvbuff.h
@@ -75,8 +75,6 @@ extern void freerecvbuf(struct recvbuf *);
/* signal safe - no malloc */
extern struct recvbuf *get_free_recv_buffer(void);
-/* signal unsafe - may malloc */
-extern struct recvbuf *get_free_recv_buffer_alloc(void);
/* Add a buffer to the full list
*/
=====================================
libparse/info_trimble.c
=====================================
--- a/libparse/info_trimble.c
+++ b/libparse/info_trimble.c
@@ -1,56 +1,9 @@
-/*
- * Automatically generated - do not modify
- */
#include "config.h"
#include "ntp_types.h"
#include "ntpd.h"
#include "trimble.h"
-cmd_info_t trimble_scmds[] = {
- { CMD_CCLROSC, "CMD_CCLROSC", "clear oscillator offset (0x1D)", "", 0 },
- { CMD_CCLRRST, "CMD_CCLRRST", "clear battery backup and RESET (0x1E)", "", 0 },
- { CMD_CVERSION, "CMD_CVERSION", "return software version (0x1F)", "", 0 },
- { CMD_CALMANAC, "CMD_CALMANAC", "almanac (0x20)", "", 0 },
- { CMD_CCURTIME, "CMD_CCURTIME", "current time (0x21)", "", 0 },
- { CMD_CMODESEL, "CMD_CMODESEL", "mode select (2-d, 3-D, auto) (0x22)", "", 0 },
- { CMD_CINITPOS, "CMD_CINITPOS", "initial position (0x23)", "", 0 },
- { CMD_CRECVPOS, "CMD_CRECVPOS", "receiver position fix mode (0x24)", "", 0 },
- { CMD_CRESET, "CMD_CRESET", "soft reset & selftest (0x25)", "", 0 },
- { CMD_CRECVHEALTH, "CMD_CRECVHEALTH", "receiver health (0x26)", "", 0 },
- { CMD_CSIGNALLV, "CMD_CSIGNALLV", "signal levels (0x27)", "", 0 },
- { CMD_CMESSAGE, "CMD_CMESSAGE", "GPS system message (0x28)", "", 0 },
- { CMD_CALMAHEALTH, "CMD_CALMAHEALTH", "almanac healt page (0x29)", "", 0 },
- { CMD_C2DALTITUDE, "CMD_C2DALTITUDE", "altitude for 2-D mode (0x2A)", "", 0 },
- { CMD_CINITPOSLLA, "CMD_CINITPOSLLA", "initial position LLA (0x2B)", "", 0 },
- { CMD_COPERPARAM, "CMD_COPERPARAM", "operating parameters (0x2C)", "", 0 },
- { CMD_COSCOFFSET, "CMD_COSCOFFSET", "oscillator offset (0x2D)", "", 0 },
- { CMD_CSETGPSTIME, "CMD_CSETGPSTIME", "set GPS time (0x2E)", "", 0 },
- { CMD_CUTCPARAM, "CMD_CUTCPARAM", "UTC parameters (0x2F)", "", 0 },
- { CMD_CACCPOSXYZ, "CMD_CACCPOSXYZ", "accurate initial position (XYZ/ECEF) (0x31)", "", 0 },
- { CMD_CACCPOS, "CMD_CACCPOS", "accurate initial position (0x32)", "", 0 },
- { CMD_CANALOGDIG, "CMD_CANALOGDIG", "analog to digital (0x33)", "", 0 },
- { CMD_CSAT1SAT, "CMD_CSAT1SAT", "satellite for 1-Sat mode (0x34)", "", 0 },
- { CMD_CIOOPTIONS, "CMD_CIOOPTIONS", "I/O options (0x35)", "", 0 },
- { CMD_CVELOCAID, "CMD_CVELOCAID", "velocity aiding of acquisition (0x36)", "", 0 },
- { CMD_CSTATLSTPOS, "CMD_CSTATLSTPOS", "status and values of last pos. and vel. (0x37)", "", 0 },
- { CMD_CLOADSSATDT, "CMD_CLOADSSATDT", "load satellite system data (0x38)", "", 0 },
- { CMD_CSATDISABLE, "CMD_CSATDISABLE", "satellite disable (0x39)", "", 0 },
- { CMD_CLASTRAW, "CMD_CLASTRAW", "last raw measurement (0x3A)", "", 0 },
- { CMD_CSTATSATEPH, "CMD_CSTATSATEPH", "satellite ephemeris status (0x3B)", "", 0 },
- { CMD_CSTATTRACK, "CMD_CSTATTRACK", "tracking status (0x3C)", "", 0 },
- { CMD_CCHANADGPS, "CMD_CCHANADGPS", "configure channel A for differential GPS (0x3D)", "", 0 },
- { CMD_CADDITFIX, "CMD_CADDITFIX", "additional fix data (0x3E)", "", 0 },
- { CMD_CDGPSFIXMD, "CMD_CDGPSFIXMD", "set/request differential GPS position fix mode (0x62)", "", 0 },
- { CMD_CDGPSCORR, "CMD_CDGPSCORR", "differential correction status (0x65)", "", 0 },
- { CMD_CPOSFILT, "CMD_CPOSFILT", "position filter parameters (0x71)", "", 0 },
- { CMD_CHEIGHTFILT, "CMD_CHEIGHTFILT", "height filter control (0x73)", "", 0 },
- { CMD_CHIGH8CNT, "CMD_CHIGH8CNT", "high-8 (best 4) / high-6 (overdetermined) control (0x75)", "", 0 },
- { CMD_CMAXDGPSCOR, "CMD_CMAXDGPSCOR", "maximum rate of DGPS corrections (0x77)", "", 0 },
- { CMD_CSUPER, "CMD_CSUPER", "super paket (0x8E)", "", 0 },
- { 0xFF, "", "", "", 0 }
-};
-
cmd_info_t trimble_rcmds[] = {
{ CMD_RDATAA, "CMD_RDATAA", "data channel A configuration (0x3D)", "trimble_channelA", RO },
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/b2cb75c2802cef3902db83f2b2bac5ee11ae7a8f...988e009cb059c17fdc1e38256174f90268c027fe
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/b2cb75c2802cef3902db83f2b2bac5ee11ae7a8f...988e009cb059c17fdc1e38256174f90268c027fe
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170523/d2d178ab/attachment.html>
More information about the vc
mailing list