I am a Newbee in Quad-copters and trying to write a simple formation control (Maybe a triangle) code using Ardupilot libraries and Vehicle Codebase.
I was going through official copter tutorial and now i am stuck on tutorial http://dev.ardupilot.com/wiki/code-overview-adding-a-new-parameter/ (Adding a New Parameter). i Have multiple doubts:
- why do we need to put new_param_name to enum with “k_param_” prefix?(as given in Step #1 in "“Adding a Parameter to main code”)
2)According to Step #3 in “Adding a Parameter to main code” we have to add variable declaration to var_info table using
GSCALAR(my_new_parameter, “MY_NEW_PARAMETER”, MY_NEW_PARAMETER_DEFAULT)
what is this necessary? what is GSCALAR?
My doubt is, In simple c++ code only Step #2 is required to add new parameter , why do we need Step #1 and Step #3 here?
Thank you.