ground-dashboard/ground/tool/charts/util.go
2022-12-05 22:25:36 +00:00

12 lines
314 B
Go

package charts
import "github.com/johnjones4/model-rocket-telemetry/dashboard/core"
func singleFlightDataElement(fd []core.DataSegment, accessor func(core.DataSegment) float64) []float64 {
data := make([]float64, len(fd))
for i, segment := range fd {
data[i] = accessor(segment)
}
return data
}