thrustcurves

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

README

thrustcurves

Motor thrust curve implementation that provides accurate thrust modeling for rocket motor simulation.

Notes

  • Manages motor thrust curves from standardized data files
  • Implements interpolation for precise thrust values at any time point
  • Calculates motor impulse and performance characteristics
  • Supports various motor types and configurations
  • Handles propellant mass consumption modeling during burns
  • Provides motor classification based on total impulse
  • Integrates with component system for realistic motor behavior
  • Enables custom thrust curve definition for specialized motors

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, log logf.Logger) (*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