07-19-2013 03:35 AM
Hello,
I have speed-curve of a post delivery vans daily route and I want to figure out how many stops there were, i.e. when the speed is zero (about 350 that day) and then categorize them depending on their length. What would be the best approach to this? Have been using Diadem and vbs only for a week now.
With bes regards
-Jere
07-19-2013 12:56 PM
Hi Jere,
Could you send me one of those data sets, either in this post or to my email brad.turpin@ni.com? I think I have an old script that will work for this case, but I'd like to test it before I sent it to you, in case it needs adapting to work.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
07-22-2013 01:41 AM
Okay, thanks alot! Ill try to send it to you email, this forum doesnt accept .raw as attachment, it seems.
07-22-2013 03:57 AM
Here is the data sample in .tdm form
07-29-2013 03:14 PM
Hey Jere,
Sorry, I was out of town the last week. Would you please also submit the "vehicle speed.tdx" file? I can't load the tdm file without it.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
07-30-2013 02:13 AM
Without having seen the data, how about this approach:
1. sort speed and time channel simultaneously in order of increasing speed. This gives many zeroes and their respective time stamps, followed by many non-zeroes, when the van is moving.
Call ChnMultipleSort("speed", "time", False, False)
2. discard all data with speed > 0.
call find("Chn("Speed")>0")
call dataAreaDel(.....)
3. calculate difference of time channel with itself. This gives a channel with many small intervalls, when the car is pausing. And a few large intervalls between the pauses.
call ChnDeltaCalc("time","time_Delta")
4. run a peak find on the time difference channel, ordered not by peak height but by time of peak. This will mark the time between stop and start
This probably leaves a lot to figure out, but at least, this would be my idea of how to tackle the problem.
Michael
07-30-2013 05:00 AM - edited 07-30-2013 05:01 AM
Well, I finally did it this way:
First went throught the speed channels 9 million cells and created a new channel where every cell got a value of 0, when the car was stopped or 1 if something else.
Then counted the number of the those consecutive zeros and saved the results to a new channel.
Then eliminated all the cells which didnt had a value of zero, while the channel was still 9 million long.
And then imported the list of stop times to Excel for categorization. 😛