thrustcurves

package
v0.0.0-...-57fb5ef Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadResponse

type DownloadResponse struct {
	Results []struct {
		Samples []struct {
			Time   float64 `json:"time"`
			Thrust float64 `json:"thrust"`
		} `json:"samples"`
	} `json:"results"`
}

DownloadResponse represents the response from the ThrustCurve download API

type MotorData

type MotorData struct {
	Designation  designation.Designation
	ID           string
	Thrust       [][]float64 // [[time, thrust], ...]
	TotalImpulse float64     // Newton-seconds
	BurnTime     float64     // Seconds
	AvgThrust    float64     // Newtons
	TotalMass    float64     // Kg
	WetMass      float64     // Kg
	MaxThrust    float64     // Newtons
}

MotorData represents the motor data loaded from the ThrustCurve API

func Load

func Load(designationString string, client http_client.HTTPClient) (*MotorData, error)

NOTE: Assemble motor data from the ThrustCurve API.

type SearchResponse

type SearchResponse struct {
	Results []struct {
		MotorID      string  `json:"motorId"`
		AvgThrust    float64 `json:"avgThrustN"`
		MaxThrust    float64 `json:"maxThrustN"`
		TotalImpulse float64 `json:"totImpulseNs"`
		BurnTime     float64 `json:"burnTimeS"`
		TotalMass    float64 `json:"totalWeightG"`
		WetMass      float64 `json:"propWeightG"`
	} `json:"results"`
}

SearchResponse represents the response from the ThrustCurve search API

Jump to

Keyboard shortcuts

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