發表文章

GeoSetter how to add geotag on to pictures, and export to google earth as kmz

圖片
I use gps info of my cell phone when I take pictures, so that I can find where these pics were taken after a long voyage. I also wish to export these pics to google earth or google map, which can be kml or kmz. https://geosetter.de/en/download-en/ Geo setter is a very powerful one. Some times my phone was not able to add geotag info on the the picture, since it does not have location info at that time(indoor picture or gps was not available). Of course you can edit the pic, but geo sitter provide a better interface, you can pic a location on map and then assign the location to the photo that you selected. much easier than deal with coordinates. I notes the steps as following. After install geosetter, select the folder where you store your images. photos with a blue location dot means these pics contain geotag. select one pic with no blue dot, and go to top menu "map", select "show overview map"  a google map will show up with goe location of pictures...

9XR PRO with DJT module with D port

圖片
I have search on this, most talk about Sport https://ardupilot.org/copter/docs/common-frsky-telemetry.html#common-frsky-telemetry https://ardupilot.org/copter/docs/common-frsky-telemetry.html#turnigy-9xr-pro For my DJT module, it has only Dport, so in the mission planner, you have to set the baud rate to 9600 and protocol as 3. for the connection form pixhawk to frsky receiver, you need a singal invert board. For the connection from DJT module to the 9xr pro futaba connector (com2)is like this: rightest upper one(green) goes to Rxd of DJT module rightest lower one (white) goes to Txd of DJT module. My 9xr pro runs on ersky9X R222, for the telemetry set as: telemetry com port =2, invert=2, baudrate=9600 UsrProto can be frsky, frskyhub or arduP(plane) arduC(copter), just the layout is different. with tx/rx number jumping, it should be good.

radio link telemetry protocol on IIC

圖片
R9D receiver use a RPM-02 module to get mavlink data through IIC, here are few discussion on how to get data into R9D  https://www.rcgroups.com/forums/showthread.php?2236519-Radiolink-AT9-%C2%96-anybody-owns-it-Reviews/page14#post34359050 The PRM-02 module uses these Mavlink packets to get the required data: mavlink_msg_sys_status_pack - Ext Voltage mavlink_msg_gps_raw_int_pack - Latitude , Longitude and GPS Satellites mavlink_msg_vfr_hud_pack - Speed,Rise and Altitude mavlink_msg_global_position_int_pack - Yaw mavlink_msg_attitude_pack - Roll and Pitch The data being sent from the Prm-02 to the radio is sent with MSB first. The the data is the same as would be in the Mavlink packet apart from the floats. The receiver gets them as 2 bytes. They have been multiplied by 10. For example if the float in the Mavlink packet for speed was 10.3 the the value sent to the receiver would be 103. The transmitter just reads from address 04. The PRM-02 then sends packets accord...

MQTT learning on Pi with BME280 and node-red, node-red-dashboard

圖片
install on pi using apt https://randomnerdtutorials.com/how-to-install-mosquitto-broker-on-raspberry-pi/ testing mqtt with pi terminal https://randomnerdtutorials.com/testing-mosquitto-broker-and-client-on-raspbbery-pi/ using esp32 https://randomnerdtutorials.com/esp32-mqtt-publish-subscribe-arduino-ide/ becareful with the BME280 board, I have 2 kinds of board, one with a square sensor on it, this one works with adafruit library, the other one with a rectangle one, this one does not work with most of BME280 libs. there is a post, saying adafruit library checks CHIPID of 280: http://davidstein.cz/2017/09/30/arduino-bme280-could-not-find-a-valid-bme280-sensor-solved/ I followed it and sensor start to work. the default address used in adafruit is 0x77, if you use 0x76, then use this:    status = bme.begin(0x76); Below both with default ID=0x76, the purple ones works finally, but no humidity reading with the example of adafruit, the blue one reads humidity with sa...

orange internal module with telemetry firmware upgrade DSM

圖片
I have a 9XR Pro the first module I use is a PPM base DSM module: this module support 4 types of DSM protocol, it would auto select when binding with receiver, but if you switch planes between different type DSM, you need to select the binded one, by quick pressing bind key 3 times. The I saw this module using internal antenna of 9XR Pro, I took it. This modele take me few search to bind, and ran into problems with some DSMX receiver.  refer to  https://ldsrc.blogspot.com/2018/06/orange-dsm2dsmx-tx-modules-how-to-make.html I did met lot of trouble, and I found this: Orange Module running MULTI protocol it seems the default firmware of the module has some issue. need to be updated. Mike has this module and 9XR PRO, he wrote a bootloader for the module, there is a Xmega in the module, so the fist step is to use an arduino pro mini (must be a 3.3V one, 16Mhz or 8Mhz should not matter, I use 16Mhz 3.3V 328), this require some wire wedding between the module and ...

firebase host 5: query data and showing a json in body

圖片
There are ways to search in firebase: https://firebase.google.com/docs/reference/js/firebase.database.Query Methods end At equal To is Equal limit ToFirst limit ToLast off on once order ByChild order ByKey order ByPriority order ByValue start At toJSON to String I plan to use web to show my sensor data, so the last data and last few data average are useful and to show the returned val in HTML body, you need to use JSON.stringify example as below: < script > var db = firebase . database (); db . ref ( "chinese/henry" ). limitToLast ( 3 ). on ( 'value' , function ( snapshot ) { //db.ref("chinese/henry").limitToFirst(1).once('value', function (snapshot) { //db.ref("chinese/henry").on('value', function (snapshot) { var data = snapshot . val (); console . log ( data ); console . log ( snapshot . key ); // it shows henry document . getElementById ( "mydata...

firebase host 4: write/read from web

圖片
Since setting up the firebase, I was searching lot of examples of read/write data from web with HTML and js... bot none works for me. I think the version changment is also a cause, but not sure where are the differences. the version of firebase lib I used no is 6.2.4 and the examples are mostly 5.x.x, the version change also impact other java lib version and support. after several fail, I decide to search most recent one. 26 Day26 前端福音(1/4): Firebase-介紹 & 建立專案 27 Day27 前端福音(2/4): Firebase-寫入&刪除資料 28 Day28 前端福音(3/4): Firebase-讀取資料 29 Day29 前端福音(4/4): Firebase-帳號系統&資料讀寫規則 But still, I need to modify some thing, When you setup your firebase app and realtime, it will give you some setting to add at the end of body of your html, I need to add the 2nd one, the firebase-database.js, other when you do var db = firebase . database (); it will give you an error. < script src = "https://www.gstatic.com/firebasejs/6.2.4/firebase-app.js" ...