diff --git a/README.md b/README.md index d1de959..1f0ddc5 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ connection but also supporting RPC (remote procedure call) like [JSON-RPC](https://de.wikipedia.org/wiki/JSON-RPC). OGRP is a protocol based on JSON [[RFC4627](#RFC4627)]. +Valid messages are defined using [[json-schema](#json-schema)]. The core +protocol can be extended using an application specific schema, see [usage](#usage). For the use in RPC, zerorpc () is recommended as a transport mechanism. Protocols that already provide message framing should use one JSON object per message. @@ -105,35 +107,36 @@ Consider the following: Message specification ===================== -An OGRP message is composed of one JSON object. Two mandatory fields -exist +An OGRP message is composed of one JSON object. Required fields are: +"$schema", "timestamp", "time_reference" and "protocol". ``` -msg = { - "protocol": protocol, - "id": id, +{ + "$schema": schema, + "protocol": "OGRP1_3", + "timestamp": 101, + "time_reference": "UTC", ... } -protocol = "OGRP1" -id = string ; lower-case, underscore separated id, e.g. "measurement", ... +schema = "https://fraunhofer-iis.github.io/ogrp/draft-xx/measurement" ``` -The additional content in the message is dependant on the message id. +The additional content in the message is dependent on the message schema. Optional fields are allowed and must be ignored by parsers if unknown (according to JSON). Example definitions ------------------- -A message of id 'measurement' for raw measurements of a GNSS receiver, +A message of schema 'measurement' for raw measurements of a GNSS receiver, e.g. including pseudorange and carrier phase measurements for multiple satellites on different channels, can look like this: ``` measurement = { + "$schema": "https://fraunhofer-iis.github.io/ogrp/next/schema#", "protocol": protocol, - "id": "measurement", "sw_version": int / hex, "timestamp": float / string, ; (see Representing time and date) "time_status": time_status, @@ -172,6 +175,7 @@ title element in the schema. Usage ===== +The OGRP core schema can be extended by an application specific schema. Applications using OGRP for input or output should define the supported messages as JSON Schema [[json-schema](#json-schema)]. @@ -179,46 +183,39 @@ An example how to extend the OGRP core schema: ```JSON { - "id": "http://example.org/pvt-input-schema#", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "Minimum schema for a PVT application", - "type": "object", - "properties": { - "protocol": { "type": "string" }, - "id": { "type": "string" }, - "timestamp": { "$ref": "http://ogrp.org/definitions/timestamp" }, - "channel_measurements": { + "$schema": "https://json-schema.org/draft-07/schema#", + "$id": "https://example.com/my/application", + "title": "My OGRP application", + "allOf": [ { "$ref": "https://fraunhofer-iis.github.io/ogrp/draft-xx/schema#" }, + { "$ref": "#my_element" } + ], + "definitions": { + "my_element": { + "$id": "#my_element", "type": "object", "properties": { - "satellite_id": { + "my_integer": { "type": "integer", "minimum": 1 }, - "pseudorange": { - "type": "number" - } - } - }, - "satellites": { - "type": "object", - "properties": { - "satellite_id": { - "type": "integer", - "minimum": 1 + "my_string": { + "type": "string" }, - "position": { - "type": "object", - "properties": { - "x": { "type": "number" }, - "y": { "type": "number" }, - "z": { "type": "number" } - } + "my_time": { + "$ref": "https://fraunhofer-iis.github.io/ogrp/draft-xx/schema#gnss_time" } } } } } ``` + +The important line here is `"allOf": [ { "$ref": "https://fraunhofer-iis.github.io/ogrp/draft-xx/schema#" } ],`, +as it imports all properties of the OGRP core schema. An application schema should not link to the "experimental" +schema, as this might often change, but instead use a frozen draft as a baseline. + +See also [hyper-schema](http://json-schema.org/hyper-schema) as an example how to extend an existing schema. + Security considerations ======================= diff --git a/draft-01/measurement.ogrp b/draft-01/measurement.ogrp index 3c25619..676a039 100644 --- a/draft-01/measurement.ogrp +++ b/draft-01/measurement.ogrp @@ -1,10 +1,11 @@ { - "$schema": "https://fraunhofer-iis.github.io/ogrp/draft-01/schema#", + "$schema": "https://fraunhofer-iis.github.io/ogrp/next/schema.json#", "protocol": "OGRP1_3", "timestamp": 101, "time_status": "SYSTEM", "time_reference": "UTC", - "channel_measurements": [{ + "channel_measurements": [ + { "doppler": 1200, "sw_channel_number": 0, "hw_channel_number": 0, @@ -16,7 +17,7 @@ "snr": 32, "satellite_id": 1, "pseudo_range": 20000000, - "time_of_transmission" : 0.0 + "time_of_transmission": 0.0 }, { "doppler": -1100.3, @@ -30,7 +31,7 @@ "snr": 45.5, "satellite_id": 50, "pseudo_range": 20340000, - "time_of_transmission" : 0.0 + "time_of_transmission": 0.0 } ], "id": "measurement" diff --git a/next/imu.json b/next/imu.json new file mode 100644 index 0000000..f89c7e7 --- /dev/null +++ b/next/imu.json @@ -0,0 +1,144 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://fraunhofer-iis.github.io/ogrp/next/imu.json", + "title": "OGRP IMU schema", + "description": "Measurements of an IMU", + "type": "object", + "additionalProperties": true, + "properties": { + "$schema": { + "const": "https://fraunhofer-iis.github.io/ogrp/next/imu.json" + }, + "acceleration": { + "type": "object", + "properties": { + "x": { + "type": "number", + "description": "(m/s^2)" + }, + "y": { + "type": "number", + "description": "(m/s^2)" + }, + "z": { + "type": "number", + "description": "(m/s^2)" + } + }, + "description": "The acceleration vector as reported from the IMU" + }, + "angular_rate": { + "type": "object", + "properties": { + "x": { + "type": "number", + "description": "(rad/s)" + }, + "y": { + "type": "number", + "description": "(rad/s)" + }, + "z": { + "type": "number", + "description": "(rad/s)" + } + }, + "description": "The angular rate as reported from the IMU" + }, + "delta_theta": { + "type": "object", + "properties": { + "x": { + "type": "number", + "description": "(rad)" + }, + "y": { + "type": "number", + "description": "(rad)" + }, + "z": { + "type": "number", + "description": "(rad)" + } + }, + "description": "Integral of angular rate over measurement interval" + }, + "delta_velocity": { + "type": "object", + "properties": { + "x": { + "type": "number", + "description": "(m/s)" + }, + "y": { + "type": "number", + "description": "(m/s)" + }, + "z": { + "type": "number", + "description": "(m/s)" + } + }, + "description": "Integral of acceleration over measurement interval" + }, + "magnetic_field": { + "type": "object", + "properties": { + "x": { + "type": "number", + "description": "(Gs)" + }, + "y": { + "type": "number", + "description": "(Gs)" + }, + "z": { + "type": "number", + "description": "(Gs)" + } + }, + "description": "The magnetic field as reported from the IMU" + }, + "gps_correlation_timestamp": { + "type": "object", + "properties": { + "gps_tow": { + "type": "number", + "description": "GPS time of week (s)" + }, + "gps_week_number": { + "type": "number", + "description": "GPS week number" + }, + "pps_beacon_good": { + "type": "boolean", + "description": "If set, GNSS PPS is present" + }, + "gps_time_refresh": { + "type": "number", + "description": "PPS pulse counter" + }, + "gps_time_initialized": { + "type": "boolean", + "description": "Is set once upon the first valid GPS time record" + } + }, + "required": [ + "gnss_tow", + "gnss_week_number", + "pps_beacon_good", + "gps_time_refresh", + "gps_time_initialized" + ] + }, + "pressure": { + "type": "number", + "description": "Pressure (hPa)" + }, + "measurement_interval": { + "type": "number", + "title": "Time since last measurement", + "description": "(s)" + } + } +} diff --git a/next/measurement.json b/next/measurement.json new file mode 100644 index 0000000..4fb21fe --- /dev/null +++ b/next/measurement.json @@ -0,0 +1,98 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://fraunhofer-iis.github.io/ogrp/next/measurement.json", + "title": "OGRP measurement schema", + "type": "object", + "properties": { + "gnss": { + "$ref": "types.json#gnss" + }, + "satellite_id": { + "$ref": "types.json#satellite_id" + }, + "frequency_number": { + "type": "integer", + "minimum": -7, + "description": "Only for GLONASS frequency slot number" + }, + "signal_type": { + "$ref": "types.json#signal" + }, + "carrier_phase": { + "type": "number", + "description": "(cycles)" + }, + "carrier_range": { + "type": "number", + "description": "(meter)" + }, + "code_phase": { + "type": "number", + "description": "(chips)" + }, + "channel_state": { + "enum": [ + "IDLE", + "SEARCHING", + "PULL_IN", + "LOCKED", + "SYNCED" + ] + }, + "sw_channel_number": { + "type": "integer", + "minimum": 0, + "description": "SW channel number" + }, + "hw_channel_number": { + "type": "integer", + "minimum": 0, + "description": "HW channel number" + }, + "doppler": { + "type": "number", + "description": "(Hz)" + }, + "locktime": { + "type": "number", + "description": "(seconds)" + }, + "frequency_lock": { + "type": "number", + "description": "frequency lock indicator" + }, + "phase_lock": { + "type": "number", + "description": "phase lock indicator" + }, + "snr": { + "title": "Signal to noise ratio", + "type": "number", + "description": "(dB)" + }, + "cn0": { + "title": "Carrier to noise density", + "type": "number", + "description": "(dB-Hz)" + }, + "pseudo_range": { + "title": "Pseudo range or code range", + "type": "number", + "description": "(meter)" + }, + "corrected_pseudo_range": { + "type": "number", + "description": "Pseudorange after applying clock and atmospheric correction (in meter)" + }, + "time_of_transmission": { + "$ref": "types.json#tow", + "description": "Estimated GNSS time of week of the signal transmission" + } + }, + "required": [ + "carrier_phase", + "pseudo_range", + "satellite_id", + "gnss" + ] +} diff --git a/next/measurement.ogrp b/next/measurement.ogrp new file mode 100644 index 0000000..bcdd55d --- /dev/null +++ b/next/measurement.ogrp @@ -0,0 +1,32 @@ +{ + "$schema": "https://fraunhofer-iis.github.io/ogrp/next/schema#", + "protocol": "OGRP1_2", + "timestamp": 101, + "time_status": "SYSTEM", + "time_reference": "UTC", + "range_measurements": [{ + "doppler": 1200, + "channel_number": 1, + "gnss": "GPS", + "locktime": 0, + "carrier_phase": 0, + "channel_state": "IDLE", + "signal_type": "L1CA", + "snr": 32, + "satellite_id": 1, + "pseudo_range": 20000000 + }, + { + "doppler": -1100.3, + "channel_number": 1, + "gnss": "Galileo", + "locktime": 0, + "carrier_phase": -123.4, + "channel_state": "SYNCED", + "signal_type": "E5aI", + "snr": 45.5, + "satellite_id": 50, + "pseudo_range": 20340000 + } + ] +} diff --git a/next/navigation-data.json b/next/navigation-data.json new file mode 100644 index 0000000..589eb55 --- /dev/null +++ b/next/navigation-data.json @@ -0,0 +1,424 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://fraunhofer-iis.github.io/ogrp/next/navigation-data.json", + "title": "OGRP navigation data schema", + "definitions": { + "glonass_ephemeris": { + "$id": "#glonass_ephemeris", + "type": "object", + "properties": { + "satellite_id": { + "$ref": "types.json#satellite_id" + }, + "freqnum": { + "type": "integer", + "description": "Frequency channel number (-7...24)" + }, + "reference_time": { + "type": "integer", + "description": "Reference time of ephemeris (s)" + }, + "reference_day": { + "type": "integer", + "description": "Day of reference time of ephemeris (day in 4 year block)" + }, + "healthy": { + "type": "boolean", + "description": "True means satelitte is healthy, taken from signal" + }, + "healthy1": { + "type": "boolean", + "description": "True means satelitte is healthy, taken from almanac" + }, + "healthy2": { + "type": "boolean", + "description": "True means satelitte is healthy, own diagnostic" + }, + "age": { + "type": "number", + "description": "Ephemeris, age of data (days)" + }, + "coords": { + "title": "Ephemeris coordinates (x, y, z)", + "type": "array", + "numItems": 3, + "description": "(km)", + "items": { + "type": "number" + } + }, + "velocities": { + "title": "Ephemeris velocities (vx, vy, vz)", + "type": "array", + "numItems": 3, + "description": "(km/s)", + "items": { + "type": "number" + } + }, + "accelarations": { + "title": "Ephemeris accelarations (ax, ay, az)", + "type": "array", + "numItems": 3, + "description": "(km/s²)", + "items": { + "type": "number" + } + }, + "tau_sys": { + "type": "number", + "description": "Clock, time correction to glonass time scale (s)" + }, + "tau": { + "type": "number", + "description": "Clock, time correction to sat-clock (s)" + }, + "gamma": { + "type": "number", + "description": "Clock, sat-clock offset rate (s/s)" + } + }, + "required": [ + "satellite_id", + "reference_time", + "reference_day", + "coords", + "velocities", + "accelarations" + ] + }, + "ephemeris": { + "$id": "#ephemeris", + "type": "object", + "properties": { + "gnss": { + "$ref": "types.json#gnss", + "description": "All GNSS Systems with Kepler Data for ephemeris" + }, + "satellite_id": { + "$ref": "types.json#satellite_id" + }, + "clock_issue": { + "type": "integer", + "description": "Subframe 1, issue of data, clock" + }, + "satellite_health": { + "type": "integer", + "description": "Subframe 1, satellite health" + }, + "clock_reference": { + "$ref": "types.json#tow", + "description": "GPS: Subframe 1, clock Data reference time; Galileo E1/E5b (s)" + }, + "week_number": { + "$ref": "types.json#week_number", + "description": "Subframe 1, GPS week number" + }, + "group_delay": { + "type": "number", + "description": "GPS: Subframe 1, estimated group delay differential; Galileo: Group delay E1/E5b (s)" + }, + "af_2": { + "type": "number", + "description": "GPS: Subframe 1, polynomal coefficient; Galileo: E1/E5b (s/s*s)" + }, + "af_1": { + "type": "number", + "description": "GPS: Subframe 1, polynomal coefficient; Galileo: E1/E5b (s/s)" + }, + "af_0": { + "type": "number", + "description": "GPS: Subframe 1, polynomal coefficient; Galileo: E1/E5b (s)" + }, + "clock_reference_e1e5a": { + "type": "integer", + "description": "Galileo clock Data reference time (s)" + }, + "group_delay_e1e5a": { + "type": "number", + "description": "Galileo group delay E1/E5a (s)" + }, + "af_2_e1e5a": { + "type": "number", + "description": "Galileo SV clock drift rate correction coefficient E1/E5a (s/(s*s))" + }, + "af_1_e1e5a": { + "type": "number", + "description": "Galileo SV clock drift correction coefficient E1/E5a (s/s)" + }, + "af_0_e1e5a": { + "type": "number", + "description": "Galileo SV clock bias correction coefficient E1/E5a (s)" + }, + "ephemeris_reference": { + "$ref": "types.json#tow", + "description": "Subframe 2 and 3, ephemeris reference time (s)" + }, + "ephemeris_issue": { + "type": "integer", + "description": "Subframe 2 and 3, issue of data, ephemeris" + }, + "root_a": { + "type": "number", + "description": "Keplerian, root_a (m^1/2)" + }, + "ecc": { + "type": "number", + "description": "Keplerian, ecc" + }, + "m_0": { + "type": "number", + "description": "Keplerian, m_0 (radian)" + }, + "omega_0": { + "type": "number", + "description": "Keplerian, omega_0 (radian)" + }, + "inc_0": { + "type": "number", + "description": "Keplerian, inc_0 (radian)" + }, + "arg_per": { + "type": "number", + "description": "Keplerian, arg_per (radian)" + }, + "deln": { + "type": "number", + "description": "Corrections to orbital E, deln (radian/s)" + }, + "omega_dot": { + "type": "number", + "description": "Corrections to orbital E, omega_dot (radian/s)" + }, + "inc_dot": { + "type": "number", + "description": "Corrections to orbital E, inc_dot (radian/s)" + }, + "crc": { + "type": "number", + "description": "Corrections to orbital E, crc (m)" + }, + "crs": { + "type": "number", + "description": "Corrections to orbital E, crs (m)" + }, + "cuc": { + "type": "number", + "description": "Corrections to orbital E, cuc (radian)" + }, + "cus": { + "type": "number", + "description": "Corrections to orbital E, cus (radian)" + }, + "cic": { + "type": "number", + "description": "Corrections to orbital E, cic (radian)" + }, + "cis": { + "type": "number", + "description": "Corrections to orbital E, cis (radian)" + } + }, + "required": [ + "satellite_id", + "ephemeris_reference", + "root_a", + "ecc", + "m_0", + "omega_0", + "inc_0", + "arg_per" + ] + }, + "almanac": { + "$id": "#almanac", + "type": "object", + "properties": { + "gnss": { + "$ref": "types.json#gnss", + "description": "All GNSS Systems with Kepler Data for ephemeris" + }, + "satellite_id": { + "$ref": "types.json#satellite_id" + }, + "almanac_issue": { + "type": "integer", + "description": "Issue of almanac data" + }, + "satellite_health": { + "type": "integer", + "description": "Satellite health status" + }, + "almanac_reference": { + "$ref": "types.json#tow", + "description": "Almanac reference time (s)" + }, + "week_number": { + "$ref": "types.json#week_number", + "description": "Almanac reference week number" + }, + "af_1": { + "type": "number", + "description": "Satellite clock correction linear (s/s)" + }, + "af_0": { + "type": "number", + "description": "Satellite clock correction bias (s)" + }, + "root_a": { + "type": "number", + "description": "Keplerian, root_a (m^1/2)" + }, + "ecc": { + "type": "number", + "description": "Keplerian, ecc" + }, + "m_0": { + "type": "number", + "description": "Keplerian, m_0 (radian)" + }, + "omega_0": { + "type": "number", + "description": "Keplerian, omega_0 (radian)" + }, + "arg_per": { + "type": "number", + "description": "Keplerian, arg_per (radian)" + }, + "omega_dot": { + "type": "number", + "description": "Corrections to orbital E, omega_dot (radian/s)" + }, + "delta_i": { + "type": "number", + "description": "Correction of inclination (radian)" + } + }, + "required": [ + "satellite_id" + ] + }, + "ionosphere_klobuchar": { + "$id": "#ionosphere_klobuchar", + "type": "object", + "properties": { + "amplitude": { + "type": "array", + "numItems": 4, + "description": "Coefficients of cubic equation, amplitude of vertical delay (s..s/semicircles³)", + "items": { + "type": "number" + } + }, + "period": { + "type": "array", + "numItems": 4, + "description": "Coefficients of cubic equation, modelperiod (s..s/semicircles³)", + "items": { + "type": "number" + } + } + }, + "required": [ + "amplitude", + "period" + ] + }, + "ionosphere_nequick": { + "$id": "#ionosphere_nequick", + "type": "object", + "properties": { + "effective_ionisation_level": { + "type": "array", + "numItems": 3, + "description": "Effective ionisation level 1st..3rd order of Nequick model (sfu..sfu/deg²)", + "items": { + "type": "number" + } + }, + "disturbance": { + "type": "array", + "numItems": 5, + "description": "Disturbance flags of the 5 regions", + "items": { + "type": "boolean" + } + } + }, + "required": [ + "effective_ionisation_level" + ] + }, + "gnss_utc_parameter": { + "$id": "#gnss_utc_parameter", + "type": "object", + "properties": { + "gnss": { + "$ref": "types.json#gnss" + }, + "a_0": { + "type": "number", + "description": "Polynom constant value (s)" + }, + "a_1": { + "type": "number", + "description": "Polynom linear value (s/s)" + }, + "delta_ls": { + "type": "integer", + "description": "Leap second count before leap second adjustment (s)" + }, + "reference_time": { + "$ref": "types.json#time_reference" + }, + "week_lsf": { + "type": "integer", + "description": "Week number of leap second adjustment (week)" + }, + "day_number": { + "type": "integer", + "description": "Day number at the end of which a leap second adjustment becomes effective (day)" + }, + "delta_lsf": { + "type": "integer", + "description": "Leap second count after leap second adjustment (s)" + } + }, + "required": [ + "gnss", + "a_0", + "a_1", + "delta_ls", + "reference_time", + "week_lsf", + "day_number", + "delta_lsf" + ], + "description": "GNSS-UTC conversion parameters" + }, + "ggto_parameter": { + "$id": "#ggto_parameter", + "type": "object", + "properties": { + "a_0": { + "type": "number", + "description": "Polynom constant value (s)" + }, + "a_1": { + "type": "number", + "description": "Polynom linear value (s/s)" + }, + "reference_time": { + "$ref": "types.json#time_reference" + } + }, + "required": [ + "a_0", + "a_1", + "reference_time" + ], + "additionalProperties": false, + "description": "GPS-Galileo system time conversion parameters" + } + } +} diff --git a/next/pvt.json b/next/pvt.json new file mode 100644 index 0000000..ffb63ad --- /dev/null +++ b/next/pvt.json @@ -0,0 +1,111 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://fraunhofer-iis.github.io/ogrp/next/pvt.json", + "title": "OGRP PVT schema", + "properties": { + "number_of_satellites": { + "type": "number", + "description": "Number of satellites used in the PVT calculation" + }, + "coordinate_system": { + "enum": [ + "ECEF", + "WGS84" + ], + "description": "In case of WGS84 the coordinates are x:lat, y:lon in degree and z in meter" + }, + "precision": { + "enum": [ + "2D", + "3D", + "RTK_FIX", + "RTK_FLOAT", + "DGPS", + "SBAS", + "NO_FIX" + ], + "description": "Calculation precision " + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number", + "description": "Depending on coordinate_systems" + }, + "y": { + "type": "number", + "description": "Depending on coordinate_systems" + }, + "z": { + "type": "number", + "description": "Depending on coordinate_systems" + } + }, + "description": "The calculated position" + }, + "velocity": { + "type": "object", + "properties": { + "x": { + "type": "number", + "description": "ECEF" + }, + "y": { + "type": "number", + "description": "ECEF" + }, + "z": { + "type": "number", + "description": "ECEF" + } + }, + "description": "The calculated velocity" + }, + "clock_bias": { + "type": "number", + "description": "The calculated clock error (s)" + }, + "clock_drift": { + "type": "number", + "description": "The variation of the clock error in the last PVT interval (s/s)" + }, + "vdop": { + "type": "number", + "description": "The vertical dilution of precision" + }, + "hdop": { + "type": "number", + "description": "The horizontal dilution of precision" + }, + "pdop": { + "type": "number", + "description": "The positional dilution of precision" + }, + "tdop": { + "type": "number", + "description": "The time dilution of precision" + }, + "gdop": { + "type": "number", + "description": "The geometric dilution of precision" + }, + "frequency_band": { + "enum": [ + "L1", + "S", + "L2", + "E5c", + "E6", + "L5E5a", + "E5 AltBOC" + ], + "description": "Frequency band or signal components used for PVT" + } + }, + "required": [ + "coordinate_system", + "precision", + "position" + ] +} diff --git a/next/satellite-info.json b/next/satellite-info.json new file mode 100644 index 0000000..018b0fb --- /dev/null +++ b/next/satellite-info.json @@ -0,0 +1,76 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://fraunhofer-iis.github.io/ogrp/next/satellite-info.json", + "title": "OGRP satellite info schema", + "properties": { + "satellite_id": { + "$ref": "types.json#satellite_id" + }, + "gnss": { + "$ref": "types.json#gnss" + }, + "direction": { + "type": "array", + "description": "Normalized direction vector receiver-satellite in ECEF frame", + "minItems": 3, + "maxItems": 3, + "items": { + "type": "number" + } + }, + "expected_pseudorange": { + "type": "number", + "description": "Expected range between receiver and satellite from PVT with errors (m)" + }, + "expected_range": { + "type": "number", + "description": "Expected range between receiver and satellite from PVT (m)" + }, + "expected_range_rate": { + "type": "number", + "description": "Expected range rate between receiver and satellite from PVT (m/s)" + }, + "azimuth": { + "type": "number", + "description": "Azimuth of the satellite 0..360 (degree)" + }, + "elevation": { + "type": "number", + "description": "Elevation of the satellite 0..90 (degree)" + }, + "authentication_status_osnma": { + "type": "number", + "description": "Galileo OSNMA authentication status (-3: Not available, -2: Internal error, -1: Authentication failure, 0: Initializing, 1: Authenticated)" + }, + "range_authenticated_signals": { + "type": "array", + "minItems": 0, + "maxItems": 3, + "items": { + "enum": [ + "E1", + "E5a", + "E6" + ], + "description": "List of authenticated signal components" + } + }, + "spoofed_signals": { + "type": "array", + "minItems": 0, + "maxItems": 3, + "items": { + "enum": [ + "E1", + "E5a", + "E6" + ], + "description": "List of spoofed signal components" + } + } + }, + "required": [ + "satellite_id", + "gnss" + ] +} diff --git a/next/schema b/next/schema new file mode 100644 index 0000000..5812e7e --- /dev/null +++ b/next/schema @@ -0,0 +1,105 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://fraunhofer-iis.github.io/ogrp/next/schema#", + "title": "OGRP core schema draft", + "type": "object", + "required": [ + "$schema", + "timestamp", + "time_reference", + "protocol" + ], + "properties": { + "$schema": { + "const": "https://fraunhofer-iis.github.io/ogrp/next/schema#" + }, + "protocol": { + "enum": [ + "OGRP1_2" + ], + "description": "OGRP version" + }, + "time_status": { + "enum": [ + "SYSTEM", + "EXTERNAL", + "FREE_RUNNING", + "FINESTEERING", + "GPS_SYNCED", + "GALILEO_SYNCED" + ], + "description": "Timestamp source" + }, + "timestamp": { + "$ref": "types.json#unix_time" + }, + "time_reference": { + "$ref": "types.json#time_reference" + }, + "hw_timestamp": { + "type": "integer", + "description": "Hardware timestamp, which is required for external tracking (clock ticks, overflow at 2^32)" + }, + "sw_version": { + "type": "string" + }, + "module": { + "type": "string", + "description": "Name of associated module" + }, + "settings": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "setting.json" + } + }, + "glonass_ephemeris": { + "$ref": "navigation-data.json#glonass_ephemeris" + }, + "ephemeris": { + "$ref": "navigation-data.json#ephemeris" + }, + "almanac": { + "$ref": "navigation-data.json#almanac" + }, + "ionosphere_klobuchar": { + "$ref": "navigation-data.json#ionosphere_klobuchar" + }, + "ionosphere_nequick": { + "$ref": "navigation-data.json#ionosphere_nequick" + }, + "pvt_calculation": { + "$ref": "pvt.json" + }, + "satellite_info": { + "$ref": "satellite-info.json" + }, + "gnss_utc_parameter": { + "$ref": "navigation-data.json#gnss_utc_parameter" + }, + "ggto_parameter": { + "$ref": "navigation-data.json#ggto_parameter" + }, + "channel_measurements": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "measurement.json" + }, + "uniqueItems": true + }, + "tracking_init": { + "$ref": "tracking-loop.json#tracking_init" + }, + "correlation_values": { + "$ref": "tracking-loop.json#correlation_values" + }, + "control_values": { + "$ref": "tracking-loop.json#control_values" + }, + "imu_measurements": { + "$ref": "imu.json" + } + } +} diff --git a/next/setting.json b/next/setting.json new file mode 100644 index 0000000..ee25848 --- /dev/null +++ b/next/setting.json @@ -0,0 +1,30 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://fraunhofer-iis.github.io/ogrp/next/setting.json#", + "title": "OGRP core types", + + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of setting" + }, + "value": { + "type": "string", + "description": "Value of data as string" + }, + "type": { + "type": "string", + "description": "String with typename or array with enumvalues as string" + }, + "remark": { + "type": "string", + "description": "It is a description but description is a reserved word when using schema" + } + }, + "required": [ + "name", + "value", + "type" + ] +} diff --git a/next/tracking-loop.json b/next/tracking-loop.json new file mode 100644 index 0000000..397e562 --- /dev/null +++ b/next/tracking-loop.json @@ -0,0 +1,186 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://fraunhofer-iis.github.io/ogrp/next/tracking-loop.json", + "title": "OGRP tracking loop schema", + "definitions": { + "hw_channel": { + "$id": "#hw_channel", + "type": "integer", + "description": "Unique ID of the hardware channel, which sent the IQ values" + }, + "correlation": { + "$id": "#correlation", + "type": "object", + "description": "Correlation value", + "properties": { + "i": { + "type": "number", + "description": "Real part of the correlation" + }, + "q": { + "type": "number", + "description": "Imaginary part of the correlation" + } + }, + "required": [ + "i", + "q" + ] + }, + "clock_ticks": { + "type": "integer", + "minimum": 0, + "maximum": 4294967295, + "description": "Hardware timestamp, which is required for external tracking (clock ticks, overflow at 2^32)" + }, + "tracking_init": { + "$id": "#tracking_init", + "type": "object", + "description": "Information about configuration of the hardware channel for external tracking loops", + "properties": { + "hw_channel_id": { + "$ref": "#hw_channel" + }, + "carrier_frequency": { + "type": "number", + "description": "Carrier frequency of acquired signal (Hz)" + }, + "carrier_doppler": { + "type": "number", + "description": "Carrier doppler from acquisition (Hz)" + }, + "code_doppler": { + "type": "number", + "description": "Code doppler from acquisition (chips/s)" + }, + "early_late_spacing": { + "type": "number", + "description": "Early late spacing of the hardware channel (chips)" + }, + "integration_time": { + "type": "number", + "description": "Integration time of the correlators (s)" + }, + "acf_slope": { + "type": "number", + "description": "Slope of the autocorrelation function (chip/chip)" + }, + "dll_hard_limiter": { + "type": "number", + "description": "Recommended hard limitation for DLL discriminator output (chips)" + } + }, + "required": [ + "hw_channel_id", + "carrier_doppler", + "code_doppler", + "early_late_spacing", + "integration_time", + "acf_slope" + ] + }, + "correlation_values": { + "$id": "#correlation_values", + "type": "object", + "description": "I&D values of a hardware channel", + "properties": { + "hw_channel_id": { + "$ref": "#hw_channel" + }, + "epoch": { + "type": "number", + "minimum": 0, + "description": "Epochs since hardware channel start (epochs)" + }, + "integrated_epochs": { + "type": "number", + "description": "Integrated time in epochs" + }, + "tow": { + "$ref": "types.json#tow", + "description": "Transmission time of the correlation values in seconds related to the beginning of the current week" + }, + "carrier_doppler": { + "type": "number", + "description": "Last carrier doppler (Hz)" + }, + "code_doppler": { + "type": "number", + "description": "Last code doppler (chips/s)" + }, + "very_early": { + "$ref": "#correlation", + "description": "Correlation value at very early correlation point" + }, + "early": { + "$ref": "#correlation", + "description": "Correlation value at early correlation point" + }, + "prompt": { + "$ref": "#correlation", + "description": "Correlation value at prompt correlation point" + }, + "late": { + "$ref": "#correlation", + "description": "Correlation value at late correlation point" + }, + "very_late": { + "$ref": "#correlation", + "description": "Correlation value at very late correlation point" + } + }, + "required": [ + "hw_channel_id", + "epoch", + "early", + "prompt", + "late" + ] + }, + "control_values": { + "$id": "#control_values", + "type": "object", + "description": "Code and carrier values to control a hardware channel", + "properties": { + "hw_channel_id": { + "$ref": "#hw_channel" + }, + "lock_lost": { + "type": "boolean", + "description": "True if tracking of the satellite is lost for the hardware channel, which sent the IQ values" + }, + "value_list": { + "type": "array", + "minItems": 0, + "description": "List of control values for multiple channels", + "items": { + "type": "object", + "properties": { + "hw_channel_id": { + "$ref": "#hw_channel" + }, + "carrier_doppler": { + "type": "integer", + "description": "Carrier doppler from tracking (Hz)" + }, + "code_doppler": { + "type": "integer", + "description": "Code doppler from tracking (chips/s)" + } + }, + "required": [ + "hw_channel_id", + "carrier_doppler", + "code_doppler" + ] + } + } + }, + "required": [ + "hw_channel_id", + "value_list", + "lock_lost" + ] + } + } +} diff --git a/next/types.json b/next/types.json new file mode 100644 index 0000000..f915d37 --- /dev/null +++ b/next/types.json @@ -0,0 +1,108 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://fraunhofer-iis.github.io/ogrp/next/types.json#", + "title": "OGRP core types", + "definitions": { + "gnss": { + "$id": "#gnss", + "title": "Global Navigation Satellite System", + "description": "Identifier for a satellite navigation system", + "enum": [ + "GPS", + "Galileo", + "Glonass", + "Beidou", + "QZSS", + "SBAS", + "NavIC" + ] + }, + "gnss_time": { + "$id": "#gnss_time", + "title": "Time in GNSS typical format", + "type": "object", + "properties": { + "tow": { + "$ref": "#tow" + }, + "week": { + "$ref": "#week_number" + } + }, + "required": [ + "tow", + "week" + ] + }, + "signal": { + "$id": "#signal", + "title": "GNSS signal that can be tracked", + "enum": [ + "L1CA", + "L2CA", + "L2P_codeless", + "L2CM", + "L2CL", + "L2C", + "L5", + "L5I", + "L5Q", + "E1", + "E1B", + "E1C", + "E5", + "E5a", + "E5aI", + "E5aQ", + "E5b", + "E5bI", + "E5bQ", + "E6", + "P1", + "P2", + "P5" + ] + }, + "satellite_id": { + "$id": "#satellite_id", + "title": "Satellite Identifier", + "type": "integer", + "minimum": 1, + "description": "Corresponds to a specific PRN (GPS) or SVID (Galileo). It is not bound to a specific satellite.", + "$comment": "TODO: Galileo frequency number" + }, + "tow": { + "$id": "#tow", + "title": "Time of Week", + "type": "number", + "minimum": 0, + "exclusiveMaximum": 604800, + "description": "Seconds in current week (s)" + }, + "unix_time": { + "$id": "#unix_time", + "title": "Unix Time", + "type": "number", + "minimum": 0, + "description": "Seconds since 1.1.1970 0:00 (UTC) (s)" + }, + "week_number": { + "$id": "#week_number", + "title": "Week Number", + "type": "integer", + "minimum": 0, + "description": "Full weeks since 1980-01-06T00:00:00Z UTC (midnight), no overflow" + }, + "time_reference": { + "$id": "#time_reference", + "enum": [ + "UTC", + "GPST", + "GST", + "GLONASST", + "BDT" + ], + "description": "Time reference of timestamp" + } + } +}