Processing power requirements

Hey,

I’ve got a Panda reading a GPS, a RAZOR IMU, and outputting data to an ESC twice a second. I have now realised I will also need it to do a quick distance check every half a second, using the following method:


            int r = 6378100;

            d_lon = dest_lon - lon;
            
            distance = MathEx.Acos(MathEx.Sin(lat)*MathEx.Sin(dest_lat)+MathEx.Cos(lat)*MathEx.Cos(dest_lat)*MathEx.Cos(d_lon))*r;

Is that too much to ask of a Panda? I have absolutely no clue how much processing power trig functions take. There are even simpler alternatives I could fall back to, should I need to.

Are you using the GHI math functions? They should be fast

Yes I am, and by fast do you mean fast enough? I guess I’m just too used to attempting trig functions on 8bit microprocessors, which never worked too well.

While I’ve got a thread open, I might aswell ask regarding a problem I’m currently having.

I’ve got a class called GPS, where I used to have a constructor with 1 argument. This class is referenced from another project, inside which I am creating a GPS object. This worked well, until I’ve edited the constructor of GPS, made it accept 0 arguments. Clean & built GPS, ensured I have the correct reference about a million times, yet each time I try to build the other project which uses the GPS object, I get a “There is no constructor for GPS which accepts 0 arguments” (or something along those lines).

Any clue hoow to fix this, I’ve spent the last half an hour trying to fix all this, but it is so not working.

Maybe you are rebuilding the release of the Gsm and are referencing the debug output in your other project. (Or vica versa)

I also onced experienced what Wouter is talking about. This happend to me when i was using VS Express version where you are not able to switch between Debug and Release (i think). Somehow however express managed to compile a release version and reference it. Doing a cleanup didn’t work since only active Debug directory was used.

Create a new solution, add new projects and then copy your code to those projects (using Add Existing in context menu). Then it should work fine.