first synchronizer implementation

This commit is contained in:
Timo Volkmann 2020-12-07 15:10:28 +01:00
parent eae4bc2e67
commit a55dce3820
4 changed files with 936 additions and 25 deletions

View File

@ -15,7 +15,7 @@ func main() {
log.Println("setup dispatcher")
dispatcher := core.NewDispatcher()
log.Println("initialize processing pipeline")
processor := core.NewPipeline(dispatcher, 50, 1000)
processor := core.NewPipeline(dispatcher, 50, 494)
processor.Run()
collectRoutines(processor)
log.Println("start http server")

View File

@ -5,6 +5,7 @@ import (
"git.timovolkmann.de/gyrogpsc/ublox"
"github.com/tidwall/gjson"
"log"
"math"
"time"
"github.com/m7shapan/njson"
@ -71,6 +72,23 @@ func (s Sensordata) Consolidate(n Sensordata) Sensordata {
return n
}
func (s Sensordata) Consolidate2(n Sensordata) Sensordata {
null := Sensordata{}
//if s.Timestamp == null.Timestamp { s.Timestamp = n.Timestamp }
//if s.Position == null.Position { s.Position = n.Position }
//if s.Orientation == null.Orientation { s.Orientation = n.Orientation }
//if n.Timestamp == null.Timestamp {
// n.Timestamp = s.Timestamp
//}
if n.Position == null.Position {
n.Position = s.Position
}
if n.Orientation == null.Orientation{
n.Orientation = s.Orientation
}
return n
}
var (
errNotImplemented = errors.New("message not implemented")
errRawMessage = errors.New("raw message")
@ -98,9 +116,9 @@ func ConvertUbxToSensorData(msg interface{}) (*Sensordata, error) {
case *ublox.NavAtt:
//log.Println("NAV-ATT")
sd.itow = v.ITOW_ms
sd.Orientation[0] = float64(v.Pitch_deg)
sd.Orientation[1] = float64(v.Roll_deg)
sd.Orientation[2] = float64(v.Heading_deg)
sd.Orientation[0] = float64(v.Pitch_deg) * 1e-5
sd.Orientation[1] = float64(v.Roll_deg) * 1e-5
sd.Orientation[2] = float64(v.Heading_deg) * 1e-5
case *ublox.RawMessage:
//class := make([]byte, 2)
//binary.LittleEndian.PutUint16(class, v.ClassID())
@ -124,13 +142,18 @@ func convertIPhoneSensorLog(jsonData []byte) (*Sensordata, error) {
lat := gjson.Get(string(jsonData), "locationLatitude").Float()
lon := gjson.Get(string(jsonData), "locationLongitude").Float()
alt := gjson.Get(string(jsonData), "locationAltitude").Float()
pitch := gjson.Get(string(jsonData), "motionPitch").Float() * 180 / math.Pi
roll := gjson.Get(string(jsonData), "motionRoll").Float() * 180 / math.Pi
yaw := gjson.Get(string(jsonData), "motionYaw").Float() * 180 / math.Pi
sd := &Sensordata{
SourceId: SOURCE_TCP,
Timestamp: int64(timestamp * float64(time.Second)),
//Timestamp: time.Unix(0, prep.Timestamp * int64(time.Millisecond)),
Position: [3]float64{lat, lon, alt},
Orientation: [3]float64{0, 0, 0},
Orientation: [3]float64{pitch, roll, yaw},
}
//log.Println(string(pretty.Pretty(jsonData)))
//log.Println(sd)
return sd, nil
}

View File

@ -3,6 +3,7 @@ package core
import (
"encoding/json"
"errors"
"fmt"
"log"
"sync"
"time"
@ -24,7 +25,7 @@ type pipeline struct {
func NewPipeline(d Publisher, publishIntervalMs int, delayUpdateIntervalMs int) *pipeline {
return &pipeline{
synchronizer{
bufferSize: 100,
//bufferSize: 100,
mutex: &sync.Mutex{},
updateTicker: time.NewTicker(time.Duration(delayUpdateIntervalMs) * time.Millisecond),
},
@ -38,7 +39,7 @@ func NewPipeline(d Publisher, publishIntervalMs int, delayUpdateIntervalMs int)
}
func (p *pipeline) Run() {
go p.syn.schedule()
go p.scheduleSynchronizer()
go func() {
for {
<-p.publishTicker.C
@ -65,8 +66,8 @@ func (p *pipeline) Publish() error {
string(SOURCE_TCP): p.agr.tcpSensorData,
string(SOURCE_SERIAL): p.agr.serialSensorData,
}
p.agr.tcpSensorData = Sensordata{}
p.agr.serialSensorData = Sensordata{}
//p.agr.tcpSensorData = Sensordata{}
//p.agr.serialSensorData = Sensordata{}
p.agr.tcpMutex.Unlock()
p.agr.serialMutex.Unlock()
@ -89,13 +90,12 @@ type aggregator struct {
type UnixNanoTime int64
type synchronizer struct {
tcpDelayMs int
serialDelayMs int
tcpBuffer map[UnixNanoTime]Sensordata
serialBuffer map[UnixNanoTime]Sensordata
bufferSize int
mutex *sync.Mutex
updateTicker *time.Ticker
tcpSerialDelayMs int64
//tcpBuffer map[UnixNanoTime]Sensordata
//serialBuffer map[UnixNanoTime]Sensordata
//bufferSize int
mutex *sync.Mutex
updateTicker *time.Ticker
// should run concurrently
//
// Methods:
@ -104,19 +104,34 @@ type synchronizer struct {
// Schedule()
}
func (s *synchronizer) schedule() {
func (p *pipeline) scheduleSynchronizer() {
log.Println("synchronizer: started")
for {
<-s.updateTicker.C
err := s.refreshDelay()
<-p.syn.updateTicker.C
err := p.refreshDelay()
if err != nil {
log.Println(err)
}
}
}
func (s *synchronizer) refreshDelay() error {
// TODO: implement
func (p *pipeline) refreshDelay() error {
log.Println("refreshing delay....")
fmt.Println("Delay TCP/SERIAL", p.syn.tcpSerialDelayMs)
p.agr.serialMutex.Lock()
p.agr.tcpMutex.Lock()
tcpTime := time.Unix(0, p.agr.tcpSensorData.Timestamp)
serTime := time.Unix(0, p.agr.serialSensorData.Timestamp)
p.agr.serialMutex.Unlock()
p.agr.tcpMutex.Unlock()
if tcpTime.UnixNano() == 0 || serTime.UnixNano() == 0 {
return errors.New("no sync possible. no data to compare")
}
log.Println("TCP", tcpTime.String())
log.Println("SER", serTime.String())
log.Println("Difference", tcpTime.Sub(serTime).Milliseconds())
delay := tcpTime.Sub(serTime).Milliseconds()
p.syn.tcpSerialDelayMs += delay
return nil
}
@ -137,14 +152,18 @@ func (p *pipeline) Process(data *Sensordata) error {
}
func (p *pipeline) pushTcpDataToBuffer(data Sensordata) {
time.Sleep(time.Duration(p.syn.tcpDelayMs))
if p.syn.tcpSerialDelayMs > 0 {
time.Sleep(time.Duration(p.syn.tcpSerialDelayMs) * time.Millisecond)
}
p.agr.tcpMutex.Lock()
p.agr.tcpSensorData = data
p.agr.tcpSensorData = p.agr.tcpSensorData.Consolidate2(data)
p.agr.tcpMutex.Unlock()
}
func (p *pipeline) pushSerialDataToBuffer(data Sensordata) {
time.Sleep(time.Duration(p.syn.serialDelayMs))
if p.syn.tcpSerialDelayMs < 0 {
time.Sleep(time.Duration(-p.syn.tcpSerialDelayMs) * time.Millisecond)
}
p.agr.serialMutex.Lock()
p.agr.serialSensorData = p.agr.serialSensorData.Consolidate(data)
p.agr.serialSensorData = p.agr.serialSensorData.Consolidate2(data)
p.agr.serialMutex.Unlock()
}

869
static/iphone.json Normal file
View File

@ -0,0 +1,869 @@
[
{
"accelerometerAccelerationX" : "0.037598",
"accelerometerAccelerationY" : "-0.007950",
"accelerometerAccelerationZ" : "-1.003952",
"accelerometerTimestamp_sinceReboot" : "77700.804899",
"avAudioRecorderAveragePower" : "-34.990307",
"avAudioRecorderPeakPower" : "-30.574509",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"gyroRotationX" : "0.008506",
"gyroRotationY" : "-0.076335",
"gyroRotationZ" : "0.000154",
"gyroTimestamp_sinceReboot" : "77700.794635",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876174",
"locationHeadingTimestamp_since1970" : "1607291137.949005",
"locationHeadingX" : "-36.616150",
"locationHeadingY" : "-2.895218",
"locationHeadingZ" : "-25.625000",
"locationMagneticHeading" : "85.920738",
"locationTrueHeading" : "89.001564",
"loggingTime" : "2020-12-06 22:45:37.964 +0100",
"logSampleNr" : "765",
"magnetometerTimestamp_sinceReboot" : "77700.802641",
"magnetometerX" : "187.223969",
"magnetometerY" : "188.439392",
"magnetometerZ" : "-710.010864"
},
{
"accelerometerAccelerationX" : "0.036438",
"accelerometerAccelerationY" : "-0.008789",
"accelerometerAccelerationZ" : "-1.003464",
"accelerometerTimestamp_sinceReboot" : "77700.821012",
"avAudioRecorderAveragePower" : "-35.768673",
"avAudioRecorderPeakPower" : "-30.574509",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876176",
"locationHeadingTimestamp_since1970" : "1607291137.968956",
"locationHeadingX" : "-36.500809",
"locationHeadingY" : "-2.983276",
"locationHeadingZ" : "-25.554626",
"locationMagneticHeading" : "85.920799",
"locationTrueHeading" : "89.001625",
"loggingTime" : "2020-12-06 22:45:37.989 +0100",
"logSampleNr" : "766",
"motionAttitudeReferenceFrame" : "XTrueNorthZVertical",
"motionGravityX" : "0.034999",
"motionGravityY" : "-0.009051",
"motionGravityZ" : "-0.999346",
"motionMagneticFieldCalibrationAccuracy" : "2.000000",
"motionMagneticFieldX" : "-36.500809",
"motionMagneticFieldY" : "-2.983276",
"motionMagneticFieldZ" : "-25.554626",
"motionPitch" : "0.009051",
"motionQuaternionW" : "-0.008792",
"motionQuaternionX" : "-0.017541",
"motionQuaternionY" : "0.004372",
"motionQuaternionZ" : "0.999798",
"motionRoll" : "0.035007",
"motionRotationRateX" : "0.002088",
"motionRotationRateY" : "-0.004357",
"motionRotationRateZ" : "-0.000906",
"motionTimestamp_sinceReboot" : "77700.804614",
"motionUserAccelerationX" : "0.002599",
"motionUserAccelerationY" : "0.001101",
"motionUserAccelerationZ" : "-0.004606",
"motionYaw" : "-3.124165"
},
{
"accelerometerAccelerationX" : "0.033234",
"accelerometerAccelerationY" : "-0.008926",
"accelerometerAccelerationZ" : "-1.002014",
"accelerometerTimestamp_sinceReboot" : "77700.837125",
"avAudioRecorderAveragePower" : "-35.768673",
"avAudioRecorderPeakPower" : "-30.574509",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"gyroRotationX" : "0.008186",
"gyroRotationY" : "-0.076672",
"gyroRotationZ" : "0.000862",
"gyroTimestamp_sinceReboot" : "77700.824603",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876178",
"locationHeadingTimestamp_since1970" : "1607291137.989421",
"locationHeadingX" : "-36.537552",
"locationHeadingY" : "-2.889069",
"locationHeadingZ" : "-25.606628",
"locationMagneticHeading" : "85.920822",
"locationTrueHeading" : "89.001648",
"loggingTime" : "2020-12-06 22:45:37.996 +0100",
"logSampleNr" : "767"
},
{
"accelerometerAccelerationX" : "0.034439",
"accelerometerAccelerationY" : "-0.009415",
"accelerometerAccelerationZ" : "-1.006668",
"accelerometerTimestamp_sinceReboot" : "77700.853239",
"avAudioRecorderAveragePower" : "-31.989109",
"avAudioRecorderPeakPower" : "-30.574509",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876178",
"locationHeadingTimestamp_since1970" : "1607291138.008792",
"locationHeadingX" : "-36.428513",
"locationHeadingY" : "-2.911438",
"locationHeadingZ" : "-25.462769",
"locationMagneticHeading" : "85.921715",
"locationTrueHeading" : "89.002541",
"loggingTime" : "2020-12-06 22:45:38.012 +0100",
"logSampleNr" : "768",
"motionAttitudeReferenceFrame" : "XTrueNorthZVertical",
"motionGravityX" : "0.034996",
"motionGravityY" : "-0.009039",
"motionGravityZ" : "-0.999347",
"motionMagneticFieldCalibrationAccuracy" : "2.000000",
"motionMagneticFieldX" : "-36.537552",
"motionMagneticFieldY" : "-2.889069",
"motionMagneticFieldZ" : "-25.606628",
"motionPitch" : "0.009039",
"motionQuaternionW" : "-0.008788",
"motionQuaternionX" : "-0.017540",
"motionQuaternionY" : "0.004366",
"motionQuaternionZ" : "0.999798",
"motionRoll" : "0.035005",
"motionRotationRateX" : "0.000459",
"motionRotationRateY" : "-0.000712",
"motionRotationRateZ" : "-0.001314",
"motionTimestamp_sinceReboot" : "77700.834613",
"motionUserAccelerationX" : "-0.000923",
"motionUserAccelerationY" : "0.000250",
"motionUserAccelerationZ" : "-0.003110",
"motionYaw" : "-3.124172"
},
{
"accelerometerAccelerationX" : "0.035385",
"accelerometerAccelerationY" : "-0.012100",
"accelerometerAccelerationZ" : "-1.011292",
"accelerometerTimestamp_sinceReboot" : "77700.869321",
"avAudioRecorderAveragePower" : "-31.288141",
"avAudioRecorderPeakPower" : "-30.269579",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"gyroRotationX" : "0.010996",
"gyroRotationY" : "-0.081939",
"gyroRotationZ" : "0.002051",
"gyroTimestamp_sinceReboot" : "77700.854571",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"loggingTime" : "2020-12-06 22:45:38.029 +0100",
"logSampleNr" : "769",
"magnetometerTimestamp_sinceReboot" : "77700.860777",
"magnetometerX" : "187.028076",
"magnetometerY" : "188.409332",
"magnetometerZ" : "-709.159546"
},
{
"accelerometerAccelerationX" : "0.035950",
"accelerometerAccelerationY" : "-0.011780",
"accelerometerAccelerationZ" : "-1.006134",
"accelerometerTimestamp_sinceReboot" : "77700.885435",
"avAudioRecorderAveragePower" : "-32.153595",
"avAudioRecorderPeakPower" : "-29.939217",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876180",
"locationHeadingTimestamp_since1970" : "1607291138.029312",
"locationHeadingX" : "-36.654816",
"locationHeadingY" : "-3.019150",
"locationHeadingZ" : "-24.858765",
"locationMagneticHeading" : "85.921791",
"locationTrueHeading" : "89.002617",
"loggingTime" : "2020-12-06 22:45:38.047 +0100",
"logSampleNr" : "770",
"motionAttitudeReferenceFrame" : "XTrueNorthZVertical",
"motionGravityX" : "0.034864",
"motionGravityY" : "-0.009091",
"motionGravityZ" : "-0.999351",
"motionMagneticFieldCalibrationAccuracy" : "2.000000",
"motionMagneticFieldX" : "-36.654816",
"motionMagneticFieldY" : "-3.019150",
"motionMagneticFieldZ" : "-24.858765",
"motionPitch" : "0.009091",
"motionQuaternionW" : "-0.008783",
"motionQuaternionX" : "-0.017474",
"motionQuaternionY" : "0.004393",
"motionQuaternionZ" : "0.999799",
"motionRoll" : "0.034872",
"motionRotationRateX" : "0.000922",
"motionRotationRateY" : "-0.000872",
"motionRotationRateZ" : "-0.000288",
"motionTimestamp_sinceReboot" : "77700.864581",
"motionUserAccelerationX" : "0.001284",
"motionUserAccelerationY" : "-0.001514",
"motionUserAccelerationZ" : "-0.011895",
"motionYaw" : "-3.124182"
},
{
"accelerometerAccelerationX" : "0.035431",
"accelerometerAccelerationY" : "-0.008698",
"accelerometerAccelerationZ" : "-1.001877",
"accelerometerTimestamp_sinceReboot" : "77700.901548",
"avAudioRecorderAveragePower" : "-32.153595",
"avAudioRecorderPeakPower" : "-29.939217",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"gyroRotationX" : "0.005874",
"gyroRotationY" : "-0.076437",
"gyroRotationZ" : "0.000249",
"gyroTimestamp_sinceReboot" : "77700.884570",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationAltitude" : "187.182343",
"locationCourse" : "-1.000000",
"locationFloor" : "-9999",
"locationHeadingAccuracy" : "14.876182",
"locationHeadingTimestamp_since1970" : "1607291138.049074",
"locationHeadingX" : "-36.686508",
"locationHeadingY" : "-3.035675",
"locationHeadingZ" : "-24.890198",
"locationHorizontalAccuracy" : "30.000000",
"locationLatitude" : "49.066370",
"locationLongitude" : "9.135756",
"locationMagneticHeading" : "85.922256",
"locationSpeed" : "0.000000",
"locationTimestamp_since1970" : "1607291137.995236",
"locationTrueHeading" : "89.003082",
"locationVerticalAccuracy" : "4.000000",
"loggingTime" : "2020-12-06 22:45:38.061 +0100",
"logSampleNr" : "771",
"motionAttitudeReferenceFrame" : "XTrueNorthZVertical",
"motionGravityX" : "0.034944",
"motionGravityY" : "-0.009061",
"motionGravityZ" : "-0.999348",
"motionMagneticFieldCalibrationAccuracy" : "2.000000",
"motionMagneticFieldX" : "-36.686508",
"motionMagneticFieldY" : "-3.035675",
"motionMagneticFieldZ" : "-24.890198",
"motionPitch" : "0.009061",
"motionQuaternionW" : "-0.008780",
"motionQuaternionX" : "-0.017514",
"motionQuaternionY" : "0.004377",
"motionQuaternionZ" : "0.999799",
"motionRoll" : "0.034952",
"motionRotationRateX" : "-0.001064",
"motionRotationRateY" : "-0.001599",
"motionRotationRateZ" : "0.000173",
"motionTimestamp_sinceReboot" : "77700.894549",
"motionUserAccelerationX" : "-0.000566",
"motionUserAccelerationY" : "-0.000552",
"motionUserAccelerationZ" : "-0.007701",
"motionYaw" : "-3.124187"
},
{
"accelerometerAccelerationX" : "0.033325",
"accelerometerAccelerationY" : "-0.009155",
"accelerometerAccelerationZ" : "-1.004761",
"accelerometerTimestamp_sinceReboot" : "77700.917661",
"avAudioRecorderAveragePower" : "-32.501255",
"avAudioRecorderPeakPower" : "-29.852339",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876183",
"locationHeadingTimestamp_since1970" : "1607291138.068919",
"locationHeadingX" : "-36.387695",
"locationHeadingY" : "-2.955109",
"locationHeadingZ" : "-25.351074",
"locationMagneticHeading" : "85.922218",
"locationTrueHeading" : "89.003044",
"loggingTime" : "2020-12-06 22:45:38.077 +0100",
"logSampleNr" : "772"
},
{
"accelerometerAccelerationX" : "0.035431",
"accelerometerAccelerationY" : "-0.008286",
"accelerometerAccelerationZ" : "-1.005096",
"accelerometerTimestamp_sinceReboot" : "77700.933775",
"avAudioRecorderAveragePower" : "-33.457474",
"avAudioRecorderPeakPower" : "-29.852339",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"gyroRotationX" : "0.004643",
"gyroRotationY" : "-0.075107",
"gyroRotationZ" : "0.001784",
"gyroTimestamp_sinceReboot" : "77700.914538",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876183",
"locationHeadingTimestamp_since1970" : "1607291138.088690",
"locationHeadingX" : "-36.463043",
"locationHeadingY" : "-2.722488",
"locationHeadingZ" : "-25.380981",
"locationMagneticHeading" : "85.921844",
"locationTrueHeading" : "89.002670",
"loggingTime" : "2020-12-06 22:45:38.094 +0100",
"logSampleNr" : "773",
"magnetometerTimestamp_sinceReboot" : "77700.918913",
"magnetometerX" : "187.101776",
"magnetometerY" : "188.768005",
"magnetometerZ" : "-709.771484",
"motionAttitudeReferenceFrame" : "XTrueNorthZVertical",
"motionGravityX" : "0.034961",
"motionGravityY" : "-0.009001",
"motionGravityZ" : "-0.999348",
"motionMagneticFieldCalibrationAccuracy" : "2.000000",
"motionMagneticFieldX" : "-36.463043",
"motionMagneticFieldY" : "-2.722488",
"motionMagneticFieldZ" : "-25.380981",
"motionPitch" : "0.009001",
"motionQuaternionW" : "-0.008782",
"motionQuaternionX" : "-0.017522",
"motionQuaternionY" : "0.004348",
"motionQuaternionZ" : "0.999798",
"motionRoll" : "0.034970",
"motionRotationRateX" : "-0.003020",
"motionRotationRateY" : "0.004743",
"motionRotationRateZ" : "0.000997",
"motionTimestamp_sinceReboot" : "77700.924548",
"motionUserAccelerationX" : "0.001217",
"motionUserAccelerationY" : "-0.000520",
"motionUserAccelerationZ" : "-0.003139",
"motionYaw" : "-3.124183"
},
{
"accelerometerAccelerationX" : "0.035904",
"accelerometerAccelerationY" : "-0.009094",
"accelerometerAccelerationZ" : "-1.001312",
"accelerometerTimestamp_sinceReboot" : "77700.949857",
"avAudioRecorderAveragePower" : "-33.457474",
"avAudioRecorderPeakPower" : "-29.852339",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"gyroRotationX" : "0.006907",
"gyroRotationY" : "-0.079628",
"gyroRotationZ" : "0.000950",
"gyroTimestamp_sinceReboot" : "77700.944507",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"loggingTime" : "2020-12-06 22:45:38.109 +0100",
"logSampleNr" : "774"
},
{
"accelerometerAccelerationX" : "0.036209",
"accelerometerAccelerationY" : "-0.010406",
"accelerometerAccelerationZ" : "-1.005539",
"accelerometerTimestamp_sinceReboot" : "77700.965971",
"avAudioRecorderAveragePower" : "-33.588783",
"avAudioRecorderPeakPower" : "-29.852339",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876184",
"locationHeadingTimestamp_since1970" : "1607291138.108779",
"locationHeadingX" : "-36.467972",
"locationHeadingY" : "-2.907425",
"locationHeadingZ" : "-25.277100",
"locationMagneticHeading" : "85.922852",
"locationTrueHeading" : "89.003677",
"loggingTime" : "2020-12-06 22:45:38.125 +0100",
"logSampleNr" : "775",
"motionAttitudeReferenceFrame" : "XTrueNorthZVertical",
"motionGravityX" : "0.034963",
"motionGravityY" : "-0.009011",
"motionGravityZ" : "-0.999348",
"motionMagneticFieldCalibrationAccuracy" : "2.000000",
"motionMagneticFieldX" : "-36.392593",
"motionMagneticFieldY" : "-3.084808",
"motionMagneticFieldZ" : "-25.575867",
"motionPitch" : "0.009012",
"motionQuaternionW" : "-0.008775",
"motionQuaternionX" : "-0.017523",
"motionQuaternionY" : "0.004353",
"motionQuaternionZ" : "0.999799",
"motionRoll" : "0.034972",
"motionRotationRateX" : "-0.000240",
"motionRotationRateY" : "-0.000722",
"motionRotationRateZ" : "0.001070",
"motionTimestamp_sinceReboot" : "77700.954516",
"motionUserAccelerationX" : "0.000376",
"motionUserAccelerationY" : "-0.001273",
"motionUserAccelerationZ" : "-0.004177",
"motionYaw" : "-3.124197"
},
{
"accelerometerAccelerationX" : "0.037720",
"accelerometerAccelerationY" : "-0.010132",
"accelerometerAccelerationZ" : "-1.008987",
"accelerometerTimestamp_sinceReboot" : "77700.982084",
"avAudioRecorderAveragePower" : "-34.231152",
"avAudioRecorderPeakPower" : "-29.852339",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"gyroRotationX" : "0.004129",
"gyroRotationY" : "-0.077557",
"gyroRotationZ" : "-0.000793",
"gyroTimestamp_sinceReboot" : "77700.974505",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876186",
"locationHeadingTimestamp_since1970" : "1607291138.128763",
"locationHeadingX" : "-36.392593",
"locationHeadingY" : "-3.084808",
"locationHeadingZ" : "-25.575867",
"locationMagneticHeading" : "85.922737",
"locationTrueHeading" : "89.003563",
"loggingTime" : "2020-12-06 22:45:38.141 +0100",
"logSampleNr" : "776",
"magnetometerTimestamp_sinceReboot" : "77700.977079",
"magnetometerX" : "186.895142",
"magnetometerY" : "188.252991",
"magnetometerZ" : "-710.194702"
},
{
"accelerometerAccelerationX" : "0.036057",
"accelerometerAccelerationY" : "-0.008194",
"accelerometerAccelerationZ" : "-1.002792",
"accelerometerTimestamp_sinceReboot" : "77700.998197",
"avAudioRecorderAveragePower" : "-34.738995",
"avAudioRecorderPeakPower" : "-29.852339",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876188",
"locationHeadingTimestamp_since1970" : "1607291138.148931",
"locationHeadingX" : "-36.706497",
"locationHeadingY" : "-3.118759",
"locationHeadingZ" : "-25.621033",
"locationMagneticHeading" : "85.923042",
"locationTrueHeading" : "89.003868",
"loggingTime" : "2020-12-06 22:45:38.168 +0100",
"logSampleNr" : "777",
"motionAttitudeReferenceFrame" : "XTrueNorthZVertical",
"motionGravityX" : "0.034977",
"motionGravityY" : "-0.009047",
"motionGravityZ" : "-0.999347",
"motionMagneticFieldCalibrationAccuracy" : "2.000000",
"motionMagneticFieldX" : "-36.706497",
"motionMagneticFieldY" : "-3.118759",
"motionMagneticFieldZ" : "-25.621033",
"motionPitch" : "0.009047",
"motionQuaternionW" : "-0.008772",
"motionQuaternionX" : "-0.017530",
"motionQuaternionY" : "0.004370",
"motionQuaternionZ" : "0.999798",
"motionRoll" : "0.034985",
"motionRotationRateX" : "0.000625",
"motionRotationRateY" : "-0.000442",
"motionRotationRateZ" : "0.000817",
"motionTimestamp_sinceReboot" : "77700.984485",
"motionUserAccelerationX" : "0.001827",
"motionUserAccelerationY" : "-0.000368",
"motionUserAccelerationZ" : "-0.007046",
"motionYaw" : "-3.124204"
},
{
"accelerometerAccelerationX" : "0.034225",
"accelerometerAccelerationY" : "-0.008728",
"accelerometerAccelerationZ" : "-1.000931",
"accelerometerTimestamp_sinceReboot" : "77701.014310",
"avAudioRecorderAveragePower" : "-34.738995",
"avAudioRecorderPeakPower" : "-29.852339",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"gyroRotationX" : "0.003781",
"gyroRotationY" : "-0.076643",
"gyroRotationZ" : "0.000894",
"gyroTimestamp_sinceReboot" : "77701.004474",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876190",
"locationHeadingTimestamp_since1970" : "1607291138.168952",
"locationHeadingX" : "-36.616852",
"locationHeadingY" : "-2.912506",
"locationHeadingZ" : "-25.239990",
"locationMagneticHeading" : "85.923080",
"locationTrueHeading" : "89.003906",
"loggingTime" : "2020-12-06 22:45:38.173 +0100",
"logSampleNr" : "778"
},
{
"accelerometerAccelerationX" : "0.033676",
"accelerometerAccelerationY" : "-0.007309",
"accelerometerAccelerationZ" : "-1.001099",
"accelerometerTimestamp_sinceReboot" : "77701.030424",
"avAudioRecorderAveragePower" : "-35.218269",
"avAudioRecorderPeakPower" : "-29.852339",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"loggingTime" : "2020-12-06 22:45:38.189 +0100",
"logSampleNr" : "779",
"motionAttitudeReferenceFrame" : "XTrueNorthZVertical",
"motionGravityX" : "0.035004",
"motionGravityY" : "-0.008995",
"motionGravityZ" : "-0.999347",
"motionMagneticFieldCalibrationAccuracy" : "2.000000",
"motionMagneticFieldX" : "-36.715759",
"motionMagneticFieldY" : "-2.925949",
"motionMagneticFieldZ" : "-25.069214",
"motionPitch" : "0.008995",
"motionQuaternionW" : "-0.008769",
"motionQuaternionX" : "-0.017544",
"motionQuaternionY" : "0.004344",
"motionQuaternionZ" : "0.999798",
"motionRoll" : "0.035013",
"motionRotationRateX" : "-0.003867",
"motionRotationRateY" : "0.001772",
"motionRotationRateZ" : "0.000104",
"motionTimestamp_sinceReboot" : "77701.014453",
"motionUserAccelerationX" : "-0.000825",
"motionUserAccelerationY" : "0.000175",
"motionUserAccelerationZ" : "-0.000272",
"motionYaw" : "-3.124209"
},
{
"accelerometerAccelerationX" : "0.037369",
"accelerometerAccelerationY" : "-0.007599",
"accelerometerAccelerationZ" : "-1.002563",
"accelerometerTimestamp_sinceReboot" : "77701.046537",
"avAudioRecorderAveragePower" : "-35.218269",
"avAudioRecorderPeakPower" : "-29.852339",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"gyroRotationX" : "0.006077",
"gyroRotationY" : "-0.077056",
"gyroRotationZ" : "0.001649",
"gyroTimestamp_sinceReboot" : "77701.034442",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876190",
"locationHeadingTimestamp_since1970" : "1607291138.188685",
"locationHeadingX" : "-36.715759",
"locationHeadingY" : "-2.925949",
"locationHeadingZ" : "-25.069214",
"locationMagneticHeading" : "85.923744",
"locationTrueHeading" : "89.004570",
"loggingTime" : "2020-12-06 22:45:38.206 +0100",
"logSampleNr" : "780",
"magnetometerTimestamp_sinceReboot" : "77701.035215",
"magnetometerX" : "187.234955",
"magnetometerY" : "188.355042",
"magnetometerZ" : "-709.823547"
},
{
"accelerometerAccelerationX" : "0.035263",
"accelerometerAccelerationY" : "-0.011368",
"accelerometerAccelerationZ" : "-1.005341",
"accelerometerTimestamp_sinceReboot" : "77701.062620",
"avAudioRecorderAveragePower" : "-35.783520",
"avAudioRecorderPeakPower" : "-29.852339",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876191",
"locationHeadingTimestamp_since1970" : "1607291138.208948",
"locationHeadingX" : "-36.388031",
"locationHeadingY" : "-3.009003",
"locationHeadingZ" : "-25.307068",
"locationMagneticHeading" : "85.924210",
"locationTrueHeading" : "89.005035",
"loggingTime" : "2020-12-06 22:45:38.228 +0100",
"logSampleNr" : "781",
"motionAttitudeReferenceFrame" : "XTrueNorthZVertical",
"motionGravityX" : "0.035031",
"motionGravityY" : "-0.009005",
"motionGravityZ" : "-0.999346",
"motionMagneticFieldCalibrationAccuracy" : "2.000000",
"motionMagneticFieldX" : "-36.388031",
"motionMagneticFieldY" : "-3.009003",
"motionMagneticFieldZ" : "-25.307068",
"motionPitch" : "0.009005",
"motionQuaternionW" : "-0.008762",
"motionQuaternionX" : "-0.017557",
"motionQuaternionY" : "0.004350",
"motionQuaternionZ" : "0.999798",
"motionRoll" : "0.035040",
"motionRotationRateX" : "-0.002688",
"motionRotationRateY" : "0.001089",
"motionRotationRateZ" : "0.000186",
"motionTimestamp_sinceReboot" : "77701.044452",
"motionUserAccelerationX" : "0.002337",
"motionUserAccelerationY" : "0.001406",
"motionUserAccelerationZ" : "-0.003218",
"motionYaw" : "-3.124224"
},
{
"accelerometerAccelerationX" : "0.033936",
"accelerometerAccelerationY" : "-0.008270",
"accelerometerAccelerationZ" : "-1.008591",
"accelerometerTimestamp_sinceReboot" : "77701.078733",
"avAudioRecorderAveragePower" : "-35.894341",
"avAudioRecorderPeakPower" : "-29.852339",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"gyroRotationX" : "0.006742",
"gyroRotationY" : "-0.078071",
"gyroRotationZ" : "0.000371",
"gyroTimestamp_sinceReboot" : "77701.064441",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876193",
"locationHeadingTimestamp_since1970" : "1607291138.229093",
"locationHeadingX" : "-36.477371",
"locationHeadingY" : "-3.081924",
"locationHeadingZ" : "-25.343933",
"locationMagneticHeading" : "85.924126",
"locationTrueHeading" : "89.004951",
"loggingTime" : "2020-12-06 22:45:38.238 +0100",
"logSampleNr" : "782"
},
{
"accelerometerAccelerationX" : "0.034683",
"accelerometerAccelerationY" : "-0.010590",
"accelerometerAccelerationZ" : "-1.008743",
"accelerometerTimestamp_sinceReboot" : "77701.094846",
"avAudioRecorderAveragePower" : "-36.771626",
"avAudioRecorderPeakPower" : "-29.852339",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876195",
"locationHeadingTimestamp_since1970" : "1607291138.248836",
"locationHeadingX" : "-36.430481",
"locationHeadingY" : "-2.969254",
"locationHeadingZ" : "-25.259521",
"locationMagneticHeading" : "85.924248",
"locationTrueHeading" : "89.005074",
"loggingTime" : "2020-12-06 22:45:38.254 +0100",
"logSampleNr" : "783",
"magnetometerTimestamp_sinceReboot" : "77701.093351",
"magnetometerX" : "186.871170",
"magnetometerY" : "188.533890",
"magnetometerZ" : "-709.817078",
"motionAttitudeReferenceFrame" : "XTrueNorthZVertical",
"motionGravityX" : "0.035061",
"motionGravityY" : "-0.009031",
"motionGravityZ" : "-0.999344",
"motionMagneticFieldCalibrationAccuracy" : "2.000000",
"motionMagneticFieldX" : "-36.430481",
"motionMagneticFieldY" : "-2.969254",
"motionMagneticFieldZ" : "-25.259521",
"motionPitch" : "0.009031",
"motionQuaternionW" : "-0.008761",
"motionQuaternionX" : "-0.017572",
"motionQuaternionY" : "0.004362",
"motionQuaternionZ" : "0.999798",
"motionRoll" : "0.035070",
"motionRotationRateX" : "0.002348",
"motionRotationRateY" : "0.000247",
"motionRotationRateZ" : "0.000621",
"motionTimestamp_sinceReboot" : "77701.074420",
"motionUserAccelerationX" : "-0.000393",
"motionUserAccelerationY" : "-0.000308",
"motionUserAccelerationZ" : "-0.008239",
"motionYaw" : "-3.124226"
},
{
"accelerometerAccelerationX" : "0.033768",
"accelerometerAccelerationY" : "-0.008774",
"accelerometerAccelerationZ" : "-1.005692",
"accelerometerTimestamp_sinceReboot" : "77701.110960",
"avAudioRecorderAveragePower" : "-36.771626",
"avAudioRecorderPeakPower" : "-29.852339",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"gyroRotationX" : "0.002831",
"gyroRotationY" : "-0.076265",
"gyroRotationZ" : "0.001715",
"gyroTimestamp_sinceReboot" : "77701.094409",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876197",
"locationHeadingTimestamp_since1970" : "1607291138.268665",
"locationHeadingX" : "-36.766403",
"locationHeadingY" : "-2.885361",
"locationHeadingZ" : "-25.336365",
"locationMagneticHeading" : "85.924141",
"locationTrueHeading" : "89.004967",
"loggingTime" : "2020-12-06 22:45:38.270 +0100",
"logSampleNr" : "784",
"motionAttitudeReferenceFrame" : "XTrueNorthZVertical",
"motionGravityX" : "0.035022",
"motionGravityY" : "-0.008936",
"motionGravityZ" : "-0.999347",
"motionMagneticFieldCalibrationAccuracy" : "2.000000",
"motionMagneticFieldX" : "-36.766403",
"motionMagneticFieldY" : "-2.885361",
"motionMagneticFieldZ" : "-25.336365",
"motionPitch" : "0.008936",
"motionQuaternionW" : "-0.008761",
"motionQuaternionX" : "-0.017552",
"motionQuaternionY" : "0.004315",
"motionQuaternionZ" : "0.999798",
"motionRoll" : "0.035031",
"motionRotationRateX" : "-0.001589",
"motionRotationRateY" : "-0.001877",
"motionRotationRateZ" : "-0.000561",
"motionTimestamp_sinceReboot" : "77701.104388",
"motionUserAccelerationX" : "0.000745",
"motionUserAccelerationY" : "0.000620",
"motionUserAccelerationZ" : "-0.007642",
"motionYaw" : "-3.124223"
},
{
"accelerometerAccelerationX" : "0.035889",
"accelerometerAccelerationY" : "-0.009491",
"accelerometerAccelerationZ" : "-1.000381",
"accelerometerTimestamp_sinceReboot" : "77701.127073",
"avAudioRecorderAveragePower" : "-37.050854",
"avAudioRecorderPeakPower" : "-29.852339",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"loggingTime" : "2020-12-06 22:45:38.290 +0100",
"logSampleNr" : "785"
},
{
"accelerometerAccelerationX" : "0.035278",
"accelerometerAccelerationY" : "-0.008865",
"accelerometerAccelerationZ" : "-1.004211",
"accelerometerTimestamp_sinceReboot" : "77701.143186",
"avAudioRecorderAveragePower" : "-37.257305",
"avAudioRecorderPeakPower" : "-29.852339",
"batteryLevel" : "0.660000",
"batteryState" : "1",
"deviceID" : "my_iOS_device",
"deviceOrientation" : "5",
"gyroRotationX" : "0.001609",
"gyroRotationY" : "-0.076717",
"gyroRotationZ" : "0.001673",
"gyroTimestamp_sinceReboot" : "77701.124377",
"identifierForVendor" : "1B07EE58-F14E-4E47-ABF8-7E919F119960",
"IP_en0" : "10.41.8.38",
"IP_pdp_ip0" : "100.78.225.228",
"label" : "0",
"locationHeadingAccuracy" : "14.876198",
"locationHeadingTimestamp_since1970" : "1607291138.288638",
"locationHeadingX" : "-36.884933",
"locationHeadingY" : "-3.087875",
"locationHeadingZ" : "-25.284058",
"locationMagneticHeading" : "85.924454",
"locationTrueHeading" : "89.005280",
"loggingTime" : "2020-12-06 22:45:38.302 +0100",
"logSampleNr" : "786",
"motionAttitudeReferenceFrame" : "XTrueNorthZVertical",
"motionGravityX" : "0.035028",
"motionGravityY" : "-0.008846",
"motionGravityZ" : "-0.999347",
"motionMagneticFieldCalibrationAccuracy" : "2.000000",
"motionMagneticFieldX" : "-36.644531",
"motionMagneticFieldY" : "-2.917130",
"motionMagneticFieldZ" : "-25.302368",
"motionPitch" : "0.008846",
"motionQuaternionW" : "-0.008759",
"motionQuaternionX" : "-0.017555",
"motionQuaternionY" : "0.004270",
"motionQuaternionZ" : "0.999798",
"motionRoll" : "0.035037",
"motionRotationRateX" : "-0.003860",
"motionRotationRateY" : "-0.000956",
"motionRotationRateZ" : "-0.001445",
"motionTimestamp_sinceReboot" : "77701.134387",
"motionUserAccelerationX" : "0.002051",
"motionUserAccelerationY" : "0.000881",
"motionUserAccelerationZ" : "-0.002896",
"motionYaw" : "-3.124227"
}
]