ground

package
v0.0.0-...-edb31bc Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GPSRocketReceiver

type GPSRocketReceiver struct {
	RocketInfo   *core.RocketInfo
	LastReceived time.Time
	GPS          nmea.GGA // Local GPS info
	// contains filtered or unexported fields
}

GPS Rocket Receiver is for rockets that only output GPS data over the wireless serial link

func (*GPSRocketReceiver) GetLastReceived

func (recv *GPSRocketReceiver) GetLastReceived() time.Time

func (*GPSRocketReceiver) GetLocalGPS

func (recv *GPSRocketReceiver) GetLocalGPS() nmea.GGA

func (*GPSRocketReceiver) GetRocketInfo

func (recv *GPSRocketReceiver) GetRocketInfo() core.RocketInfo

func (*GPSRocketReceiver) RocketReceiverLoop

func (recv *GPSRocketReceiver) RocketReceiverLoop() (err error)

func (*GPSRocketReceiver) SendLaunchMode

func (recv *GPSRocketReceiver) SendLaunchMode()

func (*GPSRocketReceiver) UpdateGPS

func (recv *GPSRocketReceiver) UpdateGPS(gpsInfo nmea.GGA)

type GoRocketReceiver

type GoRocketReceiver struct {
	RocketInfo   *core.RocketInfo
	LastReceived time.Time
	GPS          nmea.GGA
	// contains filtered or unexported fields
}

func (*GoRocketReceiver) GetLastReceived

func (recv *GoRocketReceiver) GetLastReceived() time.Time

func (*GoRocketReceiver) GetLocalGPS

func (recv *GoRocketReceiver) GetLocalGPS() nmea.GGA

func (*GoRocketReceiver) GetRocketInfo

func (recv *GoRocketReceiver) GetRocketInfo() core.RocketInfo

func (*GoRocketReceiver) RocketReceiverLoop

func (recv *GoRocketReceiver) RocketReceiverLoop() (err error)

func (*GoRocketReceiver) SendLaunchMode

func (recv *GoRocketReceiver) SendLaunchMode()

func (*GoRocketReceiver) UpdateGPS

func (recv *GoRocketReceiver) UpdateGPS(gpsInfo nmea.GGA)

type GroundHTTPServer

type GroundHTTPServer struct {
	// contains filtered or unexported fields
}

func NewGroundHTTPServer

func NewGroundHTTPServer(httpRoot string, httpPort int, receiver RocketReceiver) *GroundHTTPServer

NewGroundHTTPServer creates and run the HTTP server. It does not return unless the HTTP server has an error

func (*GroundHTTPServer) Serve

func (recv *GroundHTTPServer) Serve() error

Starts the HTTP server - will not return unless there is a major error

func (*GroundHTTPServer) UpdateGPSLoop

func (recv *GroundHTTPServer) UpdateGPSLoop()

type RocketReceiver

type RocketReceiver interface {
	RocketReceiverLoop() (err error)
	SendLaunchMode()
	UpdateGPS(gpsInfo nmea.GGA)
	GetLocalGPS() nmea.GGA
	GetRocketInfo() core.RocketInfo
	GetLastReceived() time.Time
}

func InitGPSRocketReceiver

func InitGPSRocketReceiver(rocketInfo *core.RocketInfo, port string, baudRate uint, dataBits uint, stopBits uint) (RocketReceiver, error)

func InitGoRocketReceiver

func InitGoRocketReceiver(rocketInfo *core.RocketInfo, port string, baudRate uint, dataBits uint, stopBits uint) (RocketReceiver, error)

Jump to

Keyboard shortcuts

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