Skip to content

Commit

Permalink
Refactor Current Trip signals (#509)
Browse files Browse the repository at this point in the history
* Refactor Current Trip signals

* Refactoring based on review comments
  • Loading branch information
erikbosch committed Jan 24, 2023
1 parent c3a37a0 commit 6c19b16
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 5 deletions.
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

-
2 changes: 1 addition & 1 deletion docs-gen/content/rule_set/data_entry/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ date: 2019-08-04T12:37:31+02:00
weight: 4
---

An attribute is an entity that has a default value, specified by
An attribute is an entity that has a default value, specified by
its ```default``` member.
The standard Vehicle Signal Specification does not include default values for all attributes.
If a default value has not been specified then the OEM must define a default value matching the actual vehicle.
Expand Down
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).
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 and Vehicle.TripDuration
datatype: uint32
type: sensor
unit: s
Expand Down
48 changes: 44 additions & 4 deletions spec/Vehicle/Vehicle.vspec
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,53 @@ Speed:
description: Vehicle speed.

TravelledDistance:
deprecation: V3.1 moved to Vehicle.TraveledDistance
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: 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:
datatype: string
type: attribute
default: '0000-01-01T00:00Z'
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.
The default value indicates that the vehicle never has been started, or that latest start time is unknown.

TripDuration:
datatype: float
type: sensor
unit: s
description: Duration of latest trip.
comment: This signal is not assumed to be continuously updated, but instead set to 0 when a trip starts
and set to the the actual duration of the trip when 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.

TripMeterReading:
datatype: float
type: actuator
unit: km
description: Current trip meter reading.
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 +251,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).
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

0 comments on commit 6c19b16

Please sign in to comment.