feat: initial commit

This commit is contained in:
2024-07-30 14:28:39 +02:00
commit 4729c54076
39 changed files with 3850 additions and 0 deletions

View File

@ -0,0 +1,49 @@
package protocol
type SetBaseOptions struct {
Mode *string
AntennaOffset *float64
Latitude *float64
Longitude *float64
Height *float64
}
type SetBaseOptionFunc func(opts *SetBaseOptions)
func NewSetBaseOptions(funcs ...SetBaseOptionFunc) *SetBaseOptions {
opts := &SetBaseOptions{}
for _, fn := range funcs {
fn(opts)
}
return opts
}
func WithBaseMode(value string) SetBaseOptionFunc {
return func(opts *SetBaseOptions) {
opts.Mode = &value
}
}
func WithBaseAntennaOffset(value float64) SetBaseOptionFunc {
return func(opts *SetBaseOptions) {
opts.AntennaOffset = &value
}
}
func WithBaseLatitude(value float64) SetBaseOptionFunc {
return func(opts *SetBaseOptions) {
opts.Latitude = &value
}
}
func WithBaseLongitude(value float64) SetBaseOptionFunc {
return func(opts *SetBaseOptions) {
opts.Longitude = &value
}
}
func WithBaseHeight(value float64) SetBaseOptionFunc {
return func(opts *SetBaseOptions) {
opts.Height = &value
}
}