I began a project months ago to build a GPS tracking device and recently began working on it again. My rf266 takes gps data, parses it and saves it to an external memory chip. The gps will be tracking a slow moving object and may occasionally be out of range of the receiver (another rf266). I inserted a rpc to the gps node to ask every x minutes if the other node (bridged to the computer) is there. If it is, it takes the saved gps data out of the chip and sends it to Portal via rpc. At first I was sending each gps point individually, but most of the time the amount of rpc's trying to go out in a short period of time was too much and most of the data was lost. After reading another thread, I changed it so that each rpc held 4 gps points (after toying with it for a while, 4 was the max I could do before the packet size limit was exceeded). It sends out 10 or so packets before the rest is lost due to an overload of them trying to send out.
I have tried several things recently. One of them was that I tried to insert a delay (created one with a simple while loop) between rpc calls which didn't work (too small a delay did nothing and too large caused it to skip the whole process). I also tried to somehow incorporate a Hook event (if x = True send one through every second) but that didn't work for me either.
Because the object being tracked is a slow moving object, the devices may not be in communication for long enough to acquire lots of data that will need to be sent out and 40 points is just not enough.
I have very limited experience in programming and am sure there are many other things that I could try, not to mention perhaps the things that I have already tried could have worked but I did it wrong, but I cannot think of what to try next. So I was hoping that there may be someone out there that could potentially give me some ideas as to what to try next. Some other way to put some kind of a delay between rpcs so that they all make it?
Hope I was clear enough, had a hard time figuring out exactly how to ask my question.
Thank you for your time!
I have tried several things recently. One of them was that I tried to insert a delay (created one with a simple while loop) between rpc calls which didn't work (too small a delay did nothing and too large caused it to skip the whole process). I also tried to somehow incorporate a Hook event (if x = True send one through every second) but that didn't work for me either.
Because the object being tracked is a slow moving object, the devices may not be in communication for long enough to acquire lots of data that will need to be sent out and 40 points is just not enough.
I have very limited experience in programming and am sure there are many other things that I could try, not to mention perhaps the things that I have already tried could have worked but I did it wrong, but I cannot think of what to try next. So I was hoping that there may be someone out there that could potentially give me some ideas as to what to try next. Some other way to put some kind of a delay between rpcs so that they all make it?
Hope I was clear enough, had a hard time figuring out exactly how to ask my question.
Thank you for your time!
Comment