models

package
v0.0.0-...-8dae094 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Round

func Round(val float64, roundOn float64, places int) (newVal float64)

Types

type AnalogData

type AnalogData struct {
	Percentage    float64 `json:"percentage"`
	Capacity      float64 `json:"capacity"`
	WeightCurrent float64 `json:"weight"`
	VolumeCurrent float64 `json:"volume"`
}

type SiloData

type SiloData struct {
	Distance    float64 `json:"distance"`
	Temperature float64 `json:"temperature"`
	Humidity    float64 `json:"humidity"`
}

type SiloMeasureResponse

type SiloMeasureResponse struct {
	SiloCapacityM3            float64 `json:"silo_capacity_m3"`
	SiloCapacityKg            float64 `json:"silo_capacity_kg"`
	ContentDistanceFromSensor float64 `json:"content_distance_from_sensor"`
	ContentLevelCm            float64 `json:"content_level_cm"`
	ContentVolumeM3           float64 `json:"content_volume_m3"`
	ContentPerc               float64 `json:"content_perc"`
	ContentWeightKg           float64 `json:"content_weight_kg"`
}

type SiloMeasureSimpleRequest

type SiloMeasureSimpleRequest struct {
	Distancia            float64 `json:"distancia"`
	SiloHeightCm         int     `json:"silo_height_cm"`
	SiloDiameterCm       int     `json:"silo_diameter_cm"`
	SiloHeightConeCm     int     `json:"silo_height_cone_cm"`
	SiloOffsetDistanceCm int     `json:"silo_offset_distance_cm"` // Distance from sensor to cylinder
	ContentDensityKgm3   float64 `json:"content_density_kgm3"`
}

User represents the structure of our resource

func (*SiloMeasureSimpleRequest) EvalDistance

func (req *SiloMeasureSimpleRequest) EvalDistance() (response SiloMeasureResponse)

type WebsocketData

type WebsocketData struct {
	Timestamp int64      `json:"timestamp"`
	Analog    AnalogData `json:"analog"`
}

Jump to

Keyboard shortcuts

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