Accessing Data

There are multiple ways to access Session data collected through the Moonsense SDKs. How you access it depends on what you want to do with the data and how you would like to consume it. For this reason, the data can be consumed through the Moonsense Console and programmatically through the use of the Python SDK.

Data in the Console

The Console provides two methods to view the data. To see a snapshot of the data, you can simply click on one of the sensors listed in the Session Details and it will provide you with a JSON view of some of the data points that have been collected.

Screen Shot json view 2022 08 30

The easiest way to get access to all the raw sensor data is through using the Download button on the Session page:

Screen Shot 2021 06 04 at 7 36 53 PM

That will immediately trigger a download of a compressed file that contains one JSON document per line with readings from all the relevant sensors on the devices for a time interval of 5 seconds.

The easiest way to convert that plaintext is using the gzcat command.

Each line has a document is a Bundle:

{ "bundle": { "location_data": [ { "determined_at": "1622216464998", "horizontal_accuracy": 10, "altitude": 1.6886863708496094, "latitude": 37.49661021869397, "longitude": -122.13112793874194, "speed_accurracy": 0.15 } ], "accelerometer_data": [ { "determined_at": "1622216465130", "x": -0.28875427246093754, "y": 9.275576782226564, "z": 3.152969360351563 }, { "determined_at": "1622216465169", "x": -0.35320434570312503, "y": 9.368289184570314, "z": 3.139511108398438 } ], "magnetometer_data": [ { "determined_at": "1622216465139", "x": -55.90031433105469, "y": 18.210159301757812, "z": -498.796630859375 }, { "determined_at": "1622216465179", "x": -55.91831970214844, "y": 18.392822265625, "z": -498.8045654296875 } ], "gyroscope_data": [ { "determined_at": "1622216465131", "x": 0.0034461303148418665, "y": -0.009550361894071102, "z": -0.0041057956404984 } ], "client_time": { "wall_time_millis": "1622216470131", "timer_millis": "927903185", "timer_realtime_millis": "927903186" }, "battery": { "capacity": 36, "state": "CHARGING" }, "activity_data": [ { "determined_at": "1622216465126", "type": "STILL", "confidence": 100 }, { "determined_at": "1622216469095", "type": "IN_VEHICLE", "confidence": 100 } ], "orientation_data": [ { "determined_at": "1622216465148", "azimuth": -2.6306343, "pitch": 1.2454388, "roll": 0.10053941 } ] }, "app_id": "gMbUBZdC6Ywb9bgTfik7Be", "credential_id": "ZcYmyKKyNk39RvomDHGMUh", "session_id": "vRaiwPndN7QaW9JmRazbgH", "user_id": "andrei@moonsense.io", "server_time_millis": "1622216470424411" }

Data programmatically

All Session Data can be accessed programmatically through the use of the Moonsense Cloud Client SDKs. The SDKs currently support the following languages:

For any issues don't hesitate to contact us at support@moonsense.io. Thank you!