Alpo Hassinen's Posts (8)

Sort by

Georeferencing pictures

3689437588?profile=originalHere is my memo: How to save gps-coordinates to picture files with Geosetter program. The coordinates are saved to the picture exif-data, and these go with picture all the time. In exif there are already data from camera model, exposure time, lens focal length etc, now we add there gps coordinates.

For example here is picture info in Irfanview program. Coordinates and also altitude are there. You can also look picture place in Google Earth or several other map services.

3689437642?profile=original

GeoSetter

I have used free GeoSetter program. You can get it from here: http://www.geosetter.de/en Program needs also free ExifTool, and it loads and installs it automatically.

Fly and take pictures. Download datalog from plane with APM planner. After downloading you have also GPX-file in Logs directory.

Start Geosetter program.

  1. Select picture directory
  2. Select one of the pictures that you know where it was taken
  3. Load gpx-file from the flight
  4. Select the place from the list where the picture was taken. Place is shown in the map.

3689437701?profile=original

Press Images / Syncronize with Gps Data Files. Put selections according to the picture. In this picture camera and gps times differ -2:59:06 hours. Press Ok.

3689437601?profile=original

Then select all pictures: Images / Select all. Press again Images / Syncronize with Gps Data Files. Time should be same as in previous screen. Press Ok.

Now all picture places can be seen in map. Click individual pictures and check that places are ok.

(Optionally: You can add your copyright and email addresses to files: Images / Select all, then Images / Edit data, and fill columns Artist and Copyright, then press Set current values for All Selected Images)

If everything is ok, select Images / Save changes. Program creates new pictures and add there exif data. Original pictures are in the same directory, they have extension jpg_original. Probably it is wise to create directory Original and copy these to there.

Now you know the time difference between pictures and log. In the next flights you can also use APM Planner: Press Control-f and select button Geo-ref images. (I have not yet tested this. We have very bad weather, and sun is over horizon less than 5 hours...)

Most of these picture were taken from paramotor. Where is this kind of labyrinth?  (Hint: Click picture, then load original picture to your computer, open it in some program and look picture data.)

3689437705?profile=original

Read more…

How I made a CHDK-launcher to Canon camera

 

3689423647?profile=original

Here is my memo: How I make camera launcher from old servo electronics, usb-cable and diode.

Here are quite many steps, so I write this memo if I need to make system again... Programming took only few minutes, to build circuit took more time.

My camera is Canon PowerShot S90

 

  1. Buy max 4 Gb memory card to camera.
  2. Create a file to memory card, name it to ver.req (last letter is small Q)  Content can be anything.
  3. Put memory card into camera. Go to Play mode. Press FuncSet -button down and in the same time press Disp-button.
  4. Look Firmware ver number.
  5. Go to page http://mighty-hoernsche.de/ and search the right version to camera model and version. Select Full version
  6. Unzip files to memory card root
  7. Put memory card to camera. Turn camera on, go to Play mode
  8. Press Menu, search Firmware Update. When camera says Update firmware, answer Ok. Camera starts to CHDK Play mode
  9. Press Print button [S], to bottom of screen comes <alt>, then press Menu. Select Miscellaneous stuff, and Make card bootable. Press FuncSet, nothing seems to happen, but everything is ok.
  10. Go to previous menu and select Scripting parameters / Load script from file. Search and select REMOTE.BAS
  11. Remote Parameters / Enable Remote [o]
  12. Select Scripting Autostart [On] and Save params [o]
  13. Switch camera off, and take take memory card off. Put small Lock switch in memory card to Lock position. Put memory card to camera.
  14. Start camera. Camera starts to Play mode, and now in the lower left corner should read ***Autostart***
  15. Make the camera launch circuit from old digital servo electronics, diode and Micro-USB-cable. Remove motor and put diode and cable to its place. Check that during launch there should come 5V to red wire and GND to black wire. When launch is not on, there should be 0V between wires, never negative voltage!
  16. Test with camera. I have used channel 5 from receiver, then I can turn camera on with Gear switch. If switch is on, camera takes pictures at 2 - 3 seconds intervals.
  17. If I use camera to other purposes, I just turn Lock button in memory card to Off position.
  18. It is also possible to remove the potentiometer, and make voltage divider from two resistors.

 

More details http://chdk.wikia.com/wiki/CHDK

This same page in Finnish

Read more…

TaigaCam and predefined flight plan

3689423082?profile=original

This is a special version for aerial photography. On the plane there is a stabilized camera.

Here is the camera stand. Guess what is the weight of it? ;-)

3689423296?profile=original

I have also made additional code to APM, so I don't need a computer to make flight plan. The procedure is following:

I go near the target I want to photo. I press "Locate" button and switch power on. The Ardupilot now waits until it has good gps fix, and then makes automatically flight plan around this place. Then I can switch off the plane and walk to a good starting and landing place. There I again switch plane on, wait gps fix and throw plane to flight. Plane makes three rounds around the target.

3689423175?profile=original

 

First round radius is 250 meters, next 200 and innermost 150 meters. Altitudes are 80, 70 and 60 meters. There are two checkpoints, 1 and 2. Plane should first go to northeast then turn to left, and after that turn to north west. If plane does not do these curves, there may be something wrong with the flight plan, and it is probably best to call plane back.

I have made Canon CHDK system to camera, and I can launch it with remote control channel 5 switch. Normally I take photos all the time. After flight I have 150 - 250 pictures, and probably at least one of them is good :-)

The Locate button is simple circuit. Normally AN6 is connected to GND with resistor, so the voltage is 0V. If I press button in the start, the voltage is 5V, and program goes to special subroutine that calculates this flight plan.

3689423095?profile=original

 

I have not tested this, but it would be easy to add more predefined flight plans to plane. In this draw there is Locate button and knob selector. If user does not press button, the AN6 is zero. If user press button, then those resistors are voltage dividers, and AN6 is something between 0V and 5V depending on knob position, and program can branch to desired subroutine according to the voltage. For example one of them may be subroutine to take orthophotos from square field.

3689423188?profile=original

The code for flight plan? This program writes coordinates to Eeprom, and I am not familiar with those details. If someone who knows code can check it and then share it?

 

Code for camera stabilizer is here

 

Here is an example of photos.

3689423354?profile=original

Read more…

Better log analyzer for APM

3689416798?profile=original
I made a program that shows log data in visual way. I can see plane position, altitude, elevator, ailerons etc.

Here are some screenshots from program:

My plane made strange curves during flight. All curves are in the same places. After a very careful check I found an error in APM navigation code. It is now corrected in version 2.21 (In downloads section there is still the version 2.20, and there is the error.) Issue 376

3689416532?profile=original

 

First flight attempts can be quite curvy. Probably Nav_Roll P value is too big?

3689416869?profile=original

 
It seems that I must make also Nav_Pitch_Alt_Pid smaller... ?
3689416815?profile=original
GPS altitude (violet line) is rather slow? Air pressure altitude is probably quite ok.
3689416890?profile=original
 
Sometimes GPS altitude jumps quickly. In the last column are the values, and there is sudden 70 meters jump.
3689416825?profile=original

You can download this program from the address

http://sites.google.com/site/alpohassinen/logbrowser/APMLogBrowserSetup.zip

Normally only part of the flight data is saved to log. I have changed settings so that also CTUN and NTUN are saved. This is done easily in APM Planner and there in Configuration: I changed LOG_BITMASK to 382.
3689416903?profile=original
 
PS. It was impossible to analyze flight data in the field with laptop, touchpad and very poor internet connetions. I made this program with quick and dirty method, so there may be errors.
PPS. NO, I will not make modifications or corrections to this program, but please ask Michael Oborne to make similar system to APM Planner... :-)

Read more…

Don't do this at home with other planes!  ;-)


In the first episode motor, rudder and tail servos are not yet installed.

Plane is home made, there is no ready kit available.

- Wingspan 150 cm
- Length 120 cm
- Empty weight without batteries 1.3 kg
- Maximum load with batteries is about 1.2 kg
- Maximum takeoff weight is about 2.5 kg
- Flight speed is about 50 km/h, maximum about 80 km/h
- Flight travel with one 2100 mAh battery is about 7 km, flight time is approximately 8 minutes.
- In plane there is space for 4 batteries, so flight time is more than 30 minutes
- Space for autopilot, batteries and payload is about 30 x 7 x 5 cm.
- Wing is made from EPP foam, it is made with CNC hot wire cutter
- Fuselage is made from EPP foam and PVC pipe or fishing rod
- Price of the plane frame without servos and motor is less than 100 euros
- Price of the plane with good servos, motor and wires, but without batteries and remote control is about 395 euros in Finland, in other countries much, much less...
- The building time is about 8 hours

Plane homepage in Finnish: http://sites.google.com/site/taigacam/

Read more…

TaigaCam and camera stabilizer, pan test

3689406572?profile=original

TaigaCam and Ardupilot tries to look home position all the time. Camera can turn about 100 degrees. In Ardupilot there is no compass, and therefore it calculates flight direction once per second according to gps. That's why camera turns slowly.
This pan-system needs only one line of code to Ardupilot. In plane there is also roll stabilizer, and it needs also only one line code.

 

If I should build a pan/tilt camera, I would first build a platform, that is always in level. Then I would install the pan/tilt camera on it. This system needs only 4 lines code to Ardupilot, and all free servo channels... In the main program there is fast_loop. To the end of this subroutine, just above }, I should add these lines. (I have not tested the last line = tilt)

 

APM_RC.OutputCh(CH_5, constrain(g.rc_6.radio_in - (dcm.roll_sensor / 10),900,2100)); 
APM_RC.OutputCh(CH_6, constrain(g.rc_7.radio_in + (dcm.pitch_sensor / 10),900,2100));  
APM_RC.OutputCh(CH_7, constrain((wrap_360(get_bearing(&current_loc, &home) - g_gps->ground_course) / 10) + 500,900,2100));
APM_RC.OutputCh(CH_8, constrain(atan(((float)get_alt_distance(&current_loc, &home) / 100) / (float)get_distance(&current_loc, &home)) * 573 + 1000,900,2100));

 

Read more…

Easy camera roll stabilizer to APM

 

This is easy camera roll stabilizer to ArduPilotMega (I used code version 2.012). Camera mount was easy to build. Camera angle can be adjusted during flight with RC controller. Stabilization needs only one line code to program! Of course also pitch can be stabilized in the same time, but I have not yet tested this.

Camera stabilizer is normal mount with servo. Servo is connected to APM's sixth output port. (I have old 1.0 version of board, name is Out5, in new version 1.4 port name is probably Out6)

3689403097?profile=original
Optionally some free radio receiver channel can be connected to 6th input port(In my board name is In5, in new board probably In6)

Then I added one line to APM code: In the main program there is fast_loop. To the end of this subroutine, just above }, I added this line:

 

APM_RC.OutputCh(CH_6, constrain(g.rc_6.radio_in - (dcm.roll_sensor * 0.1),900,2100));

 

Then I uploaded program to APM, and thats it.

 

Also pitch can be stabilized in the same way. Servo and receiver goes to next channels, and this code can be added after the code line above.

 

APM_RC.OutputCh(CH_7, constrain(g.rc_7.radio_in - (dcm.pitch_sensor * 0.1),900,2100));

 

Some explanations to codes: It is easiest to think, that servo middle position is 150 degrees, in the program this is indicated as 1500. This is default value if receiver is not connected, and we get this value from radio receiver if knob is in the middle position.

Servo maximum turn is 60 degrees to each position, so we have minimum value 1500 - 600 = 900, and maximum value 1500 + 600 = 2100. These numbers are in the code above. If we want to reduce movement, then we must change these values. For example if camera can turn only 20 degrees to each direction, the values are 1300 and 1700.

 

Stabilization works always, also on manual mode. Camera can turn even 60 degrees to all directions. Probably analog servos are better, digital servos jitters very often.


In the forum there are some drawings from some other camera mounts http://www.diydrones.com/forum/topics/apmimu-camera-stabilization

Read more…