-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding concept of 'format' #771
base: master
Are you sure you want to change the base?
Conversation
3a316b3
to
94c3a88
Compare
Signed-off-by: Sebastian Schleemilch <[email protected]>
94c3a88
to
387a246
Compare
unix-time: | ||
definition: Number of non-leap seconds which have passed since 00:00:00 UTC on Thursday, 1 January 1970 | ||
unit: UNIX Timestamp | ||
quantity: datetime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to discuss if we still want to use something like quantity
for formats, to indicate that some formats represent the same type of content, like if you use iso8601
you could possibly convert it to unix-time-ms
, but not to ipv4
.
If we do not want to reuse the quantity concept then we should possibly remove datetime
from the quantity file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. I did not think about quantities so much here
Mom:
|
Units and their quantity kinds are comprehensively modelled in artefacts like the Quantities, Units, Dimensions and Types (QUDT). It would be a smart move to adopt the units listed in a maintained model, like this one. For example. The property Likewise, quantity kinds specify the fact that the actual quantity of a property can be represented with different compatible units. Example a. Specifying speed as a property that..a.1: ...might be represented with any compatible unit:Vehicle.Speed:
type: Sensor
quantity_kind: http://qudt.org/vocab/quantitykind/LinearVelocity # Any compatible unit is valid.
description: ...
... a.2: ...must be represented with a given unit:Vehicle.Speed:
type: Sensor
unit: http://qudt.org/vocab/unit:KiloM-PER-HR # Enforcing the use of a particular unit
description: ...
... Example b. Specifying the timestamp of the observation of the current location:CurrentLocation.Timestamp:
datatype: uint32
type: sensor
quantity_kind: http://qudt.org/vocab/quantitykind/Time
unit: http://qudt.org/vocab/unit/SEC
description: Timestamp from GNSS system for current location, formatted according to ISO 8601 with UTC time zone. Deciding which of the above examples is the right one depends on the scope we define for VSS. So far, VSS has been descriptive only, so in that case something like |
Thanks for the input @jdacoello The idea when introducing the quantity file was to go a bit in this direction. In the past we had a We could use labels like My favorite example is "stars" that we for some historical reason have in the unit file (but do not use for any signal)
As of today I am a bit reluctant to use qudt labels directly in *.vspec files, but I have no problem including qudt references in the unit/quantity/format files as needed. When creating the quantity file I tried to reuse definitions and add a reference, like in the example below. One can off course discuss if the QUDT definition at https://qudt.org/vocab/quantitykind/LinearVelocity is better or worse than the ISO definition
|
MoM:
|
MoM: Continue discuss next week, agree on how proceed |
Took a second look here. I suggest we discuss it at next meeting like this: First agree on whether we want to "split" If not, not much reason to discuss details. I can accept if we from a logical perspective want to split them, but I do not really know if there are any practical advantages. One disadvantage could be that we need to add one more parameter to the tool, but if we use the same feature that we look in the same folder as the root *.vspec by default that should not be a big problem. Details If we agree we need to discuss details. My proposal for now:
I am also thinking if we need to have a transition period. Like keeping unit and format in parallel for a while, so you could analyze the upcoming VSS 6.0 with vss-tools 5.0. Input there would be appreciated.
|
MoM:
|
MoM:
|
About
Current use of units comes to its limits for dates.
unix-time
as well asiso8601
are no units. Instead they represent a certain format.That is why we should have a more correct way of specifying that:
format
.The concept is similar with the one of units in regard of files and similar format.
vss-tools
should forbid the usage ofunit
andformat
at the same time.I thought about letting format elements also specify
allowed-units
. This would allow narrowing downunix-time
whether it is in unit seconds or milli seconds. I decided against that due to simplicity. Otherwise,allowed-datatypes
have to be merged or the one from format need to have priority or something in the middle.For the sake of simplicity for the user and since the problem is probably only related to unix-time, I threw away that idea.
Instead, for unix time we have right now two entries:
unix-time
andunix-time-ms