發表文章

目前顯示的是 2015的文章

software defined radio ADS-B

圖片
For boat AIS scanner: http://www.rtl-sdr.com/rtl-sdr-tutorial-cheap-ais-ship-tracking/ For air craft: http://www.rtl-sdr.com/adsb-aircraft-radar-with-rtl-sdr/ Both need a 820T dongle, For air, ADS-B, the frequency works on 1090Mhz, so a right antenna is needed. And a quick start with Software Define Radio, is shown here: http://www.rtl-sdr.com/rtl-sdr-quick-start-guide/ First test with  SDRSharp: My first installation of driver ended with time out....try to find out why..... updating zadig from here:  http://zadig.akeo.ie/ It turns out that my PC still have windows running at that time. I finished the update and run again the Zadig, it turns out fine. but sdrsharp can't work, I hvae netfram on PC, but still try 3.5... after installation of 3.5, SDRsharp works.... I hook up an 1.2G antenna, and get some signal on 1090Mhz from air, using ADSBsharp, I do get  strings... From air.... Follow guide here: http://rtlsdrblog.rtlsdrblog.netdna-cdn.com/wp-content/uploads

2015/7/18 An unplanned trip from 碧砂 to 烏石

圖片
原本  Gill team預計從碧砂17:00夜航到烏石, 周日下午15:00再回烏石... 使用 hunter 33 風行者號, 成員6人 最終於18:00出航, 23:30返航碧砂....失敗 黃色為出發的航跡... 紅色為tacking後航跡 綠色圍往北再tacking,之後決定返航的航跡(by 老宋)..... 事後分析: 缺乏正確的航行計畫: 出發時間: 17:00並不是配合潮汐選的, hunter 33當天有其他活動至下午16:00, 又因港口加油站只到14:30,必須開車到加油站買柴油, 實際出航時間已是18:00之後, 當天的滿潮約是21:00, 所以出發遇到相當大的漲潮流 天氣: 當日的風況及海象根據氣樣局預報都很小, 實際傍晚有約17-20節風, 浪不大,但偶有湧, 所幸大家都有救生衣,在甲板上的全員穿上... 剛出發時有晚霞,日落後有低雲,索性稍後晴朗出現星星... 水及食物(泡麵)零食(香蕉,滷味)都有足夠6人一晚的使用, 風浪略大,只有一個人有勇氣吃一根香蕉...回程順流,風浪較小一些,除了嘔吐的人以外,大家都吃了些麵包 船隻狀況不良: 動力方面:engine狀況不好,油門加略大會有黑煙及異音, 無轉速表, 無油量表....動力大約只夠在平順的海況順順推... 帆: 主帆完整操控順利, 前帆的furling 基本上是壞的, 前帆如果要升帆需要有人在前面將帆順入導軌, 當晚浪況根視線都不允許這樣做.....以免MOB 航儀: No Rada, nor AIS , 航行燈: 左紅右綠,尾燈正常 GPS 海圖機:無.....出海後是靠著老宋的手機海圖,跟陸地上的燈塔(鼻頭角,三貂角)來做航向的定位 速度計: 失效 無 SOG,無對水速度... auto pilot有效, 可對磁方位定向, 但儀器上的磁方位跟舵輪前的羅盤對不上....約有20~60的差異... 也跟老宋的手機方位對不起來.... wench:右前的wench只有一速, 另一向的第二速失效, 主帆其實不好拉出...main sheet還好.... 風標: works fine...還好.... 港口出發後, 開引擎升主帆朝auto pilot 40度方向前進,風向角約30-40,度 除速度未知外一切還好, 接近

Insert data to local mysql server from python connector on beaglebone with angstrom

圖片
I have tested my python connector on PC in this article: Insert data to a mysql server from python ON PC with windows But the funny thing is that when I move every thing on a beaglebone with Angstrom, I got conection refused error on localhost:3306, I have checked my my.cnf file under etc/ [client] #password = password port         = 3306 socket = /tmp/mysql.sock [mysqld_safe] err-log = /var/log/mysql.err [mysqld] user = mysql port = 3306 socket = /tmp/mysql.sock pid-file = /var/lib/mysql/mysqld.pid log-error = /var/log/mysqld.err basedir = /usr datadir = /var/mysql skip-locking loose-skip-innodb skip-networking bind-address = localhost Google it, there are several possibilities: port or socket not correct, but from above, I believe both are correct. about the bind-address, there are 2 different talk using mysqladmin variables | grep port  I got below: s

Insert data to a mysql server from python ON PC with windows

圖片
after installing mysql server and client(python connector) on my beaglebone, I learn to insert data from python in to mysql server. All these are done on windows PC. most data are found in  http://www.mysqltutorial.org/python-mysql/ Here is a example on how to connect to a data base from python: import mysql.connector from mysql.connector import Error def connect():     """ Connect to MySQL database """     try:         conn = mysql.connector.connect(host='localhost',                                        database='iot',                                        user='root',                                        password='')         if conn.is_connected():             print('Connected to MySQL database')                       except Error as e:         print(e)     finally:         conn.close()         print('Disconnected from MySQL database') connect() To insert or query from

Installation of Python MySQL client on beaglebone angustrom

Referring to http://www.hkcode.com/programming/417 http://sourceforge.net/projects/mysql-python/ http://dev.mysql.com/doc/connector-python/en/connector-python-installation.html There are several connectors for different platform, win32, win64, debian, ubuntu...etc, each has file in 2 compression formats.ZIP or tar. My beaglebone is on angustrom, no worry, there is a platform independent option down load the tar file, and transfer to beaglebone with SCP, then un tar it, using python setup.py install to install it. shell> tar xzf mysql-connector-python- VER .tar.gz shell> cd mysql-connector-python- VER shell> sudo python setup.py install  installation complete with out error, but  in python: import mysql   no error import mysql.connector failed with lot of error Traceback (most recent call last):   File "dates.py", line 38, in <module>     import mysql.connector   File "/usr/lib/python2.7/site-packages/mysql/connector/__init__.py&qu

Few basic operation mysql after installation...

圖片
After installing mysql server and python client connector, I need to know how to set up a data base and read write it, I don't need something super fancy, just simply usable for adding rolls and readable for others. http://www.mysqltutorial.org/   is a site seems nice to me to read...there is a basic tutorial Manage Database in MySQL Under windows mysql server, the is a MySQL command line client, open it, it would ask for the password, which is what we have entered during installation. Once entered, try SHOW DATABASES ; it would list out what are the databases available. capital or not is not an issue, but always end with ; we can use 1 CREATE DATABASE [ IF NOT EXISTS ] database_name ; to create data base,and use show to see it. as linux system, we can use up arrow to find previous used commands. No matter you use capital letter for database name or not, it will always in 小寫 Tell mysql which database to be used: 1 U