wernerdaehn / CC3D-CableCam-Controller

CC3D and STM Cube based CableCam controller
Apache License 2.0
37 stars 15 forks source link

Deceleration problem #30

Open Willyfan opened 6 years ago

Willyfan commented 6 years ago

During some test on the rope, I found a little problem with deceleration near to the end points. I see this in autoplay, but it is the same if you drive the cablecam to end points at max speed. The problem is that the deceleration is not smooth, but a bit "choppy". I solved the problem rising the max allowed error parameters from 100 (default) to 300. Now the deceleration is smooth, but when the cablecam arrive to the end point speed is not zero (anyway is NEAR to zero) and it stop abruptly. My mind is that the calculation for deceleration have some kind of error, so, if allowed error is low the board try to adjust speed creating the "choppy" deceleration. When max error is higher, The deceleration go until the cablecam don't is on the end point, but because this error speed is not zero, so the board brake in order to don't go over the end point. My guess is that deceleration start too late, Or is less that we need. Maybe also cablecam inertia do something, anyway, is not possible to have a parameter for "anticipate" a bit the deceleration? Just for debug...

Willyfan commented 6 years ago

Ok. Now is raining a lot, so i can do test as it finish... Anyway, as yopu can see, the position is not more from zero and value around it (before I had from 0 to 1700) but is at -650000 or so. I don't know what happen.

IMPORTANT NOTE: as my rope is not so long, the deceleration start before that the camera was at max speed, or, to say better, before that stick arrive to 100%. In both cases, the stick is around 0.650 when endpoint brake start. But there is an inconsistence: when brake start, the calculated brake distance is around 540, in both cases. But, if you see how much distance the camera had traveled (-658426 - (-659609)) results is 1183 pulses. In acceleration, so is not a inertia problem. What I mean is that with this acceleration and deceleretion setting it need almost the same pulses to stop, and not 540 that is half of this. I don't understand where is the conceptual problem, But I'm pretty sure that is this.

wernerdaehn commented 6 years ago

So you are saying the distance calculation is wrong? By a factor of two? Let's go into the math with this line: braking distance= abs( -0.607[%] ) / 0.266[%/s] * 363.636[steps/s] / 2 = 421.818

The stick is at 0.607 and can change by 0.266 per second. Therefore it takes 0.607/0.266=2.3s for the stick to go to zero.

The actual speed is 363steps/s. The distance covered when braking to zero within 2.3s is 3632.3/2=414steps. s=vt/2.

https://www.lernhelfer.de/sites/default/files/lexicon/image/BWS-PHY-0261-07.gif

Willyfan commented 6 years ago

I agree with math, but please take a look to the log. We have 121 lines - 121 cycles - around 2 second and half. In this time or in this cycles the algorithm raise the stick from 0 to 644, and the camera travel 1180 pulse. Very important this value, remember it. You can see that every cycle the stick raise around 0,005. And it is correct, as 0,644/121 is 5,3. So, your math is correct because it need the same time, 2,5 second, to go to zero. But... for you the speed is 374,636 pulse/sec, And your calculation is based on it. But from zero to 0,644 (stick value) the camera traveled for 1180 pulse in 121 cycles, the final speed is not 374 pulse for second. Is impossible, because we have the ramp also in acceleration, so our speed (when brake engage) is (1180 X 2 /121)*50 = 975 pulse per second. Always with same math... but in reverse calculation. So, maybe the problem is the evaluation of speed?

Willyfan commented 6 years ago

it is obvious that if the camera reaches the maximum speed and runs a stretch at that speed all this calculation does not work, but we are lucky because in this case the brake engage while the camera is still accelerating.

Willyfan commented 6 years ago

Sorry, I read a bad value, when brake start the evaluate speed is 444 pulse/sec. Always half of right value... (right for me, please tell me if I'm in wrong way)

wernerdaehn commented 6 years ago

I would raise two points:

  1. The absolute value of the speed does not matter as it is normalized by time and calculated via the pos sensor. What I mean with that is, according to the stick position it shall take 4 seconds to get to a speed of zero. Now let's assume with your pos sensor the speed would be 1000steps/s, with mine it is 500steps/s. Therefore your distance to travel would be 1000.0*4.0/2=2000steps. With mine it is 500.0*4.0/2=1000steps. So either I travel half your speed and then the deceleration would be just half as well. Or we drive equally fast and I jave twice as many hall pulses, hence the deceleration would be the same just the unit of distance is different. Either way, it is not the steps that count, it is solely the time.
  2. Look at the speed readings. The values go up and down, these are odd numbers and worse, assuming we have on printout of the debug message per cycle, I can calculate the speed based on the pos change: pos(n) - pos(n-1) = delta_pos_per_0.02s; Hence (pos(n) - pos(n-1))*50 = speed/sec. This value is approx. twice as high as the shown speed. My conclusion is, the speed measurement via the interrup does not work. Hence I have disabled it and go via the pos changes only.
Willyfan commented 6 years ago

I agree with point 1. What I mean is that if value of speed is wrong, also time to stop is wrong, because brake start too late. Anyway, If you get the last 2 position value in my log, you see that difference is 20 pulse, so the speed should be 20*50=1000 pulse/sec, not so different from my calculation before (975). Maybe that use pos change is ok. But please don't remove the debug because I remember a problem before you change speed measurament.

wernerdaehn commented 6 years ago

??? The last two positions in your log are -659575 and -659588, so 13 steps apart. The other thing I noticed during debugging is that the prints happen every 50ms, so just 20 times per second. Hence 13*20=260steps/s and your log says 255 as speed.

I also checked again the two types of speeds and both look okay and within the same range. See for yourself with $p, the last two numbers. They are speed by pos_diff and speed by time_diff.

Startpoint emergency brake on. pos-brakedistance= -659575.000 - 235.000 = -659810.000 < -659592.000, braking distance= abs( -0.490[%] ) / 0.266[%/s] * 250.000[steps/s] / 2 = 235.000
Startpoint emergency brake on. pos-brakedistance= -659588.000 - 206.667 = -659794.688 < -659592.000, braking distance= abs( -0.485[%] ) / 0.266[%/s] * 222.222[steps/s] / 2 = 206.667

Even the loop time of 50ms versus the execpted 20ms does not matter as I actually do the calculations per loop. The times 50 (or times 20) is just for viewing.

Willyfan commented 6 years ago

I mean last two position before brake. Is 20 point different, 659113 and 659093. In that moment speed is around 1000 pulse per second, and it is right...

wernerdaehn commented 6 years ago

Okay

pos= -659073 speed=400.000[steps/s]
pos= -659093 speed=400.000[steps/s]

Within one cycle the delta_pos=20. Therefore the speed=20steps/cycle. Under the assumption that we run 50 cycles per second, the speed would be 1000steps/s, not 400. Just as you said.

The stick is at -0.644[%] and the acceleration is 0.266[%/s] which means 0.00532%/cycle. Hence it takes 121 cycles to get to zero. Brakedistance = 20steps/cycle * 121cycles / 2 = 1210steps. My calculation shows 480 because it is based on the speed=400.

In the next cycles the stick is

-0.639[%]  
-0.634[%]
-0.628[%]

Assuming that this is per cycle, it is the required reduction by 0.00532%/cycle. So that is correct.

Summary: The speed per pos_diff is wrong. Before I calculated the speed simply by the difference between previous and current position. That has the problem that the resolution is just 1step per cycle. What if the speed is so low that it takes two cycles for one step? I wanted to capture that and therefore divide the diff by the number of cycles between pos changes. I went though it five times now and cannot spot the issue. Will debug it further.

Thanks for your help, well done!

Willyfan commented 6 years ago

A stupid idea: use more cycles for speed calculation? Last 2 or 3? Or, a better solution, put more magnets on the reel? Or an encoder with more resolution? I just designed a board for a AS5047p, same chip I want use on vesc, Maybe is useful for cablecam?

Willyfan commented 6 years ago

Another way, suitable with vesc. During cablecam setup, we move it on the rope at a high speed for some meters. So, we can automatically calculate ratio from erpm and pulse/meters. We can save this parameter, and use the erpm speed of the motor when speed read from hall sensor fall down under a threshold, for example 15 or 20 pulse/cycle or less. As the camera travel at low speed, I think that there are no inertia problem.

Willyfan commented 6 years ago

Is impossible to read the frequency of input pulse from our hall sensor?

Willyfan commented 6 years ago

Hi Werner, I seen that the firmware uploaded is sligtly different in dimension respect to that I downloaded yesterday for test. I will try (as you reverted the calciulation of speed at pos only). Please confirm me.

wernerdaehn commented 6 years ago

I would like for you to wait until I found the speed calculation issue. Will try to fix it by end of today.

Willyfan notifications@github.com schrieb am Do., 23. Aug. 2018 um 16:19 Uhr:

Hi Werner, I seen that the firmware uploaded is sligtly different in dimension respect to that I downloaded yesterday for test. I will try (as you reverted the calciulation of speed at pos only). Please confirm me.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wernerdaehn/CC3D-CableCam-Controller/issues/30#issuecomment-415431426, or mute the thread https://github.com/notifications/unsubscribe-auth/AM-jVzSWyCBBXFRv_kfrN8Fp0lVJM90yks5uTroMgaJpZM4V5eZy .

Willyfan commented 6 years ago

ok

wernerdaehn commented 6 years ago

I can't find the error because there is none. I just ran a test where I output every single position information and the speed is correct. So yes, please try with the currently available firmware, the one that is using the pos difference only.

Meanwhile I will make code changes to reduce the variability in the speed measurements. The root cause of that is due to the fact we do not run the code at 50Hz but less.

wernerdaehn commented 6 years ago

The reason why the speed by interval did not work is obvious. I assumed a fixed interval of 20ms while it actually is 50ms. I can't calculate the speed by dividing the interval between two hall sensor pulses by 20ms to get to speed per cycle, I need to dived it by the actual cycle time.

Willyfan commented 6 years ago

Ok, done test. Now the deceleration start at right point, in the mid of the rope. But there is something worng, not in calculation but in brake. The camera stop and go stop and go... I upload a video for this, here two logs, to rigt and to left. I don't see difference. Please note: If I release the stick at mid of the rope, camera stop very smootly and not jump.

pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.005[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.010[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.015[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.020[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.025[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.030[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.035[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.040[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.045[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.050[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.055[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.060[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.064[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.069[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.074[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.079[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.084[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.089[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.094[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.099[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 48.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( 0.104[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 49.000 brakedistance= 0.014 start= 48.000 end= 1679.000, braking distance= abs( 0.109[%] ) / 0.248[%/s] * 0.061[steps/s] / 2 = 0.014
pos= 51.000 brakedistance= 23.000 start= 48.000 end= 1679.000, braking distance= abs( 0.114[%] ) / 0.248[%/s] * 100.000[steps/s] / 2 = 23.000
pos= 53.000 brakedistance= 24.000 start= 48.000 end= 1679.000, braking distance= abs( 0.119[%] ) / 0.248[%/s] * 100.000[steps/s] / 2 = 24.000
pos= 56.000 brakedistance= 37.500 start= 48.000 end= 1679.000, braking distance= abs( 0.124[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 37.500
pos= 59.000 brakedistance= 39.000 start= 48.000 end= 1679.000, braking distance= abs( 0.129[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 39.000
pos= 62.000 brakedistance= 40.500 start= 48.000 end= 1679.000, braking distance= abs( 0.134[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 40.500
pos= 66.000 brakedistance= 56.000 start= 48.000 end= 1679.000, braking distance= abs( 0.139[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 56.000
pos= 69.000 brakedistance= 43.500 start= 48.000 end= 1679.000, braking distance= abs( 0.144[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 43.500
pos= 73.000 brakedistance= 60.000 start= 48.000 end= 1679.000, braking distance= abs( 0.149[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 60.000
pos= 77.000 brakedistance= 62.000 start= 48.000 end= 1679.000, braking distance= abs( 0.154[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 62.000
pos= 81.000 brakedistance= 64.000 start= 48.000 end= 1679.000, braking distance= abs( 0.159[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 64.000
pos= 85.000 brakedistance= 66.000 start= 48.000 end= 1679.000, braking distance= abs( 0.164[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 66.000
pos= 89.000 brakedistance= 68.000 start= 48.000 end= 1679.000, braking distance= abs( 0.169[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 68.000
pos= 94.000 brakedistance= 87.500 start= 48.000 end= 1679.000, braking distance= abs( 0.174[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 87.500
pos= 98.000 brakedistance= 72.000 start= 48.000 end= 1679.000, braking distance= abs( 0.179[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 72.000
pos= 103.000 brakedistance= 92.500 start= 48.000 end= 1679.000, braking distance= abs( 0.184[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 92.500
pos= 108.000 brakedistance= 95.000 start= 48.000 end= 1679.000, braking distance= abs( 0.188[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 95.000
pos= 114.000 brakedistance= 117.000 start= 48.000 end= 1679.000, braking distance= abs( 0.193[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 117.000
pos= 119.000 brakedistance= 100.000 start= 48.000 end= 1679.000, braking distance= abs( 0.198[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 100.000
pos= 124.000 brakedistance= 102.500 start= 48.000 end= 1679.000, braking distance= abs( 0.203[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 102.500
pos= 130.000 brakedistance= 126.000 start= 48.000 end= 1679.000, braking distance= abs( 0.208[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 126.000
pos= 136.000 brakedistance= 129.000 start= 48.000 end= 1679.000, braking distance= abs( 0.213[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 129.000
pos= 142.000 brakedistance= 132.000 start= 48.000 end= 1679.000, braking distance= abs( 0.218[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 132.000
pos= 148.000 brakedistance= 135.000 start= 48.000 end= 1679.000, braking distance= abs( 0.223[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 135.000
pos= 154.000 brakedistance= 138.000 start= 48.000 end= 1679.000, braking distance= abs( 0.228[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 138.000
pos= 160.000 brakedistance= 141.000 start= 48.000 end= 1679.000, braking distance= abs( 0.233[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 141.000
pos= 166.000 brakedistance= 144.000 start= 48.000 end= 1679.000, braking distance= abs( 0.238[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 144.000
pos= 173.000 brakedistance= 171.500 start= 48.000 end= 1679.000, braking distance= abs( 0.243[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 171.500
pos= 180.000 brakedistance= 175.000 start= 48.000 end= 1679.000, braking distance= abs( 0.248[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 175.000
pos= 186.000 brakedistance= 153.000 start= 48.000 end= 1679.000, braking distance= abs( 0.253[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 153.000
pos= 194.000 brakedistance= 208.000 start= 48.000 end= 1679.000, braking distance= abs( 0.258[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 208.000
pos= 201.000 brakedistance= 185.500 start= 48.000 end= 1679.000, braking distance= abs( 0.263[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 185.500
pos= 208.000 brakedistance= 189.000 start= 48.000 end= 1679.000, braking distance= abs( 0.268[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 189.000
pos= 216.000 brakedistance= 220.000 start= 48.000 end= 1679.000, braking distance= abs( 0.273[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 220.000
pos= 223.000 brakedistance= 196.000 start= 48.000 end= 1679.000, braking distance= abs( 0.278[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 196.000
pos= 231.000 brakedistance= 228.000 start= 48.000 end= 1679.000, braking distance= abs( 0.283[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 228.000
pos= 239.000 brakedistance= 232.000 start= 48.000 end= 1679.000, braking distance= abs( 0.288[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 232.000
pos= 248.000 brakedistance= 265.500 start= 48.000 end= 1679.000, braking distance= abs( 0.293[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 265.500
pos= 255.000 brakedistance= 210.000 start= 48.000 end= 1679.000, braking distance= abs( 0.298[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 210.000
pos= 264.000 brakedistance= 274.500 start= 48.000 end= 1679.000, braking distance= abs( 0.303[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 274.500
pos= 272.000 brakedistance= 248.000 start= 48.000 end= 1679.000, braking distance= abs( 0.308[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 248.000
pos= 281.000 brakedistance= 283.500 start= 48.000 end= 1679.000, braking distance= abs( 0.312[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 283.500
pos= 290.000 brakedistance= 288.000 start= 48.000 end= 1679.000, braking distance= abs( 0.317[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 288.000
pos= 298.000 brakedistance= 260.000 start= 48.000 end= 1679.000, braking distance= abs( 0.322[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 260.000
pos= 308.000 brakedistance= 330.000 start= 48.000 end= 1679.000, braking distance= abs( 0.327[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 330.000
pos= 316.000 brakedistance= 268.000 start= 48.000 end= 1679.000, braking distance= abs( 0.332[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 268.000
pos= 326.000 brakedistance= 340.000 start= 48.000 end= 1679.000, braking distance= abs( 0.337[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 340.000
pos= 336.000 brakedistance= 345.000 start= 48.000 end= 1679.000, braking distance= abs( 0.342[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 345.000
pos= 346.000 brakedistance= 350.000 start= 48.000 end= 1679.000, braking distance= abs( 0.347[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 350.000
pos= 355.000 brakedistance= 319.500 start= 48.000 end= 1679.000, braking distance= abs( 0.352[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 319.500
pos= 365.000 brakedistance= 360.000 start= 48.000 end= 1679.000, braking distance= abs( 0.357[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 360.000
pos= 375.000 brakedistance= 365.000 start= 48.000 end= 1679.000, braking distance= abs( 0.362[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 365.000
pos= 386.000 brakedistance= 407.000 start= 48.000 end= 1679.000, braking distance= abs( 0.367[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 407.000
pos= 396.000 brakedistance= 375.000 start= 48.000 end= 1679.000, braking distance= abs( 0.372[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 375.000
pos= 406.000 brakedistance= 380.000 start= 48.000 end= 1679.000, braking distance= abs( 0.377[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 380.000
pos= 417.000 brakedistance= 423.500 start= 48.000 end= 1679.000, braking distance= abs( 0.382[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 423.500
pos= 428.000 brakedistance= 429.000 start= 48.000 end= 1679.000, braking distance= abs( 0.387[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 429.000
pos= 439.000 brakedistance= 434.500 start= 48.000 end= 1679.000, braking distance= abs( 0.392[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 434.500
pos= 450.000 brakedistance= 440.000 start= 48.000 end= 1679.000, braking distance= abs( 0.397[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 440.000
pos= 461.000 brakedistance= 445.500 start= 48.000 end= 1679.000, braking distance= abs( 0.402[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 445.500
pos= 472.000 brakedistance= 451.000 start= 48.000 end= 1679.000, braking distance= abs( 0.407[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 451.000
pos= 484.000 brakedistance= 498.000 start= 48.000 end= 1679.000, braking distance= abs( 0.412[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 498.000
pos= 495.000 brakedistance= 462.000 start= 48.000 end= 1679.000, braking distance= abs( 0.417[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 462.000
pos= 507.000 brakedistance= 510.000 start= 48.000 end= 1679.000, braking distance= abs( 0.422[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 510.000
pos= 518.000 brakedistance= 473.000 start= 48.000 end= 1679.000, braking distance= abs( 0.427[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 473.000
pos= 530.000 brakedistance= 522.000 start= 48.000 end= 1679.000, braking distance= abs( 0.432[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 522.000
pos= 542.000 brakedistance= 528.000 start= 48.000 end= 1679.000, braking distance= abs( 0.436[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 528.000
pos= 555.000 brakedistance= 578.500 start= 48.000 end= 1679.000, braking distance= abs( 0.441[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 578.500
pos= 568.000 brakedistance= 585.000 start= 48.000 end= 1679.000, braking distance= abs( 0.446[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 585.000
pos= 580.000 brakedistance= 546.000 start= 48.000 end= 1679.000, braking distance= abs( 0.451[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 546.000
pos= 593.000 brakedistance= 598.000 start= 48.000 end= 1679.000, braking distance= abs( 0.456[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 598.000
pos= 606.000 brakedistance= 604.500 start= 48.000 end= 1679.000, braking distance= abs( 0.461[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 604.500
pos= 618.000 brakedistance= 564.000 start= 48.000 end= 1679.000, braking distance= abs( 0.466[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 564.000
pos= 632.000 brakedistance= 665.000 start= 48.000 end= 1679.000, braking distance= abs( 0.471[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 665.000
pos= 646.000 brakedistance= 672.000 start= 48.000 end= 1679.000, braking distance= abs( 0.476[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 672.000
pos= 659.000 brakedistance= 630.500 start= 48.000 end= 1679.000, braking distance= abs( 0.481[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 630.500
pos= 672.000 brakedistance= 637.000 start= 48.000 end= 1679.000, braking distance= abs( 0.486[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 637.000
pos= 686.000 brakedistance= 693.000 start= 48.000 end= 1679.000, braking distance= abs( 0.491[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 693.000
pos= 700.000 brakedistance= 700.000 start= 48.000 end= 1679.000, braking distance= abs( 0.496[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 700.000
pos= 714.000 brakedistance= 707.000 start= 48.000 end= 1679.000, braking distance= abs( 0.501[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 707.000
pos= 728.000 brakedistance= 714.000 start= 48.000 end= 1679.000, braking distance= abs( 0.506[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 714.000
pos= 743.000 brakedistance= 772.500 start= 48.000 end= 1679.000, braking distance= abs( 0.511[%] ) / 0.248[%/s] * 750.000[steps/s] / 2 = 772.500
pos= 757.000 brakedistance= 728.000 start= 48.000 end= 1679.000, braking distance= abs( 0.516[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 728.000
pos= 772.000 brakedistance= 787.500 start= 48.000 end= 1679.000, braking distance= abs( 0.521[%] ) / 0.248[%/s] * 750.000[steps/s] / 2 = 787.500
pos= 787.000 brakedistance= 795.000 start= 48.000 end= 1679.000, braking distance= abs( 0.526[%] ) / 0.248[%/s] * 750.000[steps/s] / 2 = 795.000
pos= 802.000 brakedistance= 802.500 start= 48.000 end= 1679.000, braking distance= abs( 0.531[%] ) / 0.248[%/s] * 750.000[steps/s] / 2 = 802.500
pos= 817.000 brakedistance= 810.000 start= 48.000 end= 1679.000, braking distance= abs( 0.536[%] ) / 0.248[%/s] * 750.000[steps/s] / 2 = 810.000
pos= 832.000 brakedistance= 817.500 start= 48.000 end= 1679.000, braking distance= abs( 0.541[%] ) / 0.248[%/s] * 750.000[steps/s] / 2 = 817.500
Endpoint brake on  pos + brakedistance= 848.000 + 880.000 = 1728.000 > 1679.000, braking distance= abs( 0.536[%] ) / 0.248[%/s] * 800.000[steps/s] / 2 = 880.000
pos= 848.000 brakedistance= 880.000 start= 48.000 end= 1679.000, braking distance= abs( 0.536[%] ) / 0.248[%/s] * 800.000[steps/s] / 2 = 880.000
Endpoint emergency pos + brakedistance= 880.000 + 1744.000 = 2624.000 > 1679.000, braking distance= abs( 0.531[%] ) / 0.248[%/s] * 1600.000[steps/s] / 2 = 1744.000
Endpoint emergency pos + brakedistance= 897.000 + 918.000 = 1815.000 > 1679.000, braking distance= abs( 0.526[%] ) / 0.248[%/s] * 850.000[steps/s] / 2 = 918.000
Endpoint emergency pos + brakedistance= 914.000 + 909.500 = 1823.500 > 1679.000, braking distance= abs( 0.521[%] ) / 0.248[%/s] * 850.000[steps/s] / 2 = 909.500
Endpoint brake on  pos + brakedistance= 930.000 + 848.000 = 1778.000 > 1679.000, braking distance= abs( 0.516[%] ) / 0.248[%/s] * 800.000[steps/s] / 2 = 848.000
pos= 942.000 brakedistance= 630.000 start= 48.000 end= 1679.000, braking distance= abs( 0.521[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 630.000
pos= 954.000 brakedistance= 636.000 start= 48.000 end= 1679.000, braking distance= abs( 0.526[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 636.000
pos= 967.000 brakedistance= 695.500 start= 48.000 end= 1679.000, braking distance= abs( 0.531[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 695.500
Endpoint brake on  pos + brakedistance= 980.000 + 702.000 = 1682.000 > 1679.000, braking distance= abs( 0.526[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 702.000
Endpoint brake on  pos + brakedistance= 994.000 + 749.000 = 1743.000 > 1679.000, braking distance= abs( 0.521[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 749.000
Endpoint emergency pos + brakedistance= 1009.000 + 795.000 = 1804.000 > 1679.000, braking distance= abs( 0.516[%] ) / 0.248[%/s] * 750.000[steps/s] / 2 = 795.000
Endpoint emergency pos + brakedistance= 1025.000 + 840.000 = 1865.000 > 1679.000, braking distance= abs( 0.511[%] ) / 0.248[%/s] * 800.000[steps/s] / 2 = 840.000
Endpoint brake on  pos + brakedistance= 1039.000 + 728.000 = 1767.000 > 1679.000, braking distance= abs( 0.506[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 728.000
pos= 1051.000 brakedistance= 618.000 start= 48.000 end= 1679.000, braking distance= abs( 0.511[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 618.000
pos= 1062.000 brakedistance= 572.000 start= 48.000 end= 1679.000, braking distance= abs( 0.516[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 572.000
pos= 1073.000 brakedistance= 577.500 start= 48.000 end= 1679.000, braking distance= abs( 0.521[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 577.500
Endpoint brake on  pos + brakedistance= 1085.000 + 636.000 = 1721.000 > 1679.000, braking distance= abs( 0.516[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 636.000
Endpoint emergency pos + brakedistance= 1099.000 + 735.000 = 1834.000 > 1679.000, braking distance= abs( 0.511[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 735.000
Endpoint emergency pos + brakedistance= 1114.000 + 780.000 = 1894.000 > 1679.000, braking distance= abs( 0.506[%] ) / 0.248[%/s] * 750.000[steps/s] / 2 = 780.000
Endpoint emergency pos + brakedistance= 1129.000 + 772.500 = 1901.500 > 1679.000, braking distance= abs( 0.501[%] ) / 0.248[%/s] * 750.000[steps/s] / 2 = 772.500
Endpoint emergency pos + brakedistance= 1142.000 + 663.000 = 1805.000 > 1679.000, braking distance= abs( 0.496[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 663.000
Endpoint brake on  pos + brakedistance= 1153.000 + 555.500 = 1708.500 > 1679.000, braking distance= abs( 0.491[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 555.500
pos= 1163.000 brakedistance= 500.000 start= 48.000 end= 1679.000, braking distance= abs( 0.496[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 500.000
pos= 1170.000 brakedistance= 353.500 start= 48.000 end= 1679.000, braking distance= abs( 0.501[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 353.500
pos= 1179.000 brakedistance= 459.000 start= 48.000 end= 1679.000, braking distance= abs( 0.506[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 459.000
Endpoint brake on  pos + brakedistance= 1190.000 + 566.500 = 1756.500 > 1679.000, braking distance= abs( 0.501[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 566.500
Endpoint emergency pos + brakedistance= 1204.000 + 714.000 = 1918.000 > 1679.000, braking distance= abs( 0.496[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 714.000
Endpoint emergency pos + brakedistance= 1218.000 + 707.000 = 1925.000 > 1679.000, braking distance= abs( 0.491[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 707.000
Endpoint emergency pos + brakedistance= 1232.000 + 700.000 = 1932.000 > 1679.000, braking distance= abs( 0.486[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 700.000
Endpoint emergency pos + brakedistance= 1244.000 + 594.000 = 1838.000 > 1679.000, braking distance= abs( 0.481[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 594.000
Endpoint emergency pos + brakedistance= 1255.000 + 539.000 = 1794.000 > 1679.000, braking distance= abs( 0.476[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 539.000
Endpoint brake on  pos + brakedistance= 1264.000 + 436.500 = 1700.500 > 1679.000, braking distance= abs( 0.471[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 436.500
pos= 1269.000 brakedistance= 240.000 start= 48.000 end= 1679.000, braking distance= abs( 0.476[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 240.000
pos= 1274.000 brakedistance= 242.500 start= 48.000 end= 1679.000, braking distance= abs( 0.481[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 242.500
pos= 1280.000 brakedistance= 294.000 start= 48.000 end= 1679.000, braking distance= abs( 0.486[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 294.000
pos= 1287.000 brakedistance= 346.500 start= 48.000 end= 1679.000, braking distance= abs( 0.491[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 346.500
Endpoint emergency pos + brakedistance= 1297.000 + 500.000 = 1797.000 > 1679.000, braking distance= abs( 0.486[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 500.000
Endpoint emergency pos + brakedistance= 1310.000 + 643.500 = 1953.500 > 1679.000, braking distance= abs( 0.481[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 643.500
Endpoint emergency pos + brakedistance= 1322.000 + 588.000 = 1910.000 > 1679.000, braking distance= abs( 0.476[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 588.000
Endpoint emergency pos + brakedistance= 1334.000 + 582.000 = 1916.000 > 1679.000, braking distance= abs( 0.471[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 582.000
Endpoint emergency pos + brakedistance= 1344.000 + 480.000 = 1824.000 > 1679.000, braking distance= abs( 0.466[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 480.000
Endpoint brake on  pos + brakedistance= 1351.000 + 332.500 = 1683.500 > 1679.000, braking distance= abs( 0.461[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 332.500
pos= 1356.000 brakedistance= 235.000 start= 48.000 end= 1679.000, braking distance= abs( 0.466[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 235.000
pos= 1359.000 brakedistance= 142.500 start= 48.000 end= 1679.000, braking distance= abs( 0.471[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 142.500
pos= 1365.000 brakedistance= 288.000 start= 48.000 end= 1679.000, braking distance= abs( 0.476[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 288.000
Endpoint brake on  pos + brakedistance= 1372.000 + 339.500 = 1711.500 > 1679.000, braking distance= abs( 0.471[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 339.500
Endpoint emergency pos + brakedistance= 1382.000 + 480.000 = 1862.000 > 1679.000, braking distance= abs( 0.466[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 480.000
Endpoint emergency pos + brakedistance= 1394.000 + 570.000 = 1964.000 > 1679.000, braking distance= abs( 0.461[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 570.000
Endpoint emergency pos + brakedistance= 1406.000 + 564.000 = 1970.000 > 1679.000, braking distance= abs( 0.456[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 564.000
Endpoint emergency pos + brakedistance= 1418.000 + 558.000 = 1976.000 > 1679.000, braking distance= abs( 0.451[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 558.000
Endpoint emergency pos + brakedistance= 1427.000 + 414.000 = 1841.000 > 1679.000, braking distance= abs( 0.446[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 414.000
Endpoint brake on  pos + brakedistance= 1433.000 + 273.000 = 1706.000 > 1679.000, braking distance= abs( 0.441[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 273.000
pos= 1437.000 brakedistance= 180.000 start= 48.000 end= 1679.000, braking distance= abs( 0.446[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 180.000
pos= 1440.000 brakedistance= 136.500 start= 48.000 end= 1679.000, braking distance= abs( 0.451[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 136.500
Endpoint brake on  pos + brakedistance= 1446.000 + 276.000 = 1722.000 > 1679.000, braking distance= abs( 0.446[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 276.000
Endpoint brake on  pos + brakedistance= 1453.000 + 318.500 = 1771.500 > 1679.000, braking distance= abs( 0.441[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 318.500
Endpoint emergency pos + brakedistance= 1463.000 + 450.000 = 1913.000 > 1679.000, braking distance= abs( 0.436[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 450.000
Endpoint emergency pos + brakedistance= 1474.000 + 489.500 = 1963.500 > 1679.000, braking distance= abs( 0.432[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 489.500
Endpoint emergency pos + brakedistance= 1486.000 + 528.000 = 2014.000 > 1679.000, braking distance= abs( 0.427[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 528.000
Endpoint emergency pos + brakedistance= 1496.000 + 435.000 = 1931.000 > 1679.000, braking distance= abs( 0.422[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 435.000
Endpoint emergency pos + brakedistance= 1505.000 + 387.000 = 1892.000 > 1679.000, braking distance= abs( 0.417[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 387.000
Endpoint brake on  pos + brakedistance= 1511.000 + 255.000 = 1766.000 > 1679.000, braking distance= abs( 0.412[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 255.000
pos= 1514.000 brakedistance= 126.000 start= 48.000 end= 1679.000, braking distance= abs( 0.417[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 126.000
pos= 1517.000 brakedistance= 127.500 start= 48.000 end= 1679.000, braking distance= abs( 0.422[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 127.500
Endpoint brake on  pos + brakedistance= 1521.000 + 172.000 = 1693.000 > 1679.000, braking distance= abs( 0.417[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 172.000
Endpoint emergency pos + brakedistance= 1528.000 + 297.500 = 1825.500 > 1679.000, braking distance= abs( 0.412[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 297.500
Endpoint emergency pos + brakedistance= 1538.000 + 420.000 = 1958.000 > 1679.000, braking distance= abs( 0.407[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 420.000
Endpoint emergency pos + brakedistance= 1548.000 + 415.000 = 1963.000 > 1679.000, braking distance= abs( 0.402[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 415.000
Endpoint emergency pos + brakedistance= 1556.000 + 328.000 = 1884.000 > 1679.000, braking distance= abs( 0.397[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 328.000
Endpoint emergency pos + brakedistance= 1563.000 + 283.500 = 1846.500 > 1679.000, braking distance= abs( 0.392[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 283.500
Endpoint brake on  pos + brakedistance= 1566.000 + 120.000 = 1686.000 > 1679.000, braking distance= abs( 0.387[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 120.000
pos= 1568.000 brakedistance= 79.000 start= 48.000 end= 1679.000, braking distance= abs( 0.392[%] ) / 0.248[%/s] * 100.000[steps/s] / 2 = 79.000
pos= 1570.000 brakedistance= 80.000 start= 48.000 end= 1679.000, braking distance= abs( 0.397[%] ) / 0.248[%/s] * 100.000[steps/s] / 2 = 80.000
Endpoint brake on  pos + brakedistance= 1574.000 + 162.000 = 1736.000 > 1679.000, braking distance= abs( 0.392[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 162.000
Endpoint emergency pos + brakedistance= 1580.000 + 240.000 = 1820.000 > 1679.000, braking distance= abs( 0.387[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 240.000
Endpoint emergency pos + brakedistance= 1589.000 + 355.500 = 1944.500 > 1679.000, braking distance= abs( 0.382[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 355.500
Endpoint emergency pos + brakedistance= 1598.000 + 351.000 = 1949.000 > 1679.000, braking distance= abs( 0.377[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 351.000
Endpoint emergency pos + brakedistance= 1606.000 + 308.000 = 1914.000 > 1679.000, braking distance= abs( 0.372[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 308.000
Endpoint brake on  pos + brakedistance= 1610.000 + 152.000 = 1762.000 > 1679.000, braking distance= abs( 0.367[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 152.000
Endpoint brake on  pos + brakedistance= 1612.000 + 75.000 = 1687.000 > 1679.000, braking distance= abs( 0.362[%] ) / 0.248[%/s] * 100.000[steps/s] / 2 = 75.000
Endpoint brake on  pos + brakedistance= 1615.000 + 111.000 = 1726.000 > 1679.000, braking distance= abs( 0.357[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 111.000
Endpoint emergency pos + brakedistance= 1620.000 + 182.500 = 1802.500 > 1679.000, braking distance= abs( 0.352[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 182.500
Endpoint emergency pos + brakedistance= 1627.000 + 252.000 = 1879.000 > 1679.000, braking distance= abs( 0.347[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 252.000
Endpoint emergency pos + brakedistance= 1634.000 + 248.500 = 1882.500 > 1679.000, braking distance= abs( 0.342[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 248.500
Endpoint emergency pos + brakedistance= 1639.000 + 175.000 = 1814.000 > 1679.000, braking distance= abs( 0.337[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 175.000
Endpoint brake on  pos + brakedistance= 1642.000 + 103.500 = 1745.500 > 1679.000, braking distance= abs( 0.332[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 103.500
pos= 1643.000 brakedistance= 34.000 start= 48.000 end= 1679.000, braking distance= abs( 0.337[%] ) / 0.248[%/s] * 50.000[steps/s] / 2 = 34.000
Endpoint brake on  pos + brakedistance= 1645.000 + 69.000 = 1714.000 > 1679.000, braking distance= abs( 0.332[%] ) / 0.248[%/s] * 100.000[steps/s] / 2 = 69.000
Endpoint emergency pos + brakedistance= 1650.000 + 170.000 = 1820.000 > 1679.000, braking distance= abs( 0.327[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 170.000
Endpoint emergency pos + brakedistance= 1656.000 + 201.000 = 1857.000 > 1679.000, braking distance= abs( 0.322[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 201.000
Endpoint emergency pos + brakedistance= 1662.000 + 198.000 = 1860.000 > 1679.000, braking distance= abs( 0.317[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 198.000
Endpoint emergency pos + brakedistance= 1666.000 + 130.000 = 1796.000 > 1679.000, braking distance= abs( 0.312[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 130.000
Endpoint brake on  pos + brakedistance= 1668.000 + 64.000 = 1732.000 > 1679.000, braking distance= abs( 0.308[%] ) / 0.248[%/s] * 100.000[steps/s] / 2 = 64.000
Endpoint brake on  pos + brakedistance= 1669.000 + 31.500 = 1700.500 > 1679.000, braking distance= abs( 0.303[%] ) / 0.248[%/s] * 50.000[steps/s] / 2 = 31.500
Endpoint brake on  pos + brakedistance= 1670.000 + 31.000 = 1701.000 > 1679.000, braking distance= abs( 0.298[%] ) / 0.248[%/s] * 50.000[steps/s] / 2 = 31.000
Endpoint emergency pos + brakedistance= 1674.000 + 122.000 = 1796.000 > 1679.000, braking distance= abs( 0.293[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 122.000

to left:

pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.005[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.010[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.015[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.020[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.025[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.030[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.035[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.040[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.045[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.050[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.055[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.060[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.064[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.069[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.074[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.079[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.084[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.089[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.094[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1690.000 brakedistance= 0.000 start= 48.000 end= 1679.000, braking distance= abs( -0.099[%] ) / 0.248[%/s] * 0.000[steps/s] / 2 = 0.000
pos= 1689.000 brakedistance= 0.006 start= 48.000 end= 1679.000, braking distance= abs( -0.104[%] ) / 0.248[%/s] * 0.028[steps/s] / 2 = 0.006
pos= 1688.000 brakedistance= 11.000 start= 48.000 end= 1679.000, braking distance= abs( -0.109[%] ) / 0.248[%/s] * 50.000[steps/s] / 2 = 11.000
pos= 1686.000 brakedistance= 23.000 start= 48.000 end= 1679.000, braking distance= abs( -0.114[%] ) / 0.248[%/s] * 100.000[steps/s] / 2 = 23.000
pos= 1683.000 brakedistance= 36.000 start= 48.000 end= 1679.000, braking distance= abs( -0.119[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 36.000
pos= 1680.000 brakedistance= 37.500 start= 48.000 end= 1679.000, braking distance= abs( -0.124[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 37.500
pos= 1677.000 brakedistance= 39.000 start= 48.000 end= 1679.000, braking distance= abs( -0.129[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 39.000
pos= 1674.000 brakedistance= 40.500 start= 48.000 end= 1679.000, braking distance= abs( -0.134[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 40.500
pos= 1671.000 brakedistance= 42.000 start= 48.000 end= 1679.000, braking distance= abs( -0.139[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 42.000
pos= 1668.000 brakedistance= 43.500 start= 48.000 end= 1679.000, braking distance= abs( -0.144[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 43.500
pos= 1664.000 brakedistance= 60.000 start= 48.000 end= 1679.000, braking distance= abs( -0.149[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 60.000
pos= 1661.000 brakedistance= 46.500 start= 48.000 end= 1679.000, braking distance= abs( -0.154[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 46.500
pos= 1657.000 brakedistance= 64.000 start= 48.000 end= 1679.000, braking distance= abs( -0.159[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 64.000
pos= 1653.000 brakedistance= 66.000 start= 48.000 end= 1679.000, braking distance= abs( -0.164[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 66.000
pos= 1648.000 brakedistance= 85.000 start= 48.000 end= 1679.000, braking distance= abs( -0.169[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 85.000
pos= 1644.000 brakedistance= 70.000 start= 48.000 end= 1679.000, braking distance= abs( -0.174[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 70.000
pos= 1639.000 brakedistance= 90.000 start= 48.000 end= 1679.000, braking distance= abs( -0.179[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 90.000
pos= 1634.000 brakedistance= 92.500 start= 48.000 end= 1679.000, braking distance= abs( -0.184[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 92.500
pos= 1629.000 brakedistance= 95.000 start= 48.000 end= 1679.000, braking distance= abs( -0.188[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 95.000
pos= 1624.000 brakedistance= 97.500 start= 48.000 end= 1679.000, braking distance= abs( -0.193[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 97.500
pos= 1618.000 brakedistance= 120.000 start= 48.000 end= 1679.000, braking distance= abs( -0.198[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 120.000
pos= 1613.000 brakedistance= 102.500 start= 48.000 end= 1679.000, braking distance= abs( -0.203[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 102.500
pos= 1608.000 brakedistance= 105.000 start= 48.000 end= 1679.000, braking distance= abs( -0.208[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 105.000
pos= 1602.000 brakedistance= 129.000 start= 48.000 end= 1679.000, braking distance= abs( -0.213[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 129.000
pos= 1596.000 brakedistance= 132.000 start= 48.000 end= 1679.000, braking distance= abs( -0.218[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 132.000
pos= 1590.000 brakedistance= 135.000 start= 48.000 end= 1679.000, braking distance= abs( -0.223[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 135.000
pos= 1583.000 brakedistance= 161.000 start= 48.000 end= 1679.000, braking distance= abs( -0.228[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 161.000
pos= 1576.000 brakedistance= 164.500 start= 48.000 end= 1679.000, braking distance= abs( -0.233[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 164.500
pos= 1570.000 brakedistance= 144.000 start= 48.000 end= 1679.000, braking distance= abs( -0.238[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 144.000
pos= 1564.000 brakedistance= 147.000 start= 48.000 end= 1679.000, braking distance= abs( -0.243[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 147.000
pos= 1556.000 brakedistance= 200.000 start= 48.000 end= 1679.000, braking distance= abs( -0.248[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 200.000
pos= 1550.000 brakedistance= 153.000 start= 48.000 end= 1679.000, braking distance= abs( -0.253[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 153.000
pos= 1542.000 brakedistance= 208.000 start= 48.000 end= 1679.000, braking distance= abs( -0.258[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 208.000
pos= 1535.000 brakedistance= 185.500 start= 48.000 end= 1679.000, braking distance= abs( -0.263[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 185.500
pos= 1527.000 brakedistance= 216.000 start= 48.000 end= 1679.000, braking distance= abs( -0.268[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 216.000
pos= 1520.000 brakedistance= 192.500 start= 48.000 end= 1679.000, braking distance= abs( -0.273[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 192.500
pos= 1512.000 brakedistance= 224.000 start= 48.000 end= 1679.000, braking distance= abs( -0.278[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 224.000
pos= 1504.000 brakedistance= 228.000 start= 48.000 end= 1679.000, braking distance= abs( -0.283[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 228.000
pos= 1496.000 brakedistance= 232.000 start= 48.000 end= 1679.000, braking distance= abs( -0.288[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 232.000
pos= 1488.000 brakedistance= 236.000 start= 48.000 end= 1679.000, braking distance= abs( -0.293[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 236.000
pos= 1479.000 brakedistance= 270.000 start= 48.000 end= 1679.000, braking distance= abs( -0.298[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 270.000
pos= 1471.000 brakedistance= 244.000 start= 48.000 end= 1679.000, braking distance= abs( -0.303[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 244.000
pos= 1462.000 brakedistance= 279.000 start= 48.000 end= 1679.000, braking distance= abs( -0.308[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 279.000
pos= 1454.000 brakedistance= 252.000 start= 48.000 end= 1679.000, braking distance= abs( -0.312[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 252.000
pos= 1444.000 brakedistance= 320.000 start= 48.000 end= 1679.000, braking distance= abs( -0.317[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 320.000
pos= 1435.000 brakedistance= 292.500 start= 48.000 end= 1679.000, braking distance= abs( -0.322[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 292.500
pos= 1426.000 brakedistance= 297.000 start= 48.000 end= 1679.000, braking distance= abs( -0.327[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 297.000
pos= 1417.000 brakedistance= 301.500 start= 48.000 end= 1679.000, braking distance= abs( -0.332[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 301.500
pos= 1407.000 brakedistance= 340.000 start= 48.000 end= 1679.000, braking distance= abs( -0.337[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 340.000
pos= 1397.000 brakedistance= 345.000 start= 48.000 end= 1679.000, braking distance= abs( -0.342[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 345.000
pos= 1387.000 brakedistance= 350.000 start= 48.000 end= 1679.000, braking distance= abs( -0.347[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 350.000
pos= 1377.000 brakedistance= 355.000 start= 48.000 end= 1679.000, braking distance= abs( -0.352[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 355.000
pos= 1366.000 brakedistance= 396.000 start= 48.000 end= 1679.000, braking distance= abs( -0.357[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 396.000
pos= 1357.000 brakedistance= 328.500 start= 48.000 end= 1679.000, braking distance= abs( -0.362[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 328.500
pos= 1346.000 brakedistance= 407.000 start= 48.000 end= 1679.000, braking distance= abs( -0.367[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 407.000
pos= 1335.000 brakedistance= 412.500 start= 48.000 end= 1679.000, braking distance= abs( -0.372[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 412.500
pos= 1324.000 brakedistance= 418.000 start= 48.000 end= 1679.000, braking distance= abs( -0.377[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 418.000
pos= 1313.000 brakedistance= 423.500 start= 48.000 end= 1679.000, braking distance= abs( -0.382[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 423.500
pos= 1302.000 brakedistance= 429.000 start= 48.000 end= 1679.000, braking distance= abs( -0.387[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 429.000
pos= 1290.000 brakedistance= 474.000 start= 48.000 end= 1679.000, braking distance= abs( -0.392[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 474.000
pos= 1279.000 brakedistance= 440.000 start= 48.000 end= 1679.000, braking distance= abs( -0.397[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 440.000
pos= 1268.000 brakedistance= 445.500 start= 48.000 end= 1679.000, braking distance= abs( -0.402[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 445.500
pos= 1256.000 brakedistance= 492.000 start= 48.000 end= 1679.000, braking distance= abs( -0.407[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 492.000
pos= 1244.000 brakedistance= 498.000 start= 48.000 end= 1679.000, braking distance= abs( -0.412[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 498.000
pos= 1232.000 brakedistance= 504.000 start= 48.000 end= 1679.000, braking distance= abs( -0.417[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 504.000
pos= 1220.000 brakedistance= 510.000 start= 48.000 end= 1679.000, braking distance= abs( -0.422[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 510.000
pos= 1208.000 brakedistance= 516.000 start= 48.000 end= 1679.000, braking distance= abs( -0.427[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 516.000
pos= 1195.000 brakedistance= 565.500 start= 48.000 end= 1679.000, braking distance= abs( -0.432[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 565.500
pos= 1182.000 brakedistance= 572.000 start= 48.000 end= 1679.000, braking distance= abs( -0.436[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 572.000
pos= 1170.000 brakedistance= 534.000 start= 48.000 end= 1679.000, braking distance= abs( -0.441[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 534.000
pos= 1157.000 brakedistance= 585.000 start= 48.000 end= 1679.000, braking distance= abs( -0.446[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 585.000
pos= 1144.000 brakedistance= 591.500 start= 48.000 end= 1679.000, braking distance= abs( -0.451[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 591.500
pos= 1130.000 brakedistance= 644.000 start= 48.000 end= 1679.000, braking distance= abs( -0.456[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 644.000
pos= 1117.000 brakedistance= 604.500 start= 48.000 end= 1679.000, braking distance= abs( -0.461[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 604.500
pos= 1104.000 brakedistance= 611.000 start= 48.000 end= 1679.000, braking distance= abs( -0.466[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 611.000
pos= 1090.000 brakedistance= 665.000 start= 48.000 end= 1679.000, braking distance= abs( -0.471[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 665.000
pos= 1076.000 brakedistance= 672.000 start= 48.000 end= 1679.000, braking distance= abs( -0.476[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 672.000
pos= 1063.000 brakedistance= 630.500 start= 48.000 end= 1679.000, braking distance= abs( -0.481[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 630.500
pos= 1048.000 brakedistance= 735.000 start= 48.000 end= 1679.000, braking distance= abs( -0.486[%] ) / 0.248[%/s] * 750.000[steps/s] / 2 = 735.000
pos= 1034.000 brakedistance= 693.000 start= 48.000 end= 1679.000, braking distance= abs( -0.491[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 693.000
pos= 1020.000 brakedistance= 700.000 start= 48.000 end= 1679.000, braking distance= abs( -0.496[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 700.000
pos= 1006.000 brakedistance= 707.000 start= 48.000 end= 1679.000, braking distance= abs( -0.501[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 707.000
pos= 991.000 brakedistance= 765.000 start= 48.000 end= 1679.000, braking distance= abs( -0.506[%] ) / 0.248[%/s] * 750.000[steps/s] / 2 = 765.000
pos= 976.000 brakedistance= 772.500 start= 48.000 end= 1679.000, braking distance= abs( -0.511[%] ) / 0.248[%/s] * 750.000[steps/s] / 2 = 772.500
pos= 962.000 brakedistance= 728.000 start= 48.000 end= 1679.000, braking distance= abs( -0.516[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 728.000
pos= 946.000 brakedistance= 840.000 start= 48.000 end= 1679.000, braking distance= abs( -0.521[%] ) / 0.248[%/s] * 800.000[steps/s] / 2 = 840.000
pos= 932.000 brakedistance= 742.000 start= 48.000 end= 1679.000, braking distance= abs( -0.526[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 742.000
pos= 917.000 brakedistance= 802.500 start= 48.000 end= 1679.000, braking distance= abs( -0.531[%] ) / 0.248[%/s] * 750.000[steps/s] / 2 = 802.500
pos= 901.000 brakedistance= 864.000 start= 48.000 end= 1679.000, braking distance= abs( -0.536[%] ) / 0.248[%/s] * 800.000[steps/s] / 2 = 864.000
Startpoint brake on  pos - brakedistance= 901.000 - 864.000 = 37.000 < 48.000, braking distance= abs( -0.526[%] ) / 0.248[%/s] * 800.000[steps/s] / 2 = 864.000
pos= 869.000 brakedistance= 1712.000 start= 48.000 end= 1679.000, braking distance= abs( -0.531[%] ) / 0.248[%/s] * 1600.000[steps/s] / 2 = 1712.000
Startpoint emergency pos - brakedistance= 869.000 - 1712.000 = -843.000 < 48.000, braking distance= abs( -0.521[%] ) / 0.248[%/s] * 1600.000[steps/s] / 2 = 1712.000
pos= 836.000 brakedistance= 1749.000 start= 48.000 end= 1679.000, braking distance= abs( -0.526[%] ) / 0.248[%/s] * 1650.000[steps/s] / 2 = 1749.000
Startpoint emergency pos - brakedistance= 836.000 - 1749.000 = -913.000 < 48.000, braking distance= abs( -0.516[%] ) / 0.248[%/s] * 1650.000[steps/s] / 2 = 1749.000
pos= 806.000 brakedistance= 1575.000 start= 48.000 end= 1679.000, braking distance= abs( -0.521[%] ) / 0.248[%/s] * 1500.000[steps/s] / 2 = 1575.000
Startpoint emergency pos - brakedistance= 806.000 - 1575.000 = -769.000 < 48.000, braking distance= abs( -0.511[%] ) / 0.248[%/s] * 1500.000[steps/s] / 2 = 1575.000
pos= 782.000 brakedistance= 1248.000 start= 48.000 end= 1679.000, braking distance= abs( -0.516[%] ) / 0.248[%/s] * 1200.000[steps/s] / 2 = 1248.000
Startpoint emergency pos - brakedistance= 782.000 - 1248.000 = -466.000 < 48.000, braking distance= abs( -0.506[%] ) / 0.248[%/s] * 1200.000[steps/s] / 2 = 1248.000
Startpoint brake on  pos - brakedistance= 767.000 - 772.500 = -5.500 < 48.000, braking distance= abs( -0.501[%] ) / 0.248[%/s] * 750.000[steps/s] / 2 = 772.500
pos= 764.000 brakedistance= 153.000 start= 48.000 end= 1679.000, braking distance= abs( -0.506[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 153.000
pos= 761.000 brakedistance= 154.500 start= 48.000 end= 1679.000, braking distance= abs( -0.511[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 154.500
pos= 756.000 brakedistance= 260.000 start= 48.000 end= 1679.000, braking distance= abs( -0.516[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 260.000
pos= 749.000 brakedistance= 367.500 start= 48.000 end= 1679.000, braking distance= abs( -0.521[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 367.500
pos= 740.000 brakedistance= 477.000 start= 48.000 end= 1679.000, braking distance= abs( -0.526[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 477.000
pos= 730.000 brakedistance= 535.000 start= 48.000 end= 1679.000, braking distance= abs( -0.531[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 535.000
pos= 718.000 brakedistance= 648.000 start= 48.000 end= 1679.000, braking distance= abs( -0.536[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 648.000
Startpoint emergency pos - brakedistance= 704.000 - 763.000 = -59.000 < 48.000, braking distance= abs( -0.531[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 763.000
Startpoint emergency pos - brakedistance= 688.000 - 864.000 = -176.000 < 48.000, braking distance= abs( -0.526[%] ) / 0.248[%/s] * 800.000[steps/s] / 2 = 864.000
Startpoint emergency pos - brakedistance= 673.000 - 802.500 = -129.500 < 48.000, braking distance= abs( -0.521[%] ) / 0.248[%/s] * 750.000[steps/s] / 2 = 802.500
Startpoint emergency pos - brakedistance= 659.000 - 742.000 = -83.000 < 48.000, braking distance= abs( -0.516[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 742.000
Startpoint brake on  pos - brakedistance= 646.000 - 682.500 = -36.500 < 48.000, braking distance= abs( -0.511[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 682.500
pos= 637.000 brakedistance= 468.000 start= 48.000 end= 1679.000, braking distance= abs( -0.516[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 468.000
pos= 628.000 brakedistance= 472.500 start= 48.000 end= 1679.000, braking distance= abs( -0.521[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 472.500
pos= 618.000 brakedistance= 530.000 start= 48.000 end= 1679.000, braking distance= abs( -0.526[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 530.000
Startpoint brake on  pos - brakedistance= 606.000 - 642.000 = -36.000 < 48.000, braking distance= abs( -0.521[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 642.000
Startpoint emergency pos - brakedistance= 592.000 - 742.000 = -150.000 < 48.000, braking distance= abs( -0.516[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 742.000
Startpoint emergency pos - brakedistance= 578.000 - 735.000 = -157.000 < 48.000, braking distance= abs( -0.511[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 735.000
Startpoint emergency pos - brakedistance= 564.000 - 728.000 = -164.000 < 48.000, braking distance= abs( -0.506[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 728.000
Startpoint emergency pos - brakedistance= 550.000 - 721.000 = -171.000 < 48.000, braking distance= abs( -0.501[%] ) / 0.248[%/s] * 700.000[steps/s] / 2 = 721.000
Startpoint brake on  pos - brakedistance= 539.000 - 561.000 = -22.000 < 48.000, braking distance= abs( -0.496[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 561.000
pos= 530.000 brakedistance= 454.500 start= 48.000 end= 1679.000, braking distance= abs( -0.501[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 454.500
pos= 522.000 brakedistance= 408.000 start= 48.000 end= 1679.000, braking distance= abs( -0.506[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 408.000
pos= 514.000 brakedistance= 412.000 start= 48.000 end= 1679.000, braking distance= abs( -0.511[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 412.000
Startpoint emergency pos - brakedistance= 503.000 - 572.000 = -69.000 < 48.000, braking distance= abs( -0.506[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 572.000
Startpoint emergency pos - brakedistance= 490.000 - 669.500 = -179.500 < 48.000, braking distance= abs( -0.501[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 669.500
Startpoint emergency pos - brakedistance= 478.000 - 612.000 = -134.000 < 48.000, braking distance= abs( -0.496[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 612.000
Startpoint emergency pos - brakedistance= 466.000 - 606.000 = -140.000 < 48.000, braking distance= abs( -0.491[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 606.000
Startpoint brake on  pos - brakedistance= 456.000 - 500.000 = -44.000 < 48.000, braking distance= abs( -0.486[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 500.000
pos= 448.000 brakedistance= 396.000 start= 48.000 end= 1679.000, braking distance= abs( -0.491[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 396.000
pos= 442.000 brakedistance= 300.000 start= 48.000 end= 1679.000, braking distance= abs( -0.496[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 300.000
Startpoint brake on  pos - brakedistance= 434.000 - 404.000 = 30.000 < 48.000, braking distance= abs( -0.491[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 404.000
Startpoint emergency pos - brakedistance= 424.000 - 500.000 = -76.000 < 48.000, braking distance= abs( -0.486[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 500.000
Startpoint emergency pos - brakedistance= 412.000 - 594.000 = -182.000 < 48.000, braking distance= abs( -0.481[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 594.000
Startpoint emergency pos - brakedistance= 399.000 - 637.000 = -238.000 < 48.000, braking distance= abs( -0.476[%] ) / 0.248[%/s] * 650.000[steps/s] / 2 = 637.000
Startpoint emergency pos - brakedistance= 388.000 - 533.500 = -145.500 < 48.000, braking distance= abs( -0.471[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 533.500
Startpoint emergency pos - brakedistance= 379.000 - 432.000 = -53.000 < 48.000, braking distance= abs( -0.466[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 432.000
Startpoint brake on  pos - brakedistance= 372.000 - 332.500 = 39.500 < 48.000, braking distance= abs( -0.461[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 332.500
pos= 368.000 brakedistance= 188.000 start= 48.000 end= 1679.000, braking distance= abs( -0.466[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 188.000
pos= 365.000 brakedistance= 142.500 start= 48.000 end= 1679.000, braking distance= abs( -0.471[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 142.500
pos= 359.000 brakedistance= 288.000 start= 48.000 end= 1679.000, braking distance= abs( -0.476[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 288.000
Startpoint brake on  pos - brakedistance= 352.000 - 339.500 = 12.500 < 48.000, braking distance= abs( -0.471[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 339.500
Startpoint emergency pos - brakedistance= 342.000 - 480.000 = -138.000 < 48.000, braking distance= abs( -0.466[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 480.000
Startpoint emergency pos - brakedistance= 331.000 - 522.500 = -191.500 < 48.000, braking distance= abs( -0.461[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 522.500
Startpoint emergency pos - brakedistance= 319.000 - 564.000 = -245.000 < 48.000, braking distance= abs( -0.456[%] ) / 0.248[%/s] * 600.000[steps/s] / 2 = 564.000
Startpoint emergency pos - brakedistance= 308.000 - 511.500 = -203.500 < 48.000, braking distance= abs( -0.451[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 511.500
Startpoint emergency pos - brakedistance= 299.000 - 414.000 = -115.000 < 48.000, braking distance= abs( -0.446[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 414.000
pos= 294.000 brakedistance= 227.500 start= 48.000 end= 1679.000, braking distance= abs( -0.451[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 227.500
pos= 290.000 brakedistance= 184.000 start= 48.000 end= 1679.000, braking distance= abs( -0.456[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 184.000
pos= 287.000 brakedistance= 139.500 start= 48.000 end= 1679.000, braking distance= abs( -0.461[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 139.500
Startpoint brake on  pos - brakedistance= 282.000 - 235.000 = 47.000 < 48.000, braking distance= abs( -0.456[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 235.000
Startpoint emergency pos - brakedistance= 274.000 - 372.000 = -98.000 < 48.000, braking distance= abs( -0.451[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 372.000
Startpoint emergency pos - brakedistance= 265.000 - 414.000 = -149.000 < 48.000, braking distance= abs( -0.446[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 414.000
Startpoint emergency pos - brakedistance= 254.000 - 500.500 = -246.500 < 48.000, braking distance= abs( -0.441[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 500.500
Startpoint emergency pos - brakedistance= 246.000 - 360.000 = -114.000 < 48.000, braking distance= abs( -0.436[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 360.000
Startpoint emergency pos - brakedistance= 238.000 - 356.000 = -118.000 < 48.000, braking distance= abs( -0.432[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 356.000
pos= 235.000 brakedistance= 132.000 start= 48.000 end= 1679.000, braking distance= abs( -0.436[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 132.000
pos= 233.000 brakedistance= 89.000 start= 48.000 end= 1679.000, braking distance= abs( -0.441[%] ) / 0.248[%/s] * 100.000[steps/s] / 2 = 89.000
pos= 230.000 brakedistance= 135.000 start= 48.000 end= 1679.000, braking distance= abs( -0.446[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 135.000
Startpoint brake on  pos - brakedistance= 226.000 - 182.000 = 44.000 < 48.000, braking distance= abs( -0.441[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 182.000
Startpoint brake on  pos - brakedistance= 220.000 - 270.000 = -50.000 < 48.000, braking distance= abs( -0.436[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 270.000
Startpoint emergency pos - brakedistance= 211.000 - 400.500 = -189.500 < 48.000, braking distance= abs( -0.432[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 400.500
Startpoint emergency pos - brakedistance= 201.000 - 440.000 = -239.000 < 48.000, braking distance= abs( -0.427[%] ) / 0.248[%/s] * 500.000[steps/s] / 2 = 440.000
Startpoint emergency pos - brakedistance= 190.000 - 478.500 = -288.500 < 48.000, braking distance= abs( -0.422[%] ) / 0.248[%/s] * 550.000[steps/s] / 2 = 478.500
Startpoint emergency pos - brakedistance= 181.000 - 387.000 = -206.000 < 48.000, braking distance= abs( -0.417[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 387.000
Startpoint emergency pos - brakedistance= 173.000 - 340.000 = -167.000 < 48.000, braking distance= abs( -0.412[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 340.000
Startpoint brake on  pos - brakedistance= 169.000 - 168.000 = 1.000 < 48.000, braking distance= abs( -0.407[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 168.000
Startpoint brake on  pos - brakedistance= 166.000 - 124.500 = 41.500 < 48.000, braking distance= abs( -0.402[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 124.500
Startpoint brake on  pos - brakedistance= 163.000 - 123.000 = 40.000 < 48.000, braking distance= abs( -0.397[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 123.000
Startpoint brake on  pos - brakedistance= 159.000 - 162.000 = -3.000 < 48.000, braking distance= abs( -0.392[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 162.000
Startpoint emergency pos - brakedistance= 152.000 - 280.000 = -128.000 < 48.000, braking distance= abs( -0.387[%] ) / 0.248[%/s] * 350.000[steps/s] / 2 = 280.000
Startpoint emergency pos - brakedistance= 143.000 - 355.500 = -212.500 < 48.000, braking distance= abs( -0.382[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 355.500
Startpoint emergency pos - brakedistance= 134.000 - 351.000 = -217.000 < 48.000, braking distance= abs( -0.377[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 351.000
Startpoint emergency pos - brakedistance= 126.000 - 308.000 = -182.000 < 48.000, braking distance= abs( -0.372[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 308.000
Startpoint emergency pos - brakedistance= 121.000 - 190.000 = -69.000 < 48.000, braking distance= abs( -0.367[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 190.000
Startpoint brake on  pos - brakedistance= 118.000 - 112.500 = 5.500 < 48.000, braking distance= abs( -0.362[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 112.500
Startpoint brake on  pos - brakedistance= 116.000 - 74.000 = 42.000 < 48.000, braking distance= abs( -0.357[%] ) / 0.248[%/s] * 100.000[steps/s] / 2 = 74.000
Startpoint brake on  pos - brakedistance= 114.000 - 73.000 = 41.000 < 48.000, braking distance= abs( -0.352[%] ) / 0.248[%/s] * 100.000[steps/s] / 2 = 73.000
Startpoint brake on  pos - brakedistance= 111.000 - 108.000 = 3.000 < 48.000, braking distance= abs( -0.347[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 108.000
Startpoint emergency pos - brakedistance= 105.000 - 213.000 = -108.000 < 48.000, braking distance= abs( -0.342[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 213.000
Startpoint emergency pos - brakedistance= 97.000 - 280.000 = -183.000 < 48.000, braking distance= abs( -0.337[%] ) / 0.248[%/s] * 400.000[steps/s] / 2 = 280.000
Startpoint emergency pos - brakedistance= 88.000 - 310.500 = -222.500 < 48.000, braking distance= abs( -0.332[%] ) / 0.248[%/s] * 450.000[steps/s] / 2 = 310.500
Startpoint emergency pos - brakedistance= 82.000 - 204.000 = -122.000 < 48.000, braking distance= abs( -0.327[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 204.000
Startpoint emergency pos - brakedistance= 78.000 - 134.000 = -56.000 < 48.000, braking distance= abs( -0.322[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 134.000
Startpoint brake on  pos - brakedistance= 76.000 - 66.000 = 10.000 < 48.000, braking distance= abs( -0.317[%] ) / 0.248[%/s] * 100.000[steps/s] / 2 = 66.000
Startpoint brake on  pos - brakedistance= 74.000 - 65.000 = 9.000 < 48.000, braking distance= abs( -0.312[%] ) / 0.248[%/s] * 100.000[steps/s] / 2 = 65.000
Startpoint brake on  pos - brakedistance= 73.000 - 32.000 = 41.000 < 48.000, braking distance= abs( -0.308[%] ) / 0.248[%/s] * 50.000[steps/s] / 2 = 32.000
Startpoint emergency pos - brakedistance= 69.000 - 126.000 = -57.000 < 48.000, braking distance= abs( -0.303[%] ) / 0.248[%/s] * 200.000[steps/s] / 2 = 126.000
Startpoint emergency pos - brakedistance= 63.000 - 186.000 = -123.000 < 48.000, braking distance= abs( -0.298[%] ) / 0.248[%/s] * 300.000[steps/s] / 2 = 186.000
Startpoint emergency pos - brakedistance= 58.000 - 152.500 = -94.500 < 48.000, braking distance= abs( -0.293[%] ) / 0.248[%/s] * 250.000[steps/s] / 2 = 152.500
Startpoint brake on  pos - brakedistance= 55.000 - 90.000 = -35.000 < 48.000, braking distance= abs( -0.288[%] ) / 0.248[%/s] * 150.000[steps/s] / 2 = 90.000
Startpoint brake on  pos - brakedistance= 53.000 - 59.000 = -6.000 < 48.000, braking distance= abs( -0.283[%] ) / 0.248[%/s] * 100.000[steps/s] / 2 = 59.000
Startpoint brake on  pos - brakedistance= 51.000 - 58.000 = -7.000 < 48.000, braking distance= abs( -0.278[%] ) / 0.248[%/s] * 100.000[steps/s] / 2 = 58.000
Willyfan commented 6 years ago

here one video: https://youtu.be/nRQeP05QcyE As you can see, the cablecam go and stop go and stop jumping. the firs stop is very bad

Willyfan commented 6 years ago

other video https://youtu.be/6jrNaM_CuRM

wernerdaehn commented 6 years ago

I would say that is expected because with the VESC the max pos error should be wider. You have $g 100, make it $g 300.

Details: You transition between brake -> emergency brake -> free moving -> brake -> emergency brake -> brake constantly.

Endpoint brake on  pos + brakedistance=  994.000 + 749.000 = 1743.000 > 1679.000
Endpoint emergency pos + brakedistance= 1009.000 + 795.000 = 1804.000 > 1679.000
Endpoint emergency pos + brakedistance= 1025.000 + 840.000 = 1865.000 > 1679.000
Endpoint brake on  pos + brakedistance= 1039.000 + 728.000 = 1767.000 > 1679.000
                   pos + brakedistance= 1051.000 + 618.000 = 1669.000   1679.000
                   pos + brakedistance= 1062.000 + 572.000 = 1634.000   1679.000
                   pos + brakedistance= 1073.000 + 577.500 = 1650.500   1679.000
Endpoint brake on  pos + brakedistance= 1085.000 + 636.000 = 1721.000 > 1679.000
Endpoint emergency pos + brakedistance= 1099.000 + 735.000 = 1834.000 > 1679.000
Endpoint emergency pos + brakedistance= 1114.000 + 780.000 = 1894.000 > 1679.000
Endpoint emergency pos + brakedistance= 1129.000 + 772.500 = 1901.500 > 1679.000
Endpoint emergency pos + brakedistance= 1142.000 + 663.000 = 1805.000 > 1679.000
Endpoint brake on  pos + brakedistance= 1153.000 + 555.500 = 1708.500 > 1679.000

Reason simply is the narrow margin of error. The brake kicks in but for the target speed to achieve that takes a few ms. Meanwhile the speed diff (expressed as how much the endpoint will be overshot) is enough to get above $g steps. Hence the emergency brake. Now the VESC tries to stop as hard as it can, which is way too fast. It is so fast that the controller can actually accelerate again for a few ms. Then it gets into the brake again just to emergency brake,....

For the VESC $g can be a large value. Its failsafe should never be tripped.

(Now I ripped out the USB pluf in my flip32 controller - can't test for the next week)

Willyfan commented 6 years ago

calculation is correct. Seems that position is not correct, because it change in strange way. Speed go up and down, the board read this may be a bit later, so we have this effect. I see, beside, that the stick change and go up sometimes. This is not correct.

Willyfan commented 6 years ago

Reason simply is the narrow margin of error. The brake kicks in but for the target speed to achieve that takes a few ms. Meanwhile the speed diff (expressed as how much the endpoint will be overshot) is enough to get above $g steps. Hence the emergency brake. Now the VESC tries to stop as hard as it can, which is way too fast. It is so fast that the controller can actually accelerate again for a few ms. Then it gets into the brake again just to emergency brake,....

Yes, i will try, I think also that debug slow down the board, so I try without debug. Is possibile have no debug at all?

Willyfan commented 6 years ago

Now the code is the same as before? because before I found that with 300 was better, also.

Willyfan commented 6 years ago

Ok, now, without debug is much better, also with tolerated error ay 100, but only in one direction (to right, to positive number position). In the other direction stll bad and jumpy, like you see in the video, also with tolerated error at 300. There is something different in the two directions, it seems that in left direction the tolerated error is not calculate.

Beside, in the direction to right, with error at 300 it work better but not perfect as when I release the stick, At begin there is a emergency brake anyway.

wernerdaehn commented 6 years ago

The emergency brake is the $g value. If you want to get rid of that, increase it.

From the code it looks symmetric

if (activesettings.max_position_error != 0.0f &&
    controllerstatus.pos + brakedistance >= semipermanentsettings.pos_end + activesettings.max_position_error) {

if (activesettings.max_position_error != 0.0f &&
   controllerstatus.pos - brakedistance <= semipermanentsettings.pos_start - activesettings.max_position_error) {
Willyfan commented 6 years ago

ok, but now the difference fron one direction and the other is a lot. Before start to modify the code was really symmetric, Now is not. I don't know why. Maybe is not position error the problem. Now is 300, I try to increase it. But it is strange, because just to set the debug off in one direction is better, not in the other. Are you sure that debug is disabled in every direction?

wernerdaehn commented 6 years ago

Sure? Pretty sure.

But I have checked your log from above, picked one sequence for "left" and can see the same sequence.

Startpoint brake on  pos - brakedistance= 606.000 - 642.000 =  -36.000 < 48.000
Startpoint emergency pos - brakedistance= 592.000 - 742.000 = -150.000 < 48.000
Startpoint emergency pos - brakedistance= 578.000 - 735.000 = -157.000 < 48.000
Startpoint emergency pos - brakedistance= 564.000 - 728.000 = -164.000 < 48.000
Startpoint emergency pos - brakedistance= 550.000 - 721.000 = -171.000 < 48.000
Startpoint brake on  pos - brakedistance= 539.000 - 561.000 =  -22.000 < 48.000
                     pos - brakedistance= 530.000 - 454.500 =   75.500   48.000
                     pos - brakedistance= 522.000 - 408.000 =  114.000   48.000
                     pos - brakedistance= 514.000 - 412.000 =  102.000   48.000
Startpoint emergency pos - brakedistance= 503.000 - 572.000 =  -69.000 < 48.000
Startpoint emergency pos - brakedistance= 490.000 - 669.500 = -179.500 < 48.000
Startpoint emergency pos - brakedistance= 478.000 - 612.000 = -134.000 < 48.000
Startpoint emergency pos - brakedistance= 466.000 - 606.000 = -140.000 < 48.000
Startpoint brake on  pos - brakedistance= 456.000 - 500.000 =  -44.000 < 48.000

Btw, $g 0 turns off that feature entirely. Would not do it but for testing....

wernerdaehn commented 6 years ago

The variation in speed I believe I can improve using the diff_time. I just got the wrong values before. I believe I have fixed it already but don't want to upload it without testing.

Willyfan commented 6 years ago

I tried to change the value of tolerated error. Over 300 nothing change. In one direction is good (not perfect, as before) in the other direction is very very bad. My log before are symmetric because both have debug ON. After disabled debug, In one direction is a lot better, in the other i still the same. For this i ask about debug.

Willyfan commented 6 years ago

Now I look what kind of log I receive in both directions.

wernerdaehn commented 6 years ago

I can't spot anything that might be different between the directions. But that just means I have not found it yet as your tests with $g clearly proof there is something wrong.

Willyfan commented 6 years ago

Ok. With tolerated error at 1500 (!) the camera in both direction decelerate smootly. With value from 300 to 1000 I don't see changes, and the brake is asymmetric. If I put debug ON, it is jumpy in both direction. Maybe that debug use too much resource of processor? For example, can happen that a cycle was jumped? I mean, If we have 50 cycles in one second, but in 20 ms the processor don't do evrything, whats happen? This can explain some jump in speed, because if we jump a read after that the speed seems double. Can we try a complete silence debug? Non info at all?

wernerdaehn commented 6 years ago

Yes, it is possible. So I will attack that from two angles:

  1. Do not rely on the 50 cycles per second but rather measure the speed
  2. Turn off the end point messages - configurable.
Willyfan commented 6 years ago

The reason why the speed by interval did not work is obvious. I assumed a fixed interval of 20ms while it actually is 50ms.

What interval do you mean? The loop is, at 50 hz so 20 ms is correct. Do you mean another interval?

Willyfan commented 6 years ago

I thought a lot about the data and the tests done. I also tried to totally disable the emergency brake, and I came to some conclusions, which I hope will help. the problem is not in the code itself. There are no calculation or conceptual errors (apart from the calculation of the speed with the time interval method which can be improved). In my opinion, the problem I encountered at the beginning and still exists is mainly due to the approximation of the speed calculation. Secondly, perhaps there is a problem with the processor's speed in executing the code, especially when it has to transmit text to the serial for debugging. The latter problem emerges when debugging is activated, where it is clearly seen that the behavior of the cablecam changes. Disabling the emergency brake and debugging the camera behaves well, although perhaps there remains a tendency to overcome the endpoint, always because of the approximation of the speed calculation that is responsible for the distance when the endpoint brake activates.

I explain less the fact that the emergency brake is asymmetric in the result. trying various values of $g from 100 to go up, I saw that while in the positive direction the result improved progressively from the beginning, in the other direction it starts to improve only with very high values, from 700 onwards. If you were using a normal ESC, I would think there is some asymmetry in reverse behavior, but the VESC does not have these problems. I can only think that for some reason the inverse calculations are heavier for the processor. It is not a great explanation, but for now I do not see others.

So, your strategy seems correct to me. I'm just puzzled about the speed measurement: would not it be easier to change the encoder type? There are encodes at very low costs that give 200, 300 or even 1000 pulses per revolution (perhaps too many?). I have just finished designing the circuit board for the as5047p, which I wanted to use to improve the performance of the VESC at low speeds. You could try to use it also to read the speed, I do not think you need to make many changes: you can use the ABI outputs, or maybe only the AB not using the index and have 1000 pulses per revolution, more than enough to have a very high resolution both for the position and for the speed, given that such a number of pulses can be managed. Let me know what you think. I hope that my reflections can be useful.

Willyfan commented 6 years ago

An addition about the encoders: the resolution of the as5047p can be programmed from 1024 up to 25 impulses per revolution, so we could choose a value appropriate to our needs.

wernerdaehn commented 6 years ago

Agree with all you said. I am currently

The asymmetry I'll check again with various settings.

I have nothing against an encoder with the exception that I don't know how to mount it easily. Hall sensor was the easiest way. As the counting is done in the hardware of the MCU, speed should not be a problem.

Will be back next weekend.

Willyfan commented 6 years ago

Ok, if you need some help please let me know.

Willyfan commented 6 years ago

Any news? I'm waiting a Windows app for setting, maybe it will be useful. I want use it with telemetry long range transmitter.

wernerdaehn commented 6 years ago

Busy working on it. The hard part is done. Took me 18 hours to find the problem why DMA access did not work and it was one line of code. 18 hours for one line of code! I hate microcontrollers....

Willyfan notifications@github.com schrieb am Mi., 5. Sep. 2018 um 14:21 Uhr:

Any news? I'm waiting a Windows app for setting, maybe it will be useful. I want use it with telemetry long range transmitter.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wernerdaehn/CC3D-CableCam-Controller/issues/30#issuecomment-418710184, or mute the thread https://github.com/notifications/unsubscribe-auth/AM-jV9lnIF1TStB06R9QOn1E16c6nrF8ks5uX8HcgaJpZM4V5eZy .

Willyfan commented 6 years ago

!!! When you finish to fight with code, I want ask you some info about vesc brake parameters, I see it in your code... Are it working?

wernerdaehn commented 6 years ago

Status update:

  1. The complete control cycle including all debug output is now below 1ms
  2. Hence cycle time is 20ms constantly
  3. I have troubles getting the values from the VESC. I can either request the values or send rpm commands but when I try both, I do not get any values from the VESC back. Similar issue happened before as well but now it is worse.
  4. The speed measurement is much better now. Not sure if it is perfect but much better. And I know a way to improve it further, just can't get it to work. https://st.force.com/community/s/feed/0D50X00009fDstg
  5. Need to test some more before uploading a new version. There are still some open what-if questions.
DmitriySurin commented 6 years ago

Is there any new version to upload for test?

wernerdaehn commented 6 years ago

Not yet. First I need to check myself what is not working still. I am sure there are some areas. Having said that, I can of course. Your choice.

Willyfan commented 6 years ago

Maybe we can help you for debug? Le we know...

DmitriySurin commented 6 years ago

Maybe we can help you for debug? Le we know...

By the way I checked your rope force calculator inside the app and it seems to be some error... I use this numbers from http://wdaehn.blogspot.com/2015/02/cablecam-rope-considerations.html and try to replicate the same in your calculator but have the differents results...rope force from the article is 75kg and from calculator is 175kg

Willyfan commented 6 years ago

I will check this night, but in your page you don't take account of rope weight. Maybe some difference is for this reason. I changed something in last version of app, please download it.

DmitriySurin commented 6 years ago

I will check this night, but in your page you don't take account of rope weight. Maybe some difference is for this reason. I changed something in last version of app, please download it.

Give me the link please