Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions OS2GPSConnector/CONTRIBUTORS.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: This is a compilation list of all CONTRIBUTORS across different objects (data models) alphabetically ordered. All fields are non mandatory
contributors:
- name:
surname:
mail: os2fleetoptimiser@os2.eu
organization: OS2.eu
project: OS2 GPS-Connector
comments: Project funded by OS2 for danish municipalities.
year: 2025
10 changes: 10 additions & 0 deletions OS2GPSConnector/VehicleModel/ADOPTERS.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: This is a compilation list of the current adopters of the data model VehicleModel of the Subject dataModel.Transportation. All fields are non mandatory. More info at https://smart-data-models.github.io/data-models/templates/dataModel/CURRENT_ADOPTERS.yaml
currentAdopters:
-
adopter: OS2 GPS-Connector
description: Open source project for danish municipalities to collect GPS data for analysis and optimisation of their fleets
mail: os2fleetoptimiser@os2.eu
organization: https://www.os2.eu/
project: https://github.com/OS2sandbox/gps-connector
comments: Storing additional meta-data for vehicle models, such as 'tractionBatteryCapacity', allows further optimisation by calculating range for BEV.
startDate:
36 changes: 36 additions & 0 deletions OS2GPSConnector/VehicleModel/examples/example-normalized.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"id": "vehiclemodel:buzz",
"type": "VehicleModel",
"name": {
"type": "Text",
"value": "VW-IDBuzz"
},
"brandName": {
"type": "Text",
"value": "Volkswagen"
},
"modelName": {
"type": "Text",
"value": "ID. Buzz"
},
"manufacturerName": {
"type": "Text",
"value": "Volkswagen"
},
"vehicleType": {
"type": "Text",
"value": "car"
},
"fuelType": {
"type": "Text",
"value": "electric"
},
"fuelConsumption": {
"type": "Number",
"value": 20.7
},
"tractionBatteryCapacity": {
"type": "Number",
"value": 79
}
}
40 changes: 40 additions & 0 deletions OS2GPSConnector/VehicleModel/examples/example-normalized.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"id": "urn:ngsi-ld:VehicleModel:vehiclemodel:buzz",
"type": "VehicleModel",
"name": {
"type": "Property",
"value": "VW-IDBuzz"
},
"brandName": {
"type": "Property",
"value": "Volkswagen"
},
"modelName": {
"type": "Property",
"value": "ID. Buzz"
},
"manufacturerName": {
"type": "Property",
"value": "Volkswagen"
},
"vehicleType": {
"type": "Property",
"value": "car"
},
"fuelType": {
"type": "Property",
"value": "electric"
},
"fuelConsumption": {
"type": "Property",
"value": 20.7
},
"tractionBatteryCapacity": {
"type": "Property",
"value": 79
},
"@context": [
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld",
"https://raw.githubusercontent.com/smart-data-models/dataModel.Transportation/master/context.jsonld"
]
}
12 changes: 12 additions & 0 deletions OS2GPSConnector/VehicleModel/examples/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "vehiclemodel:buzz",
"type": "VehicleModel",
"name": "VW-IDBuzz",
"brandName": "Volkswagen",
"modelName": "ID. Buzz",
"manufacturerName": "Volkswagen",
"vehicleType": "car",
"fuelType": "electric",
"fuelConsumption": 20.7,
"tractionBatteryCapacity": 79
}
16 changes: 16 additions & 0 deletions OS2GPSConnector/VehicleModel/examples/example.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "urn:ngsi-ld:VehicleModel:vehiclemodel:buzz",
"type": "VehicleModel",
"name": "VW-Buzz",
"brandName": "Volkswagen",
"modelName": "ID. Buzz",
"manufacturerName": "Volkswagen",
"vehicleType": "car",
"fuelType": "electric",
"fuelConsumption": 20.7,
"tractionBatteryCapacity": 79,
"@context": [
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld",
"https://raw.githubusercontent.com/smart-data-models/dataModel.Transportation/master/context.jsonld"
]
}
150 changes: 150 additions & 0 deletions OS2GPSConnector/VehicleModel/schema.json
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

although this is correct you need to include the examples to demonstrate that the data model is actually in use

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you @albertoabellagarcia.
I have added examples where tractionBatteryCapacity is relevant along with the fuelConsumption.

Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$schemaVersion": "0.0.1",
"modelTags": "",
"$id": "https://smart-data-models.github.io/dataModel.Transportation/VehicleModel/schema.json",
"title": " - Vehicle / Vehicle Model",
"description": "This entity models a particular vehicle model, including all properties which are common to multiple vehicle instances belonging to such model.",
"type": "object",
"allOf": [
{
"$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/GSMA-Commons"
},
{
"$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/Location-Commons"
},
{
"$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/PhysicalObject-Commons"
},
{
"properties": {
"type": {
"type": "string",
"enum": [
"VehicleModel"
],
"description": "Property. NGSI Entity type. It has to be VehicleModel"
},
"vehicleType": {
"type": "string",
"description": "Property. Type of vehicle from the point of view of its structural characteristics. This is different than the vehicle category . Model:'https://schema.org/Text'. Enum:'agriculturalVehicle, anyVehicle, articulatedVehicle, bicycle, binTrolley, bus, car, caravan, carOrLightVehicle, carWithCaravan, carWithTrailer, cleaningTrolley, constructionOrMaintenanceVehicle, fourWheelDrive, highSidedVehicle, lorry, minibus, moped, motorcycle, motorcycleWithSideCar, motorscooter, sweepingMachine, tanker, threeWheeledVehicle, trailer, tram, twoWheeledVehicle, trolley, van, vehicleWithoutCatalyticConverter, vehicleWithCaravan, vehicleWithTrailer, withEvenNumberedRegistrationPlates, withOddNumberedRegistrationPlates, other'. The following values defined by _VehicleTypeEnum_ and _VehicleTypeEnum2_, [DATEX 2 version 2.3](http://d2docs.ndwcloud.nu/_static/umlmodel/v2.3/index.htm)",
"enum": [
"agriculturalVehicle",
"bicycle",
"binTrolley",
"bus",
"car",
"caravan",
"carWithCaravan",
"carWithTrailer",
"cleaningTrolley",
"constructionOrMaintenanceVehicle",
"lorry",
"minibus",
"moped",
"motorcycle",
"motorcycleWithSideCar",
"motorscooter",
"sweepingMachine",
"tanker",
"trailer",
"tram",
"van",
"trolley"
]
},
"brandName": {
"type": "string",
"description": "Property. Vehicle's brand name. Model:'https://schema.org/brand'"
},
"modelName": {
"type": "string",
"description": "Property. Vehicle's model name. Model:'https://schema.org/model'"
},
"manufacturerName": {
"type": "string",
"description": "Property. Vehicle's manufacturer name. Model:'https://schema.org/Text'"
},
"vehicleModelDate": {
"type": "string",
"format": "date-time",
"description": "Property. The release date of a vehicle model (often used to differentiate versions of the same make and model). Model:'https://schema.org/vehicleModelDate'"
},
"cargoVolume": {
"type": "number",
"minimum": 0,
"description": "Property. The available volume for cargo or luggage. For automobiles, this is usually the trunk volume. Model:'https://schema.org/cargoVolume'. Units:'Liters'. If only a single value is provided (type Number) it will refer to the maximum volume"
},
"fuelType": {
"type": "string",
"description": "Property. The type of fuel suitable for the engine or engines of the vehicle. Model:'https://schema.org/DateTime'. Enum:'autogas, biodiesel, ethanol, cng, diesel, electric, gasoline, hybrid electric/diesel, hybrid electric/petrol, hydrogen, lpg, petrol, petrol(unleaded), petrol(leaded), other'",
"enum": [
"autogas",
"biodiesel",
"cng",
"diesel",
"electric",
"ethanol",
"gasoline",
"hybrid_electric_diesel",
"hybrid_electric_petrol",
"hydrogen",
"lpg",
"petrol",
"petrol(unleaded)",
"petrol(leaded)",
"other"
]
},
"fuelConsumption": {
"type": "number",
"minimum": 0,
"description": "Property. The amount of fuel consumed for traveling a particular distance or temporal duration with the given vehicle (e.g. liters per 100 km). Model:'https://schema.org/fuelConsumption'. Units:'liters per 100 kilometer'"
},
"height": {
"type": "number",
"minimum": 0,
"description": "Property. Vehicle's height. Model:'https://schema.org/height'"
},
"tractionBatteryCapacity": {
"type": "number",
"minimum": 0,
"description": "Property. Vehicle's traction battery capacity. Applies to electrically powered vehicles (e.g. 52 kWh)"
},
"width": {
"type": "number",
"minimum": 0,
"description": "Property. Vehicle's width. Model:'https://schema.org/width'"
},
"depth": {
"type": "number",
"minimum": 0,
"description": "Property. Vehicle's depth. Model:'https://schema.org/depth'"
},
"weight": {
"type": "number",
"minimum": 0,
"description": "Property. Vehicle's weigth. Model:'https://schema.org/weigth'"
},
"vehicleEngine": {
"type": "string",
"description": "Property. Information about the engine or engines of the vehicle. Model:'https://schema.org/vehicleEngine'"
},
"url": {
"type": "string",
"format": "uri",
"description": "Property. URL which provides a description of this vehicle model. Model:'https://schema.org/URL'"
}
}
}
],
"required": [
"id",
"name",
"type",
"vehicleType",
"brandName",
"modelName",
"manufacturerName"
]
}