Need a help to fly in 2-D

i have a project to fly a quadcopter vertically up to 2 meters in a straight line then horizontally 2 meters then back to its start point, i know it can be done if connected via mission planner but i don’t have any clues any help will do.
Also i’m thinking about installing a wifi module is that valid and how can i start ?
thanks in advance

The documentation would be a good place to start.
Mission Planning starts here but the rest of the docs is a relevant read.

i have started in the docs but all i see is a GPS based navigation and i don’t want that all i need a simple straight line vertically then horizontally and that can’t be achieved by GPS and flight plan which depends on maps.
Thanks for your reply

I am a little unclear as to why GPS is unsuitable for your needs.
Are you using GPS?
Are you flying inside?
Why do you say a GPS flight plan won’t work?

Essentially there must be a way for the copter to locate it’s self in 3D space.
The plain accelerometers and gyros are not precise enough to hold position without some drift.

If you give us a better idea of what you want to do we might be able to give you some suggestions.

Well, the task is to fly at a small altitude (2 Meter) , then move for 2 meters to the right while capturing photos at constant interval by a separated raspberry pi connected with a camera.
So i think that i don’t need a GPS and 2 meters (vertically and horizontally) is very small for a GPS flight plan i was thinking the accelerometers and gyros are enough or maybe it need one more sensor to help them compensate the draft.
one more thing its gonna fly indoors.
i hope i cleared but i don’t have any experience in that field so i don’t know if what i’m thinking is right or not
Thank you for your reply