Strange bug still comes and goes

I have this bizzar bug that comes and goes. When connected to the JTAG pod, I never see it. When operating disconnected, it will in fits and starts not boot properly. Since it never seems to happen when connected to the JTAG pod, it is making it very difficult to hunt down.

I have come to call this the “Nap Bug” as it seems to clear itself over time. This made me think of a temperature, but that does not seem to be the case.

On other news, I data logged my commute to and from work from inside my car. The track supperimposes on Google Earth with amazing accuracy. This this 1/2 the satellites obscured by the metal car roof. I love this GPS (uBlox LEA-6H) from HobbyKing ($50).

I have now gotten a shell of the navigation thread running. This thread takes a semaphore from the GPS thread at the end of each update. This is currently set at 5Hz. The purpose of this thread will be to compute the speed and steering commands for the next period of time. Currently I am implementing a very simple homming algorithm just to get going.

My GPS provides either ECEF or L/L in degrees. ECEF is not ideal in that you need to do some trig before getting into grid like coordinates. L/L in degrees is strange as well. With the binary format, I would have assumed the value to be in radians as the user would likely want to use trig functions on them. I guess its not a big deal as it only adds a multiply to scale the value.

I was going to convert the L/L into true MGRS or UTM so that I could map paths using Google earth, but have decided against it. The math to do so is ridiculously complex for what little benefit it would give me. As such I am implementing a personal private grid system. I will take the L/L and subtract a know grid reference location from it. I will then scale lattitude to meters knowing that a minute of arc is a nautical mile. Scalling of longitude needs the scaling factor based on the cosine of the latitude. This I will simplify with a single constant for the working area.

I will assume that I will have another higher speed control task running to do such things as filter the commanded servo controls to prevent jerking and to implement PID loops for speed control. 5Hz for the basic waypoint nav and perhaps 30Hz for the control task should do the trick. 

I got the statistics task running and find that I am only currently using about 4% of the CPU cycles. This is good as I am only just starting on the hard math.

My near-ish term goal is to set a waypoint across town and watch the steering servo for glitches. I will then bring the waypoint closer to me and see the efects of the GPS position wander.

The speed control module that came with the second hand RC car I bought (a Traxas Rustler) does not seem to allow for low speed control. It seems to go from off to 1/2 speed. Is this the normal mode for these speed control units, or do I need to think about a new ESC? Currently I am sending a PWM signal to the PWM ESC to get slow speeds. Idiotic!

This entry was posted in ARM, AVC. Bookmark the permalink.