How to analyse sensor data
Wiki information (Maybe outdated)
lass.py data input
- Receive MQTT topic data
- sudo python lass.py
- CLI: monitor ( By default system will filter and keep ver_format=3's data)
- Load an existed sensor data log file
- sudo python lass.py --lasscmd (By default monitor will not be enabled in this mode)
- CLI: loaddata data.log
Show latest all devices's dust sensor value on google map
- lass.py export json
- CLI: export
- CLI: export> json geodata.json 1
- use browser ( Chrome ) to open client_map.html
Import KML of all devices's dust sensor value to google map
- lass.py export kml
- CLI: export
- CLI: export> kml my.kml
- Upload your KML file in to Google Map or Google Earth
Produce CSV file for R or other analytics tool to read
- lass.py export csv
- CLI: export
- CLI: export> csv my.csv
CLI: data
CLI: data> desc : show current data sorting by time
CLI: data> plot : plot sensor data and save #0: all data, 1: one sensor data, 2: one sensor diff data
CLI: data> server_import : Import data from server's log
CLI: data> gps_to_map : transform gps data value to google map format
CLI: data> filter_by_datetime : ilter data, only keep data in the datetime range
CLI: setting
Convert the GPS information from log to google map
- Get GPS information from log
- Example:
LASS/Test/PM25 |ver_format=3|fmt_opt=0|app=PM25|ver_app=0.7.13|device_id=FT1_035|tick=500198327|date=2015-12-04|time=20:15:59|device=LinkItONE|s_0=8272.00|s_1=100.00|s_2=1.00|s_3=0.00|s_4=1.00|s_d0=36.00|s_t0=15.60|s_h0=96.90|s_d1=50.00|gps_lat=24.353596|gps_lon=120.523129|gps_fix=1|gps_num=16|gps_alt=8
2. lass.py
data/
LASS>data
LASS:data>help
Documented commands (type help <topic>):
========================================
desc fake_gen filter_by_datetime gps_to_map help plot quit server_import
LASS:data>help gps_to_map
transform gps data value to google map format
gps_to_map [Latitude,gps_lat],[Longitude, gps_lon]
ex: gps_to_map 25.024037,121.368875
LASS:data>gps_to_map 24.353596,120.523129
google map format(Latitude,Longitude,altitude): 24.589327,120.871882
Copy paste 24.589327,120.871882 into google map.
Show 1 device trace on the google map
- download the data you need
- wget ftp://gpssensor.ddns.net:2121/data.log-20160208
- wget ftp://gpssensor.ddns.net:2121/data.log
- merge all data file into 1 single data file
- cat data.log-20160208 data.log > data1.log
- filter your device
- cat data1.log | grep 'FT1_xxx' > data2.log
- python lass.py
- loaddata data2.log
- export
- export> kml filename.kml
- Here is sample result