openrocket

package
v0.0.0-...-1110b8b Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 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 AxialOffset

type AxialOffset struct {
	XMLName xml.Name `xml:"axialoffset"`
	Method  string   `xml:"method,attr"`
	Value   float64  `xml:",chardata"`
}

AxialOffset represents the axial offset element of the XML document

func (*AxialOffset) String

func (a *AxialOffset) String() string

String returns full string representation of the AxialOffset

type MotorConfiguration

type MotorConfiguration struct {
	XMLName  xml.Name `xml:"motorconfiguration"`
	ConfigID string   `xml:"configid,attr"`
	Default  bool     `xml:"default,attr"`
	Stages   []Stage  `xml:"stage"`
}

MotorConfiguration represents the motor configuration element of the XML document

func (*MotorConfiguration) String

func (m *MotorConfiguration) String() string

String returns full string representation of the MotorConfiguration

type OpenrocketDocument

type OpenrocketDocument struct {
	XMLName xml.Name       `xml:"openrocket"`
	Version string         `xml:"version,attr"`
	Creator string         `xml:"creator,attr"`
	Rocket  RocketDocument `xml:"rocket"`
}

OpenrocketDocument represents the root of the XML document

func Load

func Load(filename string, version string) (*OpenrocketDocument, error)

func (*OpenrocketDocument) Describe

func (o *OpenrocketDocument) Describe() string

Describe returns a string representation of the OpenrocketDocument

func (*OpenrocketDocument) String

func (o *OpenrocketDocument) String() string

String returns full string representation of the OpenrocketDocument

type Position

type Position struct {
	XMLName xml.Name `xml:"position"`
	Value   float64  `xml:",chardata"`
	Type    string   `xml:"type,attr"`
}

Position represents the position element of the XML document

func (*Position) String

func (p *Position) String() string

String returns full string representation of the Position

type RocketDocument

type RocketDocument struct {
	XMLName            xml.Name           `xml:"rocket"`
	Name               string             `xml:"name"`
	ID                 string             `xml:"id"`
	AxialOffset        AxialOffset        `xml:"axialoffset"`
	Position           Position           `xml:"position"`
	Designer           string             `xml:"designer"`
	Revision           string             `xml:"revision"`
	MotorConfiguration MotorConfiguration `xml:"motorconfiguration"`
	ReferenceType      string             `xml:"referencetype"`
}

RocketDocument represents the rocket element of the XML document

func (*RocketDocument) String

func (r *RocketDocument) String() string

String returns full string representation of the RocketDocument

type Stage

type Stage struct {
	XMLName xml.Name `xml:"stage"`
	Number  int      `xml:"number,attr"`
	Active  bool     `xml:"active,attr"`
}

Stage represents motor configuration stages

func (*Stage) String

func (s *Stage) String() string

String returns full string representation of the Stage

Jump to

Keyboard shortcuts

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