HI.

Looking for examples I came across an autonomous boat, for example:

static float RealBearing (float lat1, float long1, float bearing)

{

// Current Latitude, Current Longitude, Current bearing in degrees

// magnetic north declanation function

//75.7667Ã‚Â‚¬ N, 99.7833Ã ° ° North Magnetic Pole, Coordinates

// + or -?

float magdif = GetHeading (lat1, long1, 75.7667, -99.7833);

return (fmod ((bearing + magdif), 360));

}

static float GetHeading (float lat1, float long1, float lat2, float long2)

{

// Current Latitude, Current Longitude

// Projected Latitude, Projected Longitude

// To get reverse heading, add 180

lat1 = ConvertToRadians (lat1);

lat2 = ConvertToRadians (lat2);

long1 = ConvertToRadians (long1);

long2 = ConvertToRadians (long2);

float dLon = long2 - long1;

float y = sin (dLon) * cos (lat2);

float x = cos (lat1) * sin (lat2) - sin (lat1) * cos (lat2) * cos (dLon);

return ConvertToStaticDegrees (atan2 (y, x));

}

while (distanceInMeters (gpslat, gpslong, waypointlat, waypointlong) <5) {

int bearing = GetBearing ();

int heading = GetHeading (gpslat, gpslong, waypointlat, waypointlong);

bearing = RealBearing (gpslat, gpslong, bearing);

RudderTurn (RudderAngle (bearing, heading));

}

Why did the author use the permanent north coordinates to determine the direction?

After all, when I know the current GPS coordinates and waypoint coordinates, I can set an A-B course. I download the current compass heading and on this basis I know how to turn to a point. I don't understand what the author meant.