compass

package
v0.8.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Code generated by github.com/DIMO-Network/model-garage.

Code generated by github.com/DIMO-Network/model-garage DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChassisAxleRow1WheelLeftTirePressureFromCompass added in v0.4.10

func ChassisAxleRow1WheelLeftTirePressureFromCompass(jsonData []byte) (ret float64, err error)

ChassisAxleRow1WheelLeftTirePressureFromCompass converts the given JSON data to a float64.

func ChassisAxleRow1WheelRightTirePressureFromCompass added in v0.4.10

func ChassisAxleRow1WheelRightTirePressureFromCompass(jsonData []byte) (ret float64, err error)

ChassisAxleRow1WheelRightTirePressureFromCompass converts the given JSON data to a float64.

func ChassisAxleRow2WheelLeftTirePressureFromCompass added in v0.4.10

func ChassisAxleRow2WheelLeftTirePressureFromCompass(jsonData []byte) (ret float64, err error)

ChassisAxleRow2WheelLeftTirePressureFromCompass converts the given JSON data to a float64.

func ChassisAxleRow2WheelRightTirePressureFromCompass added in v0.4.10

func ChassisAxleRow2WheelRightTirePressureFromCompass(jsonData []byte) (ret float64, err error)

ChassisAxleRow2WheelRightTirePressureFromCompass converts the given JSON data to a float64.

func ConvertBarToKPa added in v0.4.10

func ConvertBarToKPa(bar float64) float64

ConvertBarToKPa converts a pressure value from bar to kPa.

func ConvertPSIToKPa added in v0.4.10

func ConvertPSIToKPa(psi float64) float64

ConvertPSIToKPa converts a pressure value from psi to kPa.

func CurrentLocationAltitudeFromCompass

func CurrentLocationAltitudeFromCompass(jsonData []byte) (ret float64, err error)

CurrentLocationAltitudeFromCompass converts the given JSON data to a float64.

func CurrentLocationHeadingFromCompass added in v0.4.11

func CurrentLocationHeadingFromCompass(jsonData []byte) (ret float64, err error)

CurrentLocationHeadingFromCompass converts the given JSON data to a float64.

func CurrentLocationLatitudeFromCompass

func CurrentLocationLatitudeFromCompass(jsonData []byte) (ret float64, err error)

CurrentLocationLatitudeFromCompass converts the given JSON data to a float64.

func CurrentLocationLongitudeFromCompass

func CurrentLocationLongitudeFromCompass(jsonData []byte) (ret float64, err error)

CurrentLocationLongitudeFromCompass converts the given JSON data to a float64.

func DecodeFingerprint added in v0.5.0

func DecodeFingerprint(event cloudevent.RawEvent) (cloudevent.Fingerprint, error)

DecodeFingerprint decodes a fingerprint from a CloudEvent.

func DecodeSignals added in v0.5.0

func DecodeSignals(ce cloudevent.RawEvent) ([]vss.Signal, error)

DecodeSignals decodes a compass message into signals.

func IsIgnitionOnFromCompass added in v0.4.11

func IsIgnitionOnFromCompass(jsonData []byte) (ret float64, err error)

IsIgnitionOnFromCompass converts the given JSON data to a float64.

func LowVoltageBatteryCurrentVoltageFromCompass

func LowVoltageBatteryCurrentVoltageFromCompass(jsonData []byte) (ret float64, err error)

LowVoltageBatteryCurrentVoltageFromCompass converts the given JSON data to a float64.

func PowertrainCombustionEngineECTFromCompass added in v0.4.10

func PowertrainCombustionEngineECTFromCompass(jsonData []byte) (ret float64, err error)

PowertrainCombustionEngineECTFromCompass converts the given JSON data to a float64.

func PowertrainCombustionEngineEOPFromCompass added in v0.4.10

func PowertrainCombustionEngineEOPFromCompass(jsonData []byte) (ret float64, err error)

PowertrainCombustionEngineEOPFromCompass converts the given JSON data to a float64.

func PowertrainCombustionEngineEOTFromCompass added in v0.4.10

func PowertrainCombustionEngineEOTFromCompass(jsonData []byte) (ret float64, err error)

PowertrainCombustionEngineEOTFromCompass converts the given JSON data to a float64.

func PowertrainCombustionEngineSpeedFromCompass added in v0.4.10

func PowertrainCombustionEngineSpeedFromCompass(jsonData []byte) (ret float64, err error)

PowertrainCombustionEngineSpeedFromCompass converts the given JSON data to a float64.

func PowertrainFuelSystemAbsoluteLevelFromCompass

func PowertrainFuelSystemAbsoluteLevelFromCompass(jsonData []byte) (ret float64, err error)

PowertrainFuelSystemAbsoluteLevelFromCompass converts the given JSON data to a float64.

func PowertrainFuelSystemRelativeLevelFromCompass

func PowertrainFuelSystemRelativeLevelFromCompass(jsonData []byte) (ret float64, err error)

PowertrainFuelSystemRelativeLevelFromCompass converts the given JSON data to a float64.

func PowertrainTransmissionTravelledDistanceFromCompass

func PowertrainTransmissionTravelledDistanceFromCompass(jsonData []byte) (ret float64, err error)

PowertrainTransmissionTravelledDistanceFromCompass converts the given JSON data to a float64.

func SignalsFromCompass

func SignalsFromCompass(baseSignal vss.Signal, jsonData []byte) ([]vss.Signal, []error)

SignalsFromCompass creates a slice of vss.Signal from the given v1 status JSON data. On error, partial results may be returned.

func SpeedFromCompass

func SpeedFromCompass(jsonData []byte) (ret float64, err error)

SpeedFromCompass converts the given JSON data to a float64.

func ToChassisAxleRow1WheelLeftTirePressure0 added in v0.4.10

func ToChassisAxleRow1WheelLeftTirePressure0(originalDoc []byte, val string) (float64, error)

ToChassisAxleRow1WheelLeftTirePressure0 converts data from field 'labels.tirePressure.front.left.value' of type string to 'Vehicle.Chassis.Axle.Row1.Wheel.Left.Tire.Pressure' of type float64. Vehicle.Chassis.Axle.Row1.Wheel.Left.Tire.Pressure: Tire pressure in kilo-Pascal. Unit: 'kPa'

func ToChassisAxleRow1WheelRightTirePressure0 added in v0.4.10

func ToChassisAxleRow1WheelRightTirePressure0(originalDoc []byte, val string) (float64, error)

ToChassisAxleRow1WheelRightTirePressure0 converts data from field 'labels.tirePressure.front.right.value' of type string to 'Vehicle.Chassis.Axle.Row1.Wheel.Right.Tire.Pressure' of type float64. Vehicle.Chassis.Axle.Row1.Wheel.Right.Tire.Pressure: Tire pressure in kilo-Pascal. Unit: 'kPa'

func ToChassisAxleRow2WheelLeftTirePressure0 added in v0.4.10

func ToChassisAxleRow2WheelLeftTirePressure0(originalDoc []byte, val string) (float64, error)

ToChassisAxleRow2WheelLeftTirePressure0 converts data from field 'labels.tirePressure.rear.left.value' of type string to 'Vehicle.Chassis.Axle.Row2.Wheel.Left.Tire.Pressure' of type float64. Vehicle.Chassis.Axle.Row2.Wheel.Left.Tire.Pressure: Tire pressure in kilo-Pascal. Unit: 'kPa'

func ToChassisAxleRow2WheelRightTirePressure0 added in v0.4.10

func ToChassisAxleRow2WheelRightTirePressure0(originalDoc []byte, val string) (float64, error)

ToChassisAxleRow2WheelRightTirePressure0 converts data from field 'labels.tirePressure.rear.right.value' of type string to 'Vehicle.Chassis.Axle.Row2.Wheel.Right.Tire.Pressure' of type float64. Vehicle.Chassis.Axle.Row2.Wheel.Right.Tire.Pressure: Tire pressure in kilo-Pascal. Unit: 'kPa'

func ToCurrentLocationAltitude0

func ToCurrentLocationAltitude0(originalDoc []byte, val string) (float64, error)

ToCurrentLocationAltitude0 converts data from field 'labels.geolocation.altitude.value' of type string to 'Vehicle.CurrentLocation.Altitude' of type float64. Vehicle.CurrentLocation.Altitude: Current altitude relative to WGS 84 reference ellipsoid, as measured at the position of GNSS receiver antenna. Unit: 'm'

func ToCurrentLocationHeading0 added in v0.4.11

func ToCurrentLocationHeading0(originalDoc []byte, val string) (float64, error)

ToCurrentLocationHeading0 converts data from field 'labels.heading' of type string to 'Vehicle.CurrentLocation.Heading' of type float64. Vehicle.CurrentLocation.Heading: Current heading relative to geographic north. 0 = North, 90 = East, 180 = South, 270 = West. Unit: 'degrees' Min: '0' Max: '360'

func ToCurrentLocationLatitude0

func ToCurrentLocationLatitude0(originalDoc []byte, val string) (float64, error)

ToCurrentLocationLatitude0 converts data from field 'labels.geolocation.latitude' of type string to 'Vehicle.CurrentLocation.Latitude' of type float64. Vehicle.CurrentLocation.Latitude: Current latitude of vehicle in WGS 84 geodetic coordinates, as measured at the position of GNSS receiver antenna. Unit: 'degrees' Min: '-90' Max: '90'

func ToCurrentLocationLongitude0

func ToCurrentLocationLongitude0(originalDoc []byte, val string) (float64, error)

ToCurrentLocationLongitude0 converts data from field 'labels.geolocation.longitude' of type string to 'Vehicle.CurrentLocation.Longitude' of type float64. Vehicle.CurrentLocation.Longitude: Current longitude of vehicle in WGS 84 geodetic coordinates, as measured at the position of GNSS receiver antenna. Unit: 'degrees' Min: '-180' Max: '180'

func ToIsIgnitionOn0 added in v0.4.11

func ToIsIgnitionOn0(originalDoc []byte, val string) (float64, error)

ToIsIgnitionOn0 converts data from field 'labels.engine.ignition' of type string to 'Vehicle.IsIgnitionOn' of type float64. Vehicle.IsIgnitionOn: Vehicle ignition status. False - off, True - on.

func ToLowVoltageBatteryCurrentVoltage0

func ToLowVoltageBatteryCurrentVoltage0(originalDoc []byte, val string) (float64, error)

ToLowVoltageBatteryCurrentVoltage0 converts data from field 'labels.engine.battery.voltage.value' of type string to 'Vehicle.LowVoltageBattery.CurrentVoltage' of type float64. Vehicle.LowVoltageBattery.CurrentVoltage: Current Voltage of the low voltage battery. Unit: 'V'

func ToPowertrainCombustionEngineECT0 added in v0.4.10

func ToPowertrainCombustionEngineECT0(originalDoc []byte, val string) (float64, error)

ToPowertrainCombustionEngineECT0 converts data from field 'labels.engine.coolant.temperature.value' of type string to 'Vehicle.Powertrain.CombustionEngine.ECT' of type float64. Vehicle.Powertrain.CombustionEngine.ECT: Engine coolant temperature. Unit: 'celsius'

func ToPowertrainCombustionEngineEOP0 added in v0.4.10

func ToPowertrainCombustionEngineEOP0(originalDoc []byte, val string) (float64, error)

ToPowertrainCombustionEngineEOP0 converts data from field 'labels.engine.oil.pressure.value' of type string to 'Vehicle.Powertrain.CombustionEngine.EOP' of type float64. Vehicle.Powertrain.CombustionEngine.EOP: Engine oil pressure. Unit: 'kPa'

func ToPowertrainCombustionEngineEOT0 added in v0.4.10

func ToPowertrainCombustionEngineEOT0(originalDoc []byte, val string) (float64, error)

ToPowertrainCombustionEngineEOT0 converts data from field 'labels.engine.oil.temperature.value' of type string to 'Vehicle.Powertrain.CombustionEngine.EOT' of type float64. Vehicle.Powertrain.CombustionEngine.EOT: Engine oil temperature. Unit: 'celsius'

func ToPowertrainCombustionEngineSpeed0 added in v0.4.10

func ToPowertrainCombustionEngineSpeed0(originalDoc []byte, val string) (float64, error)

ToPowertrainCombustionEngineSpeed0 converts data from field 'labels.engine.speed.value' of type string to 'Vehicle.Powertrain.CombustionEngine.Speed' of type float64. Vehicle.Powertrain.CombustionEngine.Speed: Engine speed measured as rotations per minute. Unit: 'rpm'

func ToPowertrainFuelSystemAbsoluteLevel0

func ToPowertrainFuelSystemAbsoluteLevel0(originalDoc []byte, val string) (float64, error)

ToPowertrainFuelSystemAbsoluteLevel0 converts data from field 'labels.fuel.level.value' of type string to 'Vehicle.Powertrain.FuelSystem.AbsoluteLevel' of type float64. Vehicle.Powertrain.FuelSystem.AbsoluteLevel: Current available fuel in the fuel tank expressed in liters. Unit: 'l'

func ToPowertrainFuelSystemRelativeLevel0

func ToPowertrainFuelSystemRelativeLevel0(originalDoc []byte, val string) (float64, error)

ToPowertrainFuelSystemRelativeLevel0 converts data from field 'labels.fuel.level.percentage' of type string to 'Vehicle.Powertrain.FuelSystem.RelativeLevel' of type float64. Vehicle.Powertrain.FuelSystem.RelativeLevel: Level in fuel tank as percent of capacity. 0 = empty. 100 = full. Unit: 'percent' Min: '0' Max: '100'

func ToPowertrainTransmissionTravelledDistance0

func ToPowertrainTransmissionTravelledDistance0(originalDoc []byte, val string) (float64, error)

ToPowertrainTransmissionTravelledDistance0 converts data from field 'labels.odometer.value' of type string to 'Vehicle.Powertrain.Transmission.TravelledDistance' of type float64. Vehicle.Powertrain.Transmission.TravelledDistance: Odometer reading, total distance travelled during the lifetime of the transmission. Unit: 'km'

func ToSpeed0

func ToSpeed0(originalDoc []byte, val string) (float64, error)

ToSpeed0 converts data from field 'labels.speed.value' of type string to 'Vehicle.Speed' of type float64. Vehicle.Speed: Vehicle speed. Unit: 'km/h'

Types

type Module added in v0.5.0

type Module struct {
	ChainID             uint64         `json:"chain_id"`
	SynthContractAddr   common.Address `json:"synth_contract_addr"`
	VehicleContractAddr common.Address `json:"vehicle_contract_addr"`
}

Module is a module that converts compass messages to signals.

func (Module) CloudEventConvert added in v0.5.0

func (m Module) CloudEventConvert(_ context.Context, msgData []byte) ([]cloudevent.CloudEventHeader, []byte, error)

CloudEventConvert converts a message to cloud events.

func (*Module) FingerprintConvert added in v0.5.0

func (*Module) FingerprintConvert(_ context.Context, event cloudevent.RawEvent) (cloudevent.Fingerprint, error)

FingerprintConvert converts a message to a fingerprint.

func (*Module) SignalConvert added in v0.5.0

func (*Module) SignalConvert(_ context.Context, event cloudevent.RawEvent) ([]vss.Signal, error)

SignalConvert converts a message to signals.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL