Skip to content
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

Refactor Current Trip signals #509

Merged
merged 2 commits into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,26 @@ No change to tooling is implemented, as the vss-tools already today give a warni
Warning: Attribute(s) sensor in element Temperature not a core or known extended attribute.
```

### Deprecated or Deleted signals

* `Vehicle.TravelledDistance` deprecated from 3.1. New signal `Vehicle.TraveledDistance`added.
Background is to be aligned with VSS style guide using American English.
* `Vehicle.Powertrain.FuelSystem.TimeSinceStart` deprecated from 3.1. New signal `Vehicle.StartTime` added.
Reason is that `TimeSinceStart` is not powertrain-related and other signals related to current trip are located on top-level.
After discussion it was agreed that it is better to have a signal for start time rather than duration.

## Planned Changes VSS 4.0

### Actuator and Sensor Attributes

The attributes `sensor` and `actuator`, deprecated from VSS 3.1, will be removed from the [VSS syntax](docs-gen/content/rule_set/data_entry/sensor_actuator.md).


### Deprecated or Deleted signals

* `Vehicle.TravelledDistance` ,deprecated from VSS 3.1, will be removed.
* `Vehicle.Powertrain.FuelSystem.TimeSinceStart` ,deprecated from VSS 3.1, will be removed.

## Planned Changes VSS 5.0

-
4 changes: 4 additions & 0 deletions spec/Powertrain/FuelSystem.vspec
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ ConsumptionSinceStart:
type: sensor
unit: l
description: Fuel amount in liters consumed since start of current trip.
comment: A new trip is considered to start when engine gets enabled (e.g. LowVoltageSystemState in ON or START mode).
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is it sufficient to have consumption since start of current trip, or do we also need a signal for "consumption since trip meter reset". Similar for the signal AverageConsumption above. Today we state that period is a variation point, shall we better specify that it is for current trip or split it to two signals, one for "average consumption for current trip" and one for "average consumption since trip meter reset"

A trip is considered to end when engine is no longer enabled.
The signal may however keep the value of the last trip until a new trip is started.

TimeSinceStart:
deprecation: V3.1 replaced by Vehicle.StartTime
datatype: uint32
type: sensor
unit: s
Expand Down
45 changes: 41 additions & 4 deletions spec/Vehicle/Vehicle.vspec
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,50 @@ Speed:
description: Vehicle speed.

TravelledDistance:
deprecation: V3.1 moved to Vehicle.TraveledDistance
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Today we are mixing British and American English. While poking around in this area, do we think it is a good idea to rename TravelledDistance to TraveledDistance (using our deprecated-methodology, i.e. keeping old signal until v4.0)

datatype: float
type: sensor
unit: km
description: Odometer reading, total distance travelled during the lifetime of the vehicle.
description: Odometer reading, total distance traveled during the lifetime of the vehicle.

TripMeterReading:
TraveledDistance:
datatype: float
type: sensor
unit: km
description: Odometer reading, total distance traveled during the lifetime of the vehicle.

TraveledDistanceSinceStart:
datatype: float
type: sensor
unit: km
description: Current trip meter reading.
description: Distance traveled since start of current trip.
comment: A new trip is considered to start when engine gets enabled (e.g. LowVoltageSystemState in ON or START mode).
A trip is considered to end when engine is no longer enabled.
The signal may however keep the value of the last trip until a new trip is started.

StartTime:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed from TimeSinceStart to StartTime based on discussion in last meeting.
Using string in UTC-format, as that is the format used in some other places in the tree to represent time - we currently do not use unix time stamps (i.e. seconds since 1970 represented as an int value anywhere)

(That is a side topic that comes up now and then, do we in VSS syntax need something that from a formal perspective tells that a signal contains a time stamp, either by using a predefined unit, or a datatype alias (for example "datatype:time" but specifying that it means string + iso 8601 syntax)

datatype: string
type: sensor
description: Start time of current or latest trip, formatted according to ISO 8601 with UTC time zone.
comment: This signal is supposed to be set whenever a new trip starts.
A new trip is considered to start when engine gets enabled (e.g. LowVoltageSystemState in ON or START mode).
A trip is considered to end when engine is no longer enabled.

EndTime:
datatype: string
type: sensor
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Meeting notes:

  • Daniel: Is rather an attribute, change only once per ignition cycle.
  • Sebastian: but could be not that intuitative to subscribe to an attribute to be informed when trip finishes.
  • Daniel: Can be better to have both start time (attribute) and duration (sensor).
  • Decision: Erik to adapt to PR to use "both start time (attribute) and duration (sensor)". After update, others shall review. Merge or continued discussion on next meeting

description: End time of latest trip, formatted according to ISO 8601 with UTC time zone.
comment: This signal is supposed to be set whenever a trip ends.
A new trip is considered to start when engine gets enabled (e.g. LowVoltageSystemState in ON or START mode).
A trip is considered to end when engine is no longer enabled.
If EndTime is later than StartTime that means no trip is ongoing and duration of latest trip can be calculated by EndTime - StartTime.

TripMeterReading:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For traveled distance I see it relevant to have 3 values

  • TraveledDistance - the value for the life time of the vehicle
  • TraveledDistanceSinceStart - the value since start of current trip
  • TripMeterReading - the value since manual reset (by driver)

Adapting description accordingly.

datatype: float
type: actuator
unit: km
description: Trip meter reading.
comment: The trip meter is an odometer that can be manually reset by the driver

IsBrokenDown:
datatype: boolean
Expand All @@ -214,7 +248,10 @@ AverageSpeed:
type: sensor
unit: km/h
description: Average speed for the current trip.

comment: A new trip is considered to start when engine gets enabled (e.g. LowVoltageSystemState in ON or START mode).
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is it sufficient to have a single AverageSpeed - is so do we want to keep old name, or rename to AverageSpeedSinceStart to be better aligned with other signals referring to current trip.

Or do we need additional signals for average speed - e.g. by adding one related to average speed over lifetime or average speed since trip meter reset?

A trip is considered to end when engine is no longer enabled.
The signal may however keep the value of the last trip until a new trip is started.
Calculation of average speed may exclude periods when the vehicle for example is not moving or transmission is in neutral.

#
# Spatial Acceleration
Expand Down