Skip to content

Commit

Permalink
fix rebase for fl2sitl
Browse files Browse the repository at this point in the history
  • Loading branch information
stronnag committed Mar 28, 2024
1 parent 799f522 commit a5b8984
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions pkg/sitlgen/sitlgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

import (
// "geo"
"geo"
"options"
"types"
)
Expand Down Expand Up @@ -334,15 +334,7 @@ func (x *SitlGen) Faker() {

var sim SimData
sim.Acc_z = 1.0
/*
if geo.Frobnicate_init() {
geo.Frobnicate_set(0.0, 0.0, 0)
la, lo, alt := geo.Frobnicate_move(0.0, 0.0, 0.0)
sim.Lat = float32(la)
sim.Lon = float32(lo)
sim.Alt = float32(alt)
}
*/

// sim data to SITL
simchan := make(chan SimData, 1)
// socket addr, socket is open
Expand All @@ -354,6 +346,13 @@ func (x *SitlGen) Faker() {
cc := make(chan os.Signal, 1)
signal.Notify(cc, os.Interrupt, syscall.SIGINT, syscall.SIGTERM)

fb := geo.Frobnicate_init()
if fb != nil {
la, lo, alt := fb.Get_rebase()
sim.Lat = float32(la)
sim.Lon = float32(lo)
sim.Alt = float32(alt)
}
for done := false; done == false; {
select {
case addr := <-addrchan:
Expand Down

0 comments on commit a5b8984

Please sign in to comment.