Skip to content

Commit

Permalink
Update the JSON Schema descriptions and modify logging names to match.
Browse files Browse the repository at this point in the history
  • Loading branch information
Algafix committed Aug 12, 2024
1 parent 4507e8f commit 7c3ae6f
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 45 deletions.
4 changes: 2 additions & 2 deletions osnma/utils/status_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def log_hkroot_data(self, svid: int, received_blocks: List[Optional['BitArray']]
"block_id": dsm_header[4:8].uint,
}

osnma_hkroot_data["dsm_blocks"] = [True if block is not None else False for block in received_blocks[2:]]
osnma_hkroot_data["dsm_block_pages"] = [True if block is not None else False for block in received_blocks[2:]]

def add_satellite(self, gst_sf: 'GST', satellite: 'Satellite'):
svid = satellite.svid
Expand All @@ -312,7 +312,7 @@ def add_satellite(self, gst_sf: 'GST', satellite: 'Satellite'):
# initialize OSNMA data
if satellite.subframe_with_osnma() and svid not in self.osnma_material_received:
self.osnma_material_received[svid] = {
"hkroot_data": {"nma_header": None, "dsm_header": None, "dsm_blocks": []},
"hkroot_data": {"nma_header": None, "dsm_header": None, "dsm_block_pages": []},
"mack_data": {"tags": [], 'tesla_key': None},
}

Expand Down
149 changes: 106 additions & 43 deletions status_log_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@
"type": "object",
"properties": {
"GST_subframe": {
"description": "Galileo Satellite Time at the start of the reception of the subframe",
"description": "Galileo Satellite Time at the start of the reception of the subframe. [WN, ToW]",
"type": "array",
"items": {
"type": "integer"
}
"additionalItems": false,
"items": [
{
"type": "integer"
},
{
"type": "integer"
}
]
},
"input_module": {
"description": "OSNMAlib input module used to receive the navigation data",
"description": "OSNMAlib input module used to receive the navigation data.",
"type": "string"
},
"OSNMAlib_status": {
Expand All @@ -37,14 +43,16 @@
}
},
"OSNMA_status": {
"description": "Information on the last authenticated status of OSNMA",
"description": "Information on the last authenticated status of OSNMA.",
"type": "object",
"additionalProperties": false,
"properties": {
"nma_status": {
"description": "Indicates the OSNMA status, the Chain in Force, and the Chain and Public Key status. It is null if the receiver has not yet fully started.",
"type": "object",
"properties": {
"nmas": {
"description": "OSNMA status",
"description": "OSNMA status. It is updated from KROOT and Tag authentication.",
"type": [
"string",
"null"
Expand All @@ -57,14 +65,14 @@
]
},
"cid": {
"description": "ID of the TESLA chain in force",
"description": "ID of the TESLA chain in force.",
"type": [
"integer",
"null"
]
},
"cpks": {
"description": "Chain and public key status",
"description": "Chain and public key status.",
"type": [
"string",
"null"
Expand Down Expand Up @@ -150,16 +158,19 @@
}
},
"OSNMA_material_received": {
"description": "OSNMA material received from each satellite transmitting OSNMA.",
"description": "OSNMA material (HKROOT and MACK) received from each satellite transmitting OSNMA. The list contains all OSNMA active satellites during the subframe: satellites with a page with the OSNMA bits different than 0.",
"type": "object",
"patternProperties": {
"^[0-9]+$": {
"type": "object",
"properties": {
"hkroot_data": {
"description": "The nma_header and dms_header are null if the pages containing them were not received. Note that these values may not be authenticated.",
"type": "object",
"additionalProperties": false,
"properties": {
"nma_header": {
"description": "First page of the subframe which contains the Navigation Message Authentication (NMA) information.",
"type": [
"object",
"null"
Expand Down Expand Up @@ -194,6 +205,7 @@
}
},
"dsm_header": {
"description": "Second page of the subframe, which contains the Digital Signature Message (DSM) information.",
"type": [
"object",
"null"
Expand All @@ -207,22 +219,24 @@
}
}
},
"dsm_blocks": {
"dsm_block_pages": {
"description": "Last 13 pages that constitute a block of the Digital Signature Message. True if received, false otherwise.",
"type": "array",
"minItems": 13,
"maxItems": 13,
"items": {
"type": "boolean"
}
}
}
},
"mack_data": {
"description": "OSNMA information received in the MACK section. The TESLA Key and any of the tags may be null if not received.",
"type": "object",
"properties": {
"tesla_key": {
"type": [
"string",
"null"
]
"description": "Received TESLA Key in hex encoding.",
"type": ["string", "null"]
},
"tags": {
"type": "array",
Expand Down Expand Up @@ -255,7 +269,7 @@
}
},
"nav_data_received": {
"description": "OSNMA relevant navigation data received during this subframe from the tracked satellites",
"description": "OSNMA relevant navigation data received during this subframe from the tracked satellites. The list contains all satellites for which a page was received during the subframe, even if all OSNMA relevant pages were lost.",
"type": "object",
"patternProperties": {
"^[0-9]+$": {
Expand Down Expand Up @@ -306,6 +320,7 @@
"type": "object",
"properties": {
"tela_key": {
"description": "List of all verified (successfully or not) TESLA Keys on this subframe",
"type": "array",
"items": {
"type": "object",
Expand All @@ -322,14 +337,21 @@
},
"GST": {
"type": "array",
"items": {
"type": "integer"
}
"additionalItems": false,
"items": [
{
"type": "integer"
},
{
"type": "integer"
}
]
}
}
}
},
"macseq": {
"description": "List of all MACSeq tags verified on this subframe and the FLX tags they validate.",
"type": "array",
"items": {
"type": "object",
Expand All @@ -342,9 +364,14 @@
},
"GST": {
"type": "array",
"items": {
"type": "integer"
}
"items": [
{
"type": "integer"
},
{
"type": "integer"
}
]
},
"flex_tags": {
"description": "Flex tags validated with the MACSeq verification.",
Expand Down Expand Up @@ -375,6 +402,7 @@
}
},
"tags": {
"description": "List of all tags verified during this subframe.",
"type": "array",
"items": {
"type": "object",
Expand All @@ -396,9 +424,14 @@
},
"GST": {
"type": "array",
"items": {
"type": "integer"
}
"items": [
{
"type": "integer"
},
{
"type": "integer"
}
]
}
}
}
Expand Down Expand Up @@ -843,16 +876,26 @@
"start_gst": {
"description": "Reception Galileo Satellite Time of the authenticated data.",
"type": "array",
"items": {
"type": "integer"
}
"items": [
{
"type": "integer"
},
{
"type": "integer"
}
]
},
"last_gst": {
"description": "Last Galileo Satellite Time when the authenticated data was received.",
"type": "array",
"items": {
"type": "integer"
}
"items": [
{
"type": "integer"
},
{
"type": "integer"
}
]
}
}
}
Expand All @@ -874,16 +917,26 @@
"start_gst": {
"description": "Reception Galileo Satellite Time of the authenticated data.",
"type": "array",
"items": {
"type": "integer"
}
"items": [
{
"type": "integer"
},
{
"type": "integer"
}
]
},
"last_gst": {
"description": "Last Galileo Satellite Time when the authenticated data was received.",
"type": "array",
"items": {
"type": "integer"
}
"items": [
{
"type": "integer"
},
{
"type": "integer"
}
]
}
}
}
Expand All @@ -904,16 +957,26 @@
"start_gst": {
"description": "Reception Galileo Satellite Time of the authenticated data.",
"type": "array",
"items": {
"type": "integer"
}
"items": [
{
"type": "integer"
},
{
"type": "integer"
}
]
},
"last_gst": {
"description": "Last Galileo Satellite Time when the authenticated data was received.",
"type": "array",
"items": {
"type": "integer"
}
"items": [
{
"type": "integer"
},
{
"type": "integer"
}
]
}
}
}
Expand Down

0 comments on commit 7c3ae6f

Please sign in to comment.