LC29H作为安卓车载导航的定位模块

现在安卓系统除了用nmea定位外,还支持原始观测量和导航电文,原始观测量里用载波相位,硬件时间,gps时间,卫星信号发射时间,钟差,伪距,瞬时多普勒等信息填充。导航电文采用未解算的导航电文填充,下面是头文件中的字段说明,/**

  • Represents a GNSS Measurement, it contains raw and computed information.
  • Independence - All signal measurement information (e.g. sv_time,
  • pseudorange_rate, multipath_indicator) reported in this struct should be
  • based on GNSS signal measurements only. You may not synthesize measurements
  • by calculating or reporting expected measurements based on known or estimated
  • position, velocity, or time.
    /
    typedef struct {
    /
    * set to sizeof(GpsMeasurement) /
    size_t size;
    /
    * A set of flags indicating the validity of the fields in this data structure. /
    GnssMeasurementFlags flags;
    /
    *
    • Satellite vehicle ID number, as defined in GnssSvInfo::svid
    • This is a mandatory value.
      /
      int16_t svid;
      /
      *
    • Defines the constellation of the given SV. Value should be one of those
    • GNSS_CONSTELLATION_* constants
      /
      GnssConstellationType constellation;
      /
      *
    • Time offset at which the measurement was taken in nanoseconds.
    • The reference receiver’s time is specified by GpsData::clock::time_ns and should be
    • interpreted in the same way as indicated by GpsClock::type.
    • The sign of time_offset_ns is given by the following equation:
    •  measurement time = GpsClock::time_ns + time_offset_ns
      
    • It provides an individual time-stamp for the measurement, and allows sub-nanosecond accuracy.
    • This is a mandatory value.
      /
      double time_offset_ns;
      /
      *
    • Per satellite sync state. It represents the current sync state for the associated satellite.
    • Based on the sync state, the ‘received GPS tow’ field should be interpreted accordingly.
    • This is a mandatory value.
      /
      GnssMeasurementState state;
      /
      *
    • The received GNSS Time-of-Week at the measurement time, in nanoseconds.
    • Ensure that this field is independent (see comment at top of
    • GnssMeasurement struct.)
    • For GPS & QZSS, this is:
    • Received GPS Time-of-Week at the measurement time, in nanoseconds.
    • The value is relative to the beginning of the current GPS week.
    • Given the highest sync state that can be achieved, per each satellite, valid range
    • for this field can be:
    • Searching       : [ 0       ]   : GNSS_MEASUREMENT_STATE_UNKNOWN
      
    • C/A code lock   : [ 0   1ms ]   : GNSS_MEASUREMENT_STATE_CODE_LOCK is set
      
    • Bit sync        : [ 0  20ms ]   : GNSS_MEASUREMENT_STATE_BIT_SYNC is set
      
    • Subframe sync   : [ 0    6s ]   : GNSS_MEASUREMENT_STATE_SUBFRAME_SYNC is set
      
    • TOW decoded     : [ 0 1week ]   : GNSS_MEASUREMENT_STATE_TOW_DECODED is set
      
    • Note well: if there is any ambiguity in integer millisecond,
    • GNSS_MEASUREMENT_STATE_MSEC_AMBIGUOUS should be set accordingly, in the ‘state’ field.
    • This value must be populated if ‘state’ != GNSS_MEASUREMENT_STATE_UNKNOWN.
    • For Glonass, this is:
    • Received Glonass time of day, at the measurement time in nanoseconds.
    • Given the highest sync state that can be achieved, per each satellite, valid range for
    • this field can be:
    • Searching       : [ 0       ]   : GNSS_MEASUREMENT_STATE_UNKNOWN
      
    • C/A code lock   : [ 0   1ms ]   : GNSS_MEASUREMENT_STATE_CODE_LOCK is set
      
    • Symbol sync     : [ 0  10ms ]   : GNSS_MEASUREMENT_STATE_SYMBOL_SYNC is set
      
    • Bit sync        : [ 0  20ms ]   : GNSS_MEASUREMENT_STATE_BIT_SYNC is set
      
    • String sync     : [ 0    2s ]   : GNSS_MEASUREMENT_STATE_GLO_STRING_SYNC is set
      
    • Time of day     : [ 0  1day ]   : GNSS_MEASUREMENT_STATE_GLO_TOD_DECODED is set
      
    • For Beidou, this is:
    • Received Beidou time of week, at the measurement time in nanoseconds.
    • Given the highest sync state that can be achieved, per each satellite, valid range for
    • this field can be:
    • Searching    : [ 0       ] : GNSS_MEASUREMENT_STATE_UNKNOWN
      
    • C/A code lock: [ 0   1ms ] : GNSS_MEASUREMENT_STATE_CODE_LOCK is set
      
    • Bit sync (D2): [ 0   2ms ] : GNSS_MEASUREMENT_STATE_BDS_D2_BIT_SYNC is set
      
    • Bit sync (D1): [ 0  20ms ] : GNSS_MEASUREMENT_STATE_BIT_SYNC is set
      
    • Subframe (D2): [ 0  0.6s ] : GNSS_MEASUREMENT_STATE_BDS_D2_SUBFRAME_SYNC is set
      
    • Subframe (D1): [ 0    6s ] : GNSS_MEASUREMENT_STATE_SUBFRAME_SYNC is set
      
    • Time of week : [ 0 1week ] : GNSS_MEASUREMENT_STATE_TOW_DECODED is set
      
    • For Galileo, this is:
    • Received Galileo time of week, at the measurement time in nanoseconds.
    • E1BC code lock   : [ 0   4ms ]   : GNSS_MEASUREMENT_STATE_GAL_E1BC_CODE_LOCK is set
      
    • E1C 2nd code lock: [ 0 100ms ]   :
      
    • GNSS_MEASUREMENT_STATE_GAL_E1C_2ND_CODE_LOCK is set
      
    • E1B page    : [ 0    2s ] : GNSS_MEASUREMENT_STATE_GAL_E1B_PAGE_SYNC is set
      
    • Time of week: [ 0 1week ] : GNSS_MEASUREMENT_STATE_TOW_DECODED is set
      
    • For SBAS, this is:
    • Received SBAS time, at the measurement time in nanoseconds.
    • Given the highest sync state that can be achieved, per each satellite,
    • valid range for this field can be:
    • Searching    : [ 0     ] : GNSS_MEASUREMENT_STATE_UNKNOWN
      
    • C/A code lock: [ 0 1ms ] : GNSS_MEASUREMENT_STATE_CODE_LOCK is set
      
    • Symbol sync  : [ 0 2ms ] : GNSS_MEASUREMENT_STATE_SYMBOL_SYNC is set
      
    • Message      : [ 0  1s ] : GNSS_MEASUREMENT_STATE_SBAS_SYNC is set
      
    /
    int64_t received_sv_time_in_ns;
    /
    *
    • 1-Sigma uncertainty of the Received GPS Time-of-Week in nanoseconds.
    • This value must be populated if ‘state’ != GPS_MEASUREMENT_STATE_UNKNOWN.
      /
      int64_t received_sv_time_uncertainty_in_ns;
      /
      *
    • Carrier-to-noise density in dB-Hz, typically in the range [0, 63].
    • It contains the measured C/N0 value for the signal at the antenna port.
    • This is a mandatory value.
      /
      double c_n0_dbhz;
      /
      *
    • Pseudorange rate at the timestamp in m/s. The correction of a given
    • Pseudorange Rate value includes corrections for receiver and satellite
    • clock frequency errors. Ensure that this field is independent (see
    • comment at top of GnssMeasurement struct.)
    • It is mandatory to provide the ‘uncorrected’ ‘pseudorange rate’, and provide GpsClock’s
    • ‘drift’ field as well (When providing the uncorrected pseudorange rate, do not apply the
    • corrections described above.)
    • The value includes the ‘pseudorange rate uncertainty’ in it.
    • A positive ‘uncorrected’ value indicates that the SV is moving away from the receiver.
    • The sign of the ‘uncorrected’ ‘pseudorange rate’ and its relation to the sign of 'doppler
    • shift’ is given by the equation:
    •  pseudorange rate = -k * doppler shift   (where k is a constant)
      
    • This should be the most accurate pseudorange rate available, based on
    • fresh signal measurements from this channel.
    • It is mandatory that this value be provided at typical carrier phase PRR
    • quality (few cm/sec per second of uncertainty, or better) - when signals
    • are sufficiently strong & stable, e.g. signals from a GPS simulator at >=
    • 35 dB-Hz.
      /
      double pseudorange_rate_mps;
      /
      *
    • 1-Sigma uncertainty of the pseudorange_rate_mps.
    • The uncertainty is represented as an absolute (single sided) value.
    • This is a mandatory value.
      /
      double pseudorange_rate_uncertainty_mps;
      /
      *
    • Accumulated delta range’s state. It indicates whether ADR is reset or there is a cycle slip
    • (indicating loss of lock).
    • This is a mandatory value.
      /
      GnssAccumulatedDeltaRangeState accumulated_delta_range_state;
      /
      *
    • Accumulated delta range since the last channel reset in meters.
    • A positive value indicates that the SV is moving away from the receiver.
    • The sign of the ‘accumulated delta range’ and its relation to the sign of ‘carrier phase’
    • is given by the equation:
    •      accumulated delta range = -k * carrier phase    (where k is a constant)
      
    • This value must be populated if ‘accumulated delta range state’ != GPS_ADR_STATE_UNKNOWN.
    • However, it is expected that the data is only accurate when:
    •  'accumulated delta range state' == GPS_ADR_STATE_VALID.
      
    /
    double accumulated_delta_range_m;
    /
    *
    • 1-Sigma uncertainty of the accumulated delta range in meters.
    • This value must be populated if ‘accumulated delta range state’ != GPS_ADR_STATE_UNKNOWN.
      /
      double accumulated_delta_range_uncertainty_m;
      /
      *
    • Carrier frequency at which codes and messages are modulated, it can be L1 or L2.
    • If the field is not set, the carrier frequency is assumed to be L1.
    • If the data is available, ‘flags’ must contain
    • GNSS_MEASUREMENT_HAS_CARRIER_FREQUENCY.
      /
      float carrier_frequency_hz;
      /
      *
    • The number of full carrier cycles between the satellite and the receiver.
    • The reference frequency is given by the field ‘carrier_frequency_hz’.
    • Indications of possible cycle slips and resets in the accumulation of
    • this value can be inferred from the accumulated_delta_range_state flags.
    • If the data is available, ‘flags’ must contain
    • GNSS_MEASUREMENT_HAS_CARRIER_CYCLES.
      /
      int64_t carrier_cycles;
      /
      *
    • The RF phase detected by the receiver, in the range [0.0, 1.0].
    • This is usually the fractional part of the complete carrier phase measurement.
    • The reference frequency is given by the field ‘carrier_frequency_hz’.
    • The value contains the ‘carrier-phase uncertainty’ in it.
    • If the data is available, ‘flags’ must contain
    • GNSS_MEASUREMENT_HAS_CARRIER_PHASE.
      /
      double carrier_phase;
      /
      *
    • 1-Sigma uncertainty of the carrier-phase.
    • If the data is available, ‘flags’ must contain
    • GNSS_MEASUREMENT_HAS_CARRIER_PHASE_UNCERTAINTY.
      /
      double carrier_phase_uncertainty;
      /
      *
    • An enumeration that indicates the ‘multipath’ state of the event.
    • The multipath Indicator is intended to report the presence of overlapping
    • signals that manifest as distorted correlation peaks.
      • if there is a distorted correlation peak shape, report that multipath
    • is GNSS_MULTIPATH_INDICATOR_PRESENT.
      • if there is not a distorted correlation peak shape, report
    • GNSS_MULTIPATH_INDICATOR_NOT_PRESENT
      • if signals are too weak to discern this information, report
    • GNSS_MULTIPATH_INDICATOR_UNKNOWN
    • Example: when doing the standardized overlapping Multipath Performance
    • test (3GPP TS 34.171) the Multipath indicator should report
    • GNSS_MULTIPATH_INDICATOR_PRESENT for those signals that are tracked, and
    • contain multipath, and GNSS_MULTIPATH_INDICATOR_NOT_PRESENT for those
    • signals that are tracked and do not contain multipath.
      /
      GnssMultipathIndicator multipath_indicator;
      /
      *
    • Signal-to-noise ratio at correlator output in dB.
    • If the data is available, ‘flags’ must contain GNSS_MEASUREMENT_HAS_SNR.
    • This is the power ratio of the "correlation peak height above the
    • observed noise floor" to “the noise RMS”.
      /
      double snr_db;
      } GnssMeasurement;这是原始观测量,下面是导航电文/
      * Represents a GPS navigation message (or a fragment of it). /
      typedef struct {
      /
      * set to sizeof(GnssNavigationMessage) /
      size_t size;
      /
      *
    • Satellite vehicle ID number, as defined in GnssSvInfo::svid
    • This is a mandatory value.
      /
      int16_t svid;
      /
      *
    • The type of message contained in the structure.
    • This is a mandatory value.
      /
      GnssNavigationMessageType type;
      /
      *
    • The status of the received navigation message.
    • No need to send any navigation message that contains words with parity error and cannot be
    • corrected.
      /
      NavigationMessageStatus status;
      /
      *
    • Message identifier. It provides an index so the complete Navigation
    • Message can be assembled.
      • For GPS L1 C/A subframe 4 and 5, this value corresponds to the 'frame
    • id’ of the navigation message, in the range of 1-25 (Subframe 1, 2, 3
    • does not contain a ‘frame id’ and this value can be set to -1.)
      • For Glonass L1 C/A, this refers to the frame ID, in the range of 1-5.
      • For BeiDou D1, this refers to the frame number in the range of 1-24
      • For Beidou D2, this refers to the frame number, in the range of 1-120
      • For Galileo F/NAV nominal frame structure, this refers to the subframe
    • number, in the range of 1-12
      • For Galileo I/NAV nominal frame structure, this refers to the subframe
    • number in the range of 1-24
      /
      int16_t message_id;
      /
      *
    • Sub-message identifier. If required by the message ‘type’, this value
    • contains a sub-index within the current message (or frame) that is being
    • transmitted.
      • For GPS L1 C/A, BeiDou D1 & BeiDou D2, the submessage id corresponds to
    • the subframe number of the navigation message, in the range of 1-5.
      • For Glonass L1 C/A, this refers to the String number, in the range from
    • 1-15
      • For Galileo F/NAV, this refers to the page type in the range 1-6
      • For Galileo I/NAV, this refers to the word type in the range 1-10+
        /
        int16_t submessage_id;
        /
        *
    • The length of the data (in bytes) contained in the current message.
    • If this value is different from zero, ‘data’ must point to an array of the same size.
    • e.g. for L1 C/A the size of the sub-frame will be 40 bytes (10 words, 30 bits/word).
    • This is a mandatory value.
      /
      size_t data_length;
      /
      *
    • The data of the reported GPS message. The bytes (or words) specified
    • using big endian format (MSB first).
      • For GPS L1 C/A, Beidou D1 & Beidou D2, each subframe contains 10 30-bit
    • words. Each word (30 bits) should be fit into the last 30 bits in a
    • 4-byte word (skip B31 and B32), with MSB first, for a total of 40
    • bytes, covering a time period of 6, 6, and 0.6 seconds, respectively.
      • For Glonass L1 C/A, each string contains 85 data bits, including the
    • checksum. These bits should be fit into 11 bytes, with MSB first (skip
    • B86-B88), covering a time period of 2 seconds.
      • For Galileo F/NAV, each word consists of 238-bit (sync & tail symbols
    • excluded). Each word should be fit into 30-bytes, with MSB first (skip
    • B239, B240), covering a time period of 10 seconds.
      • For Galileo I/NAV, each page contains 2 page parts, even and odd, with
    • a total of 2x114 = 228 bits, (sync & tail excluded) that should be fit
    • into 29 bytes, with MSB first (skip B229-B232).
      /
      uint8_t
      data;
      } GnssNavigationMessage; 然后我想问的是咱们的LC29H模块有办法输出这些需要的信息吗?哪怕是间接的也可以,可以在驱动中去做一些计算来达到安卓系统的要求,现在很多地图都需要安卓系统的这两个接口来实现车道及导航,高德地图可以直接用nmea实现车道级导航,但是百度地图就依赖这里两个接口实现