Choose what this site may use

This site uses strictly necessary cookies to work and to remember your privacy choices. With your permission it would also load content hosted by other services, such as videos, maps and fonts, which then receive your network address and device data. We do not sell or share your personal information and we run no advertising. Choose Accept all, Reject all or Customise. You can change your mind at any time through Privacy choices at the foot of every page.

  • Always on

    Needed for the site to work and to remember your privacy choices. Always on.

  • Remembers settings you choose, such as the light or dark display, in your browser.

  • Loads videos, maps and other content hosted by other services. Those services receive your address and device data.

Menu Close
In this section: Specification
Specification
Functions
Schemas
Registers

SensorPassport

Source schemas/json/sensor-passport.schema.json

On this page
  1. Properties
  2. Positive fixtures
  3. Negative fixtures
  4. Mappings to open standards
  5. Schema

Versioned passport of one sensor (OBSP 0.1 section 5.3): device class, model, serial, firmware digest, mounting and exposure, sampling plan, observed properties with UCUM units and the calibration history. The provider is optional and separate, identified by role and UNI. Property descriptions carry the SensorML 3.0, SOSA/SSN and WIGOS crosswalk; they are annotations, not an executable mapping.

FieldValue
Identifierurn:obsp:schema:v3.1:sensorpassport
Dialecthttps://json-schema.org/draft/2020-12/schema
Used by functionsDescribe

Properties

PropertyRequiredTypeDescription
schemaVersionyesreference
apiVersionyesconstant
kindyesconstant
protocolVersionyesconstant
passportUniyesreference
versionyesreferencePassport version. Observations reference it so a recalibration is traceable. SensorML: PhysicalSystem version
deviceClassyesstringSensorML: classification; SOSA: sosa:Sensor type
nodeUniyesreferenceSOSA: sosa:isHostedBy (platform)
siteUninoreferenceWIGOS: station/platform
modelyesobjectMake-independent model designation. SensorML: identification model; WIGOS: instrument model
providernoobjectOptional and separate from the model: the provider is identified by role and UNI; a name is optional and disclosure-gated
serialyesstringSensorML: identification serialNumber; WIGOS: instrument serial number
firmwareyesobject
mountingyesobjectSensorML: position and configuration; WIGOS: exposure and siting
samplingPlanyesobjectWIGOS: sampling strategy, temporal reporting; SOSA: sosa:Procedure
observedPropertiesyesarray
calibrationStateyesenumeration
calibrationHistoryyesarrayCalibrationRecord references, oldest first
correctionStateyesreference
supersedesnoreference
evidenceRefsnoarray
recordedAtyesreference
extensionsnoreference

Positive fixtures

  • sensor-passport.not-calibrated.valid.json
  • sensor-passport.valid.json

Negative fixtures

  • sensor-passport.calibrated-without-history.json: a calibrated sensor references its calibration history
  • sensor-passport.missing-firmware-digest.json: firmware is digest-bound
  • sensor-passport.missing-height-as-zero.json: a missing quantity is a typed state, never zero
  • sensor-passport.missing-version.json: a passport is versioned
  • sensor-passport.non-ndc-device-class.json: device class is an ndc.* id
  • sensor-passport.non-ucum-unit.json: units are UCUM codes
  • sensor-passport.provider-name-in-model.json: the provider is separate from the model
  • sensor-passport.provider-name-without-disclosure.json: a provider name is optional and disclosure-gated

Mappings to open standards

A mapping to a standard, never a conformance statement.

  • maps to NS-3b Dataset and product metadata profile (relation REL-NS-3B)
  • maps to NS-15 System model binding (relation REL-NS-15)
  • maps to NRS-S11 System profile: instruments, sensors and calibration (OPS) (relation REL-NRS-S11)
  • maps to W3C/OGC SOSA and SSN ontologies (relation EXT-SOSA)

Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:obsp:schema:v3.1:sensorpassport",
  "title": "SensorPassport",
  "description": "Versioned passport of one sensor (OBSP 0.1 section 5.3): device class, model, serial, firmware digest, mounting and exposure, sampling plan, observed properties with UCUM units and the calibration history. The provider is optional and separate, identified by role and UNI. Property descriptions carry the SensorML 3.0, SOSA/SSN and WIGOS crosswalk; they are annotations, not an executable mapping.",
  "type": "object",
  "required": [
    "schemaVersion",
    "apiVersion",
    "kind",
    "protocolVersion",
    "passportUni",
    "version",
    "deviceClass",
    "nodeUni",
    "model",
    "serial",
    "firmware",
    "mounting",
    "samplingPlan",
    "observedProperties",
    "calibrationState",
    "calibrationHistory",
    "correctionState",
    "recordedAt"
  ],
  "properties": {
    "schemaVersion": {
      "$ref": "#/$defs/SchemaVersion"
    },
    "apiVersion": {
      "const": "obsp/sensor-passport/v3.1"
    },
    "kind": {
      "const": "SensorPassport"
    },
    "protocolVersion": {
      "const": "obsp/0.1"
    },
    "passportUni": {
      "$ref": "#/$defs/Uni"
    },
    "version": {
      "$ref": "#/$defs/RecordVersion",
      "description": "Passport version. Observations reference it so a recalibration is traceable. SensorML: PhysicalSystem version"
    },
    "deviceClass": {
      "type": "string",
      "pattern": "^ndc\\.[a-z0-9-]+\\.[a-z0-9-]+$",
      "description": "SensorML: classification; SOSA: sosa:Sensor type"
    },
    "nodeUni": {
      "$ref": "#/$defs/Uni",
      "description": "SOSA: sosa:isHostedBy (platform)"
    },
    "siteUni": {
      "$ref": "#/$defs/Uni",
      "description": "WIGOS: station/platform"
    },
    "model": {
      "type": "object",
      "required": [
        "designation"
      ],
      "properties": {
        "designation": {
          "$ref": "#/$defs/NonEmptyString"
        },
        "hardwareRevision": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        }
      },
      "additionalProperties": false,
      "description": "Make-independent model designation. SensorML: identification model; WIGOS: instrument model"
    },
    "provider": {
      "type": "object",
      "required": [
        "role",
        "providerUni"
      ],
      "properties": {
        "role": {
          "const": "PROVIDER"
        },
        "providerUni": {
          "$ref": "#/$defs/Uni"
        },
        "name": {
          "$ref": "#/$defs/NonEmptyString"
        },
        "nameDisclosure": {
          "enum": [
            "PUBLIC",
            "RESTRICTED"
          ]
        }
      },
      "additionalProperties": false,
      "dependentRequired": {
        "name": [
          "nameDisclosure"
        ]
      },
      "description": "Optional and separate from the model: the provider is identified by role and UNI; a name is optional and disclosure-gated"
    },
    "serial": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$",
      "description": "SensorML: identification serialNumber; WIGOS: instrument serial number"
    },
    "firmware": {
      "type": "object",
      "required": [
        "version",
        "digest"
      ],
      "properties": {
        "version": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "digest": {
          "$ref": "#/$defs/Digest"
        },
        "suitManifestDigest": {
          "$ref": "#/$defs/Digest"
        }
      },
      "additionalProperties": false
    },
    "mounting": {
      "type": "object",
      "required": [
        "exposure",
        "heightAboveGround"
      ],
      "properties": {
        "exposure": {
          "enum": [
            "OUTDOOR_FREE_AIR",
            "OUTDOOR_SHELTERED",
            "RADIATION_SHIELD",
            "ROOFTOP",
            "MAST",
            "INDOOR",
            "SUBSURFACE",
            "IN_WATER",
            "NOT_RECORDED"
          ]
        },
        "heightAboveGround": {
          "$ref": "#/$defs/TypedQuantity"
        },
        "azimuth": {
          "$ref": "#/$defs/TypedQuantity"
        },
        "tilt": {
          "$ref": "#/$defs/TypedQuantity"
        },
        "sitingClass": {
          "enum": [
            "CLASS_1",
            "CLASS_2",
            "CLASS_3",
            "CLASS_4",
            "CLASS_5",
            "NOT_CLASSIFIED"
          ],
          "description": "WMO siting classification where applicable"
        }
      },
      "additionalProperties": false,
      "description": "SensorML: position and configuration; WIGOS: exposure and siting"
    },
    "samplingPlan": {
      "type": "object",
      "required": [
        "mode",
        "aggregation"
      ],
      "properties": {
        "mode": {
          "enum": [
            "PERIODIC",
            "EVENT_DRIVEN",
            "BURST",
            "ADAPTIVE"
          ]
        },
        "periodSeconds": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "aggregation": {
          "enum": [
            "INSTANTANEOUS",
            "MEAN",
            "MIN",
            "MAX",
            "SUM",
            "MEDIAN",
            "STANDARD_DEVIATION"
          ]
        },
        "aggregationWindowSeconds": {
          "type": "number",
          "exclusiveMinimum": 0
        }
      },
      "additionalProperties": false,
      "if": {
        "properties": {
          "mode": {
            "const": "PERIODIC"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "required": [
          "periodSeconds"
        ]
      },
      "description": "WIGOS: sampling strategy, temporal reporting; SOSA: sosa:Procedure"
    },
    "observedProperties": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "property",
          "unit"
        ],
        "properties": {
          "property": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)*$",
            "description": "SOSA: sosa:observes"
          },
          "unit": {
            "$ref": "#/$defs/UcumUnit"
          },
          "range": {
            "type": "object",
            "required": [
              "min",
              "max"
            ],
            "properties": {
              "min": {
                "type": "number"
              },
              "max": {
                "type": "number"
              }
            },
            "additionalProperties": false
          },
          "resolution": {
            "type": "number",
            "exclusiveMinimum": 0
          }
        },
        "additionalProperties": false
      }
    },
    "calibrationState": {
      "enum": [
        "CALIBRATED",
        "CALIBRATION_DUE",
        "CALIBRATION_EXPIRED",
        "NOT_CALIBRATED",
        "NOT_APPLICABLE"
      ]
    },
    "calibrationHistory": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "$ref": "#/$defs/VersionedRecordRef"
      },
      "description": "CalibrationRecord references, oldest first"
    },
    "correctionState": {
      "$ref": "#/$defs/CorrectionState"
    },
    "supersedes": {
      "$ref": "#/$defs/VersionedRecordRef"
    },
    "evidenceRefs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EvidenceRef"
      }
    },
    "recordedAt": {
      "$ref": "#/$defs/Timestamp"
    },
    "extensions": {
      "$ref": "#/$defs/Extensions"
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "calibrationState": {
            "enum": [
              "CALIBRATED",
              "CALIBRATION_DUE",
              "CALIBRATION_EXPIRED"
            ]
          }
        },
        "required": [
          "calibrationState"
        ]
      },
      "then": {
        "properties": {
          "calibrationHistory": {
            "minItems": 1
          }
        }
      },
      "else": {
        "properties": {
          "calibrationHistory": {
            "maxItems": 0
          }
        }
      }
    }
  ],
  "$defs": {
    "SchemaVersion": {
      "type": "string",
      "const": "3.1.0"
    },
    "Uni": {
      "type": "string",
      "minLength": 8,
      "maxLength": 256,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9:._/@-]{7,255}$",
      "description": "Durable UNI or typed unresolved identifier according to authority rules"
    },
    "Digest": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9._-]{1,31}:[A-Fa-f0-9]{32,128}$",
      "description": "Algorithm-prefixed hexadecimal digest"
    },
    "NonEmptyString": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048
    },
    "Timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "RecordVersion": {
      "type": "string",
      "pattern": "^[0-9]+(\\.[0-9]+){0,2}$"
    },
    "Extensions": {
      "type": "object",
      "description": "Namespaced extension bag; unknown top-level fields remain forbidden.",
      "propertyNames": {
        "pattern": "^[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)+$"
      },
      "additionalProperties": true
    },
    "EvidenceRef": {
      "type": "object",
      "required": [
        "uri",
        "digest"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096
        },
        "digest": {
          "$ref": "#/$defs/Digest"
        },
        "kind": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "recordedAt": {
          "$ref": "#/$defs/Timestamp"
        }
      },
      "additionalProperties": false
    },
    "ProtocolRole": {
      "enum": [
        "NODE",
        "SITE_CELL",
        "CLUSTER",
        "FED_PEER",
        "GRID_OPERATOR",
        "PROVIDER",
        "VERIFIER",
        "CONSUMER",
        "STEWARD"
      ],
      "description": "OBSP 0.1 participant role (specification section 3). Roles, never company names."
    },
    "RecordRef": {
      "type": "object",
      "required": [
        "uni",
        "digest"
      ],
      "properties": {
        "uni": {
          "$ref": "#/$defs/Uni"
        },
        "version": {
          "$ref": "#/$defs/RecordVersion"
        },
        "digest": {
          "$ref": "#/$defs/Digest"
        }
      },
      "additionalProperties": false
    },
    "VersionedRecordRef": {
      "type": "object",
      "required": [
        "uni",
        "version",
        "digest"
      ],
      "properties": {
        "uni": {
          "$ref": "#/$defs/Uni"
        },
        "version": {
          "$ref": "#/$defs/RecordVersion"
        },
        "digest": {
          "$ref": "#/$defs/Digest"
        }
      },
      "additionalProperties": false
    },
    "CorrectionState": {
      "enum": [
        "CURRENT",
        "DISPUTED",
        "SUPERSEDED",
        "WITHDRAWN",
        "RECALLED"
      ]
    },
    "UcumUnit": {
      "type": "string",
      "pattern": "^[A-Za-z0-9%\\[\\]{}*./'_+-]{1,64}$",
      "description": "UCUM case-sensitive unit code (for example Cel, m/s, hPa, W/m2, 1, %). Spaces and non-ASCII symbols are rejected."
    },
    "TypedQuantity": {
      "type": "object",
      "required": [
        "state"
      ],
      "properties": {
        "state": {
          "enum": [
            "MEASURED",
            "ESTIMATED",
            "NOT_RECORDED",
            "NOT_APPLICABLE"
          ]
        },
        "value": {
          "type": "number"
        },
        "unit": {
          "$ref": "#/$defs/UcumUnit"
        },
        "uncertainty": {
          "type": "number",
          "minimum": 0
        }
      },
      "additionalProperties": false,
      "if": {
        "properties": {
          "state": {
            "enum": [
              "MEASURED",
              "ESTIMATED"
            ]
          }
        },
        "required": [
          "state"
        ]
      },
      "then": {
        "required": [
          "value",
          "unit"
        ]
      },
      "else": {
        "not": {
          "anyOf": [
            {
              "required": [
                "value"
              ]
            },
            {
              "required": [
                "unit"
              ]
            },
            {
              "required": [
                "uncertainty"
              ]
            }
          ]
        }
      },
      "description": "A quantity whose absence is a typed state. NOT_RECORDED and NOT_APPLICABLE carry no value, never a zero."
    }
  },
  "additionalProperties": false
}