What if the question was: how to make the trip from Portugal to Brazil using only a compass to navigate?

As a first approach to this question and for the sake of simplicity, let's suppose that:

1. the Earth has the form of a sphere;
2. that sphere has a magnetic field, constant in time, equivalent to the one generated by a large magnet;
3. the mentioned magnet has its middle point at the center of the Earth and therefore, the axis of such a magnet intersects the Earth's surface in two antipode points, called the magnetic poles;
4. winds and drifts do not influence the route of the trip.
A compass points in the direction of the magnetic poles and not the geographical poles (determined by Earth's rotation axes). If one wanted to keep a constant angle with the meridians throughout the trip, other navigational devices would be required, besides the compass. Therefore, to keep the angle with all meridians constant, one would have to dynamically adjust the angle provided by the compass taking into account the magnetic declination. The magnetic declination of a place is the measure of the angle between the direction pointed by the compass and the direction to the geographical poles. In this context, the navigator would need instruments that allowed the determination of the geographical location of the ship at given points of the route.

If we consider the angle with all magnetic meridians (half great circles passing through the magnetic poles) instead of the angle with the geographical meridians, then it is possible to just travel with a compass.

To do so, we must calculate an angle that allows the navigator to go from one point to another keeping a constant magnetic course, intersecting the magnetic meridians according to the same angle. A route defined in this way will determine a new curve: a magnetic loxodrome.

The determination of the right angle, before departure, can be done using a map where the magnetic loxodromes are represented by straight lines.

A magnetic loxodrome intersects all magnetic meridians according to the same angle. When the curve does not coincide with a magnetic meridian or it is not perpendicular to the meridians, it takes the shape of a spiral around the magnetic poles. In fact, one can get a magnetic loxodrome from the respective geographical loxodrome (that is, the geographical loxodrome with the same angle associated) by making a rotation of the plane that contains the magnetic and geographical azes, mapping the geographical north and south to the corresponding magnetic poles.

Using the following applet, you can compare the magnetic and geographical loxodromes.

1. You can move point $$A$$. To achieve this, press the right button of the mouse and, while pressing it, press also key $$A$$. Afterwards, release both. To fix the point, choose a position in the sphere and proceed in the same way: press the right button of the mouse and, while pressing it, press also key $$A$$. Afterwards, release both.
2. You can select the magnetic and/or the geographical loxodrome passing through the point and adjust the angle of each curve with the meridians. In particular, choose an angle with amplitude 0º and another with amplitude 90º.
3. When both curves are selected, you can choose the option "Equal angles" and vary the angle of both curves
4. You can even vary the latitude and longitude of one of the magnetic poles; the other magnetic poles is defined to be its antipode.

*Without these simplifications, the model used would have to be considerably more complex, making its treatment out of the scope of this work:
1. a surface that better represents the real shape of the Earth is an ellipsoid of revolution, flattened at the poles;
2. the Earth's magnetic field changes slowly over time;
3. the axis of the magnet does not lie at the center of the Earth.
To get more detailed information on Earth's magnetic field, you can check the page of the National Oceanic and Atmospheric Administration of the U.S.A dedicated to geomagnetism.