soc

package
v0.0.0-...-0c7050d Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ChargeEfficiency = 0.9 // assume charge 90% efficiency

Variables

This section is empty.

Functions

This section is empty.

Types

type Estimator

type Estimator struct {
	// contains filtered or unexported fields
}

Estimator provides vehicle soc and charge duration Vehicle Soc can be estimated to provide more granularity

func NewEstimator

func NewEstimator(log *util.Logger, charger api.Charger, vehicle api.Vehicle, estimate bool) *Estimator

NewEstimator creates new estimator

func (*Estimator) RemainingChargeDuration

func (s *Estimator) RemainingChargeDuration(targetSoc int, chargePower float64) time.Duration

RemainingChargeDuration returns the estimated remaining duration

func (*Estimator) RemainingChargeEnergy

func (s *Estimator) RemainingChargeEnergy(targetSoc int) float64

RemainingChargeEnergy returns the remaining charge energy in kWh

func (*Estimator) Reset

func (s *Estimator) Reset()

Reset resets the estimation process to default values

func (*Estimator) Soc

func (s *Estimator) Soc(chargedEnergy float64) (float64, error)

Soc replaces the api.Vehicle.Soc interface to take charged energy into account

Jump to

Keyboard shortcuts

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