Waypoint flying - questions before first flight

Discussion in 'Cinestar 8' started by Derek Cooper, Apr 15, 2015.

  1. Dave King

    Dave King Well-Known Member

    Joined:
    Dec 24, 2012
    Messages:
    2,711
    Likes Received:
    311
  2. Dave King

    Dave King Well-Known Member

    Joined:
    Dec 24, 2012
    Messages:
    2,711
    Likes Received:
    311
    Andy

    I downloaded GPX tools 1.56 and the data shows cleanly now. However I am not seeing any of my trigger points in the GPX file. I have my camera set to fire every 20 meters. Here's the GPX file. I have my ini file set to trigger twice a second. I"m not sure if I need to set it to 3 or 4 times a second maybe so it catches it?
    <EDIT> Since I originally posted this I opened up MX GPX viewer and I see the trigger lines 116-118 164-178, 237-239 and 315-317 but I don't see them in GPX tools 1.56 under the FC Flags2 column. What I see might be representing the shutter firing is the letters 1A or 1B and not necessarily 01 for the trigger?
     

    Attached Files:

  3. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,369
    Likes Received:
    1,162
    Derek:
    The first GPX file you posted looks like that it was from your PC, not from the microSD card on the Navigation Controller -- is that correct? That could be why there were so many data rows per second.

    Bear in mind that MK_GPXTOOL depicts the FCFLAGS2 in hexadecimal.

    Unfortunately the first GPX file you posted appears for a flight on 2014-04-21, but the second GPX file is for a flight on 2015-04-19, so I cannot correlate them to see how you have the camera connected. Do you have it connected to OUT1 or OUT2?

    The way to read the flags in hexadecimal is to convert the values you see to binary.

    The two digits you see for the FCFLAGS2 can have a value of 0 to 9, and A - F.

    Here's the decode chart (you need to look things up for the first and second digits in FCFLAGS2):

    Value Binary
    0 0000
    1 0001
    2 0010
    3 0011
    4 0100
    5 0101
    6 0110
    7 0111
    8 1000
    9 1001
    A 1010
    B 1011
    C 1100
    D 1101
    E 1110
    F 1111

    So a value of FCFLAGS of 12 Hex would be 0001 0010.
    The OUT1 value will be 0000 1000.
    The OUT2 value will be 0001 0000.

    Hope that helps.
    Andy.
     
  4. Derek Cooper

    Derek Cooper Active Member

    Joined:
    Apr 28, 2014
    Messages:
    527
    Likes Received:
    34
    Hey Andy,

    I've attached the logs from the SD card in the Navi.
     

    Attached Files:

  5. Derek Cooper

    Derek Cooper Active Member

    Joined:
    Apr 28, 2014
    Messages:
    527
    Likes Received:
    34
    Per the decode chart, it appears as though we are searching for 08, yet Holger identified 0a in his post to the MK forum as the triggers.
     
  6. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,369
    Likes Received:
    1,162
    Hex 0A is 0000 1010 in binary, so that suggests your using OUT1 to control your camera.

    Andy.
     
  7. Derek Cooper

    Derek Cooper Active Member

    Joined:
    Apr 28, 2014
    Messages:
    527
    Likes Received:
    34
    Yah, sorry - definitely Output 1. Actually using Servo 4 with a map to Output 1.
     
  8. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,369
    Likes Received:
    1,162
    OK. I'm checking the GPX file now....and sorry...I got confused -- it was Dave who sent the other GPX file on 2015-04-19. My bad.

    Andy.
     
  9. Derek Cooper

    Derek Cooper Active Member

    Joined:
    Apr 28, 2014
    Messages:
    527
    Likes Received:
    34
    Hex 0A - how did you conclude that was Out1 again?

    Now I know why Tabb released the Alta - at times I wonder why we spend all this time tinkering...
     
  10. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,369
    Likes Received:
    1,162
    OK. In file 15042104.GPX with a date/time of 2015-04-21 15:16:19, here's the date for the FCFLAGS2:

    2015-04-21 14-16-19.png

    Look at the second byte of the FCFLAGS2 for row 65 (the row numbers are in the left-hand column) -- it's shown as 0x12. In binary that is 0001 0010. So OUTPUT 1 is false.

    In row 66, the value changes to 0x1a, which in binary is 0001 1010. So OUTPUT 1 goes true and stays true until row 81 (which is 7.8 seconds later, based on the GPS times shown in columns to the left (not the screen capture above)) when it becomes 0x12 again, which in binary is 0001 0010. I'm a bit surprised that OUTPUT 1 stays true for 7.8 seconds -- that seems a rather long time to trigger a shutter.

    Hope this helps.
    Andy.
     
  11. Dave King

    Dave King Well-Known Member

    Joined:
    Dec 24, 2012
    Messages:
    2,711
    Likes Received:
    311
    Andy & Derek
    Output 1's on time duration is determined by a combination of WP event in conjunction with how many LED's are checked for output 1. I believe Derek is setting most of the LED's on so if he would use a WP event of 100 and had 7 of the LED's lite the output would stay on for 7 seconds which is probably why he is seeing this.

    It took me about 2-3 reads over the same information on the wiki to understand how exactly the duration for each LED on the outputs work. Here's another example to make sure its clear:

    If you have WP event set to 0 it won't trigger the output. WP event = N X 10ms. So if WP event = 50, then each LED will stay active for 500 milliseconds.

    IF you had the LED's set like this
    On ON off on off on off off the output would trigger like this
    On for 1 second
    off for 0.5 second
    ON for 0.5 second
    off for 0.5 second
    on for 0.5 second
    off for 1 second

    If your LED's are set like this
    ON ON ON ON ON OFF OFF OFF with WP EVENT = 100 the output would sequence like this
    On for 5 seconds
    OFF for 3 seconds

    Conclusion: Set the on time just a little longer than the time needed to trigger your shutter on the camera. 1 second should do the job.
    So what you could do is this
    Set your LED's like following
    ON OFF OFF OFF OFF OFF OFF OFF with a WP event = 100
    The output sequence would like this
    On for one second
    OFF for 7 seconds
     
  12. Derek Cooper

    Derek Cooper Active Member

    Joined:
    Apr 28, 2014
    Messages:
    527
    Likes Received:
    34
    Wild... so that explains Holger's test for shutter triggering with 2.10.

    Thanks again Andy - don't know where we'd be without you around here! Put me down for oweing another case of find interior BC wine. Yum.

    POINTS_2.gif
     
  13. Derek Cooper

    Derek Cooper Active Member

    Joined:
    Apr 28, 2014
    Messages:
    527
    Likes Received:
    34
    Dave,

    Excellent catch! You're right, too many bit masks turned on. Will back them off and see what transpires.

    image002.png

    And for interest, here is how we setup the servo to trigger Out 1...

    image001.png

    We are flying another test Sunday to see if we can resolve the problem Dave's having - his setup isn't auto-triggering every X meters between waypoints. Will report back after Sunday's test flight.
     
  14. Dave King

    Dave King Well-Known Member

    Joined:
    Dec 24, 2012
    Messages:
    2,711
    Likes Received:
    311
    Derek

    I used the simulation mode this morning and hooked it up to the camera and it works. I believe my issues are solved. I will do a flight today.
     
  15. Jeff Scholl

    Jeff Scholl Distributor

    Joined:
    Jun 29, 2012
    Messages:
    240
    Likes Received:
    50
    I loaded up 2.10 on the MK gear yesterday and was able to pull off a simple 6 point WP flight with triggers at each Waypoint, and also every 5M for the last 2 points. I was using our GH3 with the trigger coming out of the FC TX1 pins. Each WP event was at 100 with only the first LED on and the the rest off. Also my focus was on manual which triggers immediately.

    Jeff
     
  16. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,369
    Likes Received:
    1,162
    It looks like Derek is using POTI8 to control the timing selected for the shutter trigger. If that's the case, the value of the POTI will control for how long the shutter is triggered.

    To which channel is POTI8 assigned, Derek? And is it a rotary, two, or three position switch?

    What follows is my understanding of the Wiki page -- if Dave or anyone else has different information, please correct what I've written so that we can get to the bottom of how the flight controller OUT1 really works.

    If you used just the so-called "LEDs" (a really bad name, they're NOT LEDs -- they're just red rectangles!), you read them from left to right. Each one corresponds to a delay of 200 milliseconds -- and the microcomputer continuously scans them from left to right....and then starts again...

    Here's the text from the Wiki -- unfortunately it is computer translated from the German with Siri doing the final edit :)

    Example with a fixed value

    In the upper picture the first box is clicked for Out1 bitmask and the remaining 7 are not. As time is to Out1 timing a 20 registered.​
    The number that is entered is multiplied each x10 [in 10ms]. This would then in 20 x 10ms 200ms switching time for each box One cycle (8x200ms) would take a total of 1600ms (1.6 seconds) until the switching process starts all over again. ​
    Is now for example an illumination connected it's like 200ms on, 1400ms off, 200ms on, 1400ms off, and so on.​
    (Info: 100 x 10ms = 1000ms = 1sec)​


    So each red rectangle, as Dave suggests, when it is "on" (bright red) means turn on OUT1 for 200 milliseconds (I don't think it's 500 per milliseconds per rectangle, Dave -- but I've not put a scope on it to measure it. Where did you get the 500 ms from, please? If you measured it, then the Wiki page is wrong).

    Reading from left to right, therefore, a pattern of On On On On Off Off Off Off means turn on for 200ms, 200ms, 200ms, 200ms-- a total of 800 milliseconds, then turn off OUT1 for 200, 200, 200, 200ms. Thus, if the Wiki page is to be believe, using the red rectangles, the maximum time you can specify what happens to OUT1 for each interval of 1.6 seconds (200 milliseconds x 8 red rectangles).

    But, if you use a potentiometer on the transmitter, the Wiki page says:

    With a potentiometer on the transmitter the value of 1 - 247 is set. So if the pot will be adjusted at the transmitter the adjusted value of each pot is shown as a number (time x 10ms) and the set accepted by flashing sequence runs faster or slower. This depends on the rotation of the potentiometer.​

    So it seems that, assuming the potentiometer can have a range of 1 - 247, then you can select a value from 1 x 10 milliseconds to 247 x 10 milliseconds -- in other words from 10 milliseconds to 2.47 seconds. As far as I can tell, if the potentiometer is set to a value of, say, 180, that means OUT1 would stay on for 180 x 10 milliseconds, 1.8 seconds, and then be off for the remainder of the 2.47 second time period.

    Let me know what I got wrong!


    Andy.
     
  17. Dave King

    Dave King Well-Known Member

    Joined:
    Dec 24, 2012
    Messages:
    2,711
    Likes Received:
    311
    Andy for waypoint triggering each LED for OUT1 is determined by the number you enter in the WAY POINT event in the WAYPOINT generator.
    If you have WP event set to 0 it won't trigger the output. WP event = N X 10ms. So if you enter a number such as WP event = 50, then each LED will stay active for 500 milliseconds, if WP event = 100 then each LED will stay active for 1 second and so forth.
     
  18. Dave King

    Dave King Well-Known Member

    Joined:
    Dec 24, 2012
    Messages:
    2,711
    Likes Received:
    311
    I was able to successful trigger the waypoints for every 25 meters in the waypoint flight. I also downloaded 2.10A and everything works great.
     
  19. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,369
    Likes Received:
    1,162

    Yeah....that's the piece I was missing! Thanks.
    For others reading this thread, check out: http://wiki.mikrokopter.de/en/WaypointEvent

    Andy.

     

Share This Page