Sometimes you just need to straighten out the workings inside the Phantom.
 
One of the things you can do at that point is to calibrate the compass.  Some folks believe it must be done very frequently, others do it very infrequently.  I do it when my bird starts acting goofy, whenever I have changed anything (except a battery), and when I have arrived in a location more than a hundred miles from home.
Timing is an important factor in calibrating the compass.
The phantom must be allowed to complete the "System start and self-check"
procedure without interruption, of any kind.  No movement, no nothing is best, but then again some folks do it on a boat.

Things to consider

Here is a link to the DJI WIKI on the subject.

Location is of utmost importance.  Never do the compass dance over buried power lines or concrete containing rebar.  Stay away from any magnetic interferrence - of any kind.  Electronics can cause interference.  I was using a lanyard with metal clips and they goofed me up for months.  I can go on and on about what to stay away from, the fact is you have to do your best to remain clear of any interference.  In Wyoming, it's easy to escape the man made issues.  We do have some very annoying rocks though. 
I have no clue how someone could do it in New York City.

The method doesn't really matter. 
As long as you get 360 degrees of rotation on the vertical axis, with the Phantom horizontal, and 360 degrees of rotation along the longitudinal axis, with the Phantom pointed nose down.

Some folks like to pivot the Phantom over a spot, some like to stand in one spot and spin themselves around.  Either way is fine, it's a compass, not a GPS.  It just depends on what kind of dance you want to be seen doing.

Here is DJI's WIKI showing where the compass module is located.

Do not calibrate the compass  over underground power lines.

aaaaaaaaaaaaiii