Integrated picoc as a runtime thread in VicaCopter. The current version locks up, it doesn't do floating point, it crashes your entire autopilot when it encounters an internal error, but after working around all the problems, managed to get some nifty flights out of it.It's like turtle graphics with a very very expensive turtle. U can build up incredibly complex flights out of reusable maneuvers. U can repeat maneuvers. U can nest maneuvers in maneuvers.Ironically, picoc was written to fly airplanes but its author never flew it in an airplane. His only application was that Surveyor rover.The lack of floating point means we can only do relative waypoints & no latitude & longitude.That was a 15m altitude change & 2 pirouettes in picoc.That was the cross mission & 2 circuits in picoc.That was 4 orbits with the nose pointing in different directions in picoc. Impossible with tables of waypoints.It locks up if you forget a comma in an argument list. Don't use "assert" in programs which are intended to fly things. Run it in a thread so if it locks up, it doesn't crash you. A floating point trig library would be nice.
Hi Jack, the "author" of picoc (being me) is still working on picoc. It's still what I'd consider "alpha" software so expect some bugs for now. Kudos to you for being ahead of the curve and using it already!
I'm still in the process of working out the last few picoc bugs and getting a few final features finished. I'm always interested in feedback from users so please let me know about bugs when you find them.
picoc is being used in quite a few applications already - as well as me using for my Flying Fox autopilot Howard's using it in his Surveyor SRV platform as you noted. It's also being integrated with the "micromonitor" monitor and it's being used in an unannounced web server project. Given the interest in it I'm pretty keen to make it as solid as possible.
You are right about the commas in an argument list. Make certain to tell Zik about that one.
I have written integer gps functions for picoC - "35 14.5999 N" is represented as "35249999". The code is posted in r284 and compiled with -DSURVEYOR_HOST, though you'll want to look at the corresponding gps.h and gps.c . The SURVEYOR_HOST functions are described at http://www.surveyor.com/C.html. I only finished the gps_head() and gps_dist() functions yesterday and ran tests with a ground-based robot, but results thus far are good. picoC needs a lot more testing, but it is a lot better than any embedded C interpreter's I have worked with.
Comments
Do you have an example of the comma problem? I haven't been able to reproduce it.
#define HOME 100000.0
#define RANGE 10.0
void function1(double x)
{
if(x > 0)
printf("1\n");
else
printf("0\n");
}
function1(HOME + RANGE);
printf("%f\n", 10000.0);
void function1(double x)
{
if(x > 0)
printf("1\n");
else
printf("0\n");
}
function1(100000.0);
I'm still in the process of working out the last few picoc bugs and getting a few final features finished. I'm always interested in feedback from users so please let me know about bugs when you find them.
picoc is being used in quite a few applications already - as well as me using for my Flying Fox autopilot Howard's using it in his Surveyor SRV platform as you noted. It's also being integrated with the "micromonitor" monitor and it's being used in an unannounced web server project. Given the interest in it I'm pretty keen to make it as solid as possible.
I have written integer gps functions for picoC - "35 14.5999 N" is represented as "35249999". The code is posted in r284 and compiled with -DSURVEYOR_HOST, though you'll want to look at the corresponding gps.h and gps.c . The SURVEYOR_HOST functions are described at http://www.surveyor.com/C.html. I only finished the gps_head() and gps_dist() functions yesterday and ran tests with a ground-based robot, but results thus far are good. picoC needs a lot more testing, but it is a lot better than any embedded C interpreter's I have worked with.