diff --git a/model/indicators/indicators.go b/model/indicators/indicators.go index ac29553..9133a26 100644 --- a/model/indicators/indicators.go +++ b/model/indicators/indicators.go @@ -34,8 +34,10 @@ type Indicators struct { ClockSec float32 `json:"clock_sec"` RpmMin float32 `json:"rpm_min"` RpmMin1 float32 `json:"rpm1_min"` - AngleOfAttacl float32 `json:"aoa"` + GAcceleration float32 `json:"g_meter"` + AngleOfAttack float32 `json:"aoa"` SuperCharger float32 `json:"supercharger"` + PropellerPitch float32 `json:"prop_pitch"` } var path string = "indicators" diff --git a/model/state/state.go b/model/state/state.go index 68fefca..b05b826 100644 --- a/model/state/state.go +++ b/model/state/state.go @@ -36,6 +36,7 @@ type AircraftState struct { Pitch1 float32 `json:"pitch1"` Thrust1 float32 `json:"thrust1"` Efficiency1 float32 `json:"efficiency1"` + CompressorStage1 float32 `json:"compressorstage1"` // Engine 2 ThrottleEngine2 float32 `json:"throttle2"` @@ -48,6 +49,7 @@ type AircraftState struct { Pitch2 float32 `json:"pitch2"` Thrust2 float32 `json:"thrust2"` Efficiency2 float32 `json:"efficiency2"` + CompressorStage2 float32 `json:"compressorstage2"` // Engine 3 ThrottleEngine3 float32 `json:"throttle3"` @@ -60,6 +62,7 @@ type AircraftState struct { Pitch3 float32 `json:"pitch3"` Thrust3 float32 `json:"thrust3"` Efficiency3 float32 `json:"efficiency3"` + CompressorStage3 float32 `json:"compressorstage3"` // Engine 4 ThrottleEngine4 float32 `json:"throttle4"` @@ -72,6 +75,7 @@ type AircraftState struct { Pitch4 float32 `json:"pitch4"` Thrust4 float32 `json:"thrust4"` Efficiency4 float32 `json:"efficiency4"` + CompressorStage4 float32 `json:"compressorstage4"` } var path string = "state" diff --git a/telemetry/telemetry.go b/telemetry/telemetry.go index 147d3a5..d43c10a 100644 --- a/telemetry/telemetry.go +++ b/telemetry/telemetry.go @@ -3,6 +3,7 @@ package telemetry import ( "fmt" "sync" + "time" "github.com/lucasvmx/WarTelemetry/controller" "github.com/lucasvmx/WarTelemetry/logger" @@ -38,6 +39,8 @@ func Initialize(hostname string) { func getTelemetryData() { + start := time.Now() + for name, callback := range collectors { logger.LogInfo("running task go get %v data", name) wg.Add(1) @@ -45,6 +48,8 @@ func getTelemetryData() { } wg.Wait() + + logger.LogInfo("fetched data in %v", time.Since(start)) } // GetTelemetryData function retrieves all telemetry data