# Copyright (C) 2015-2021 Swift Navigation Inc.
# Contact: https://support.swiftnav.com
#
# This source is subject to the license found in the file 'LICENSE' which must
# be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.

package: swiftnav.sbp.observation
description: Satellite observation messages from the device.
             The SBP sender ID of 0 indicates remote observations
             from a GNSS base station, correction network, or Skylark,
             Swift's cloud GNSS correction product.
stable: True
public: True
include:
  - types.yaml
  - gnss.yaml
definitions:

 - MSG_OBS:
    id: 0x004A
    short_desc: GPS satellite observations
    desc: >
      The GPS observations message reports all the raw pseudorange and
      carrier phase observations for the satellites being tracked by
      the device. Carrier phase observation here is represented as a
      40-bit fixed point number with Q32.8 layout (i.e. 32-bits of
      whole cycles and 8-bits of fractional cycles). The observations
      are be interoperable with 3rd party receivers and conform
      with typical RTCMv3 GNSS observations.
    fields:
        - header:
            type: ObservationHeader
            desc: Header of a GPS observation message
        - obs:
            type: array
            fill: PackedObsContent
            map_by: sid
            desc: >
              Pseudorange and carrier phase observation for a
              satellite being tracked.

 - MSG_BASE_POS_LLH: # MSGBREAK
    id: 0x0044
    short_desc: Base station position
    desc: >
      The base station position message is the position reported by
      the base station itself. It is used for pseudo-absolute RTK
      positioning, and is required to be a high-accuracy surveyed
      location of the base station. Any error here will result in an
      error in the pseudo-absolute position output.
    fields:
        - lat:
            type: double 
            units: deg
            desc: Latitude
        - lon:
            type: double
            units: deg
            desc: Longitude
        - height:
            type: double
            units: m
            desc: Height
