mirror of
https://codeberg.org/portospaceteam/ground-dashboard.git
synced 2024-11-28 17:56:59 +00:00
12 lines
314 B
Go
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
|
|
}
|