Then I build it using “make sitl -j4”, which is working fine. But this new mode is still not showing in SITL (mavproxy command window) . I am still getting default modes only.
I am a newbie in this field, if I have to change anything else which is not stated in above tutorial please let me know.
There is a workaround for this problem. You can test your new flight mode by putting the algorithm code to respective files of already existing mode. So find a mode which you will not need, keep the function names and file names of that mode same and replace the code with your new logic. The change in logic will be reflected in SITL under the existing mode name.
With this workaround I was able to complete the project so I didnt explore more.