1

Im currently working on a small robot that uses an ardupilot for its control.

As Im working indoor, I can't use a real GPS so I'm making a dummy GPS based on UWB.

From UWB I get a position at +/- 10cm in cartesian coordinates.

To make it easier I convert my position to latitude & longitude using:

double Phi = this->latitude_0 * M_PI /380;
this->lat_to_meter = 111132.92 - 558.82*cos(2*Phi) + 1.175*cos(4*Phi) - 0.0023*cos(6*Phi);
this->lon_to_meter = 111412.84 * cos(Phi) - 93.5 * cos(3*Phi) + 0.118 * cos(5*Phi);

and latitude_0 being 0 (all my reference are shifted to the point 0,0 close to the west of Africa).

Im building GPGA, GPRMC & GPVTG frames to feed the ardupilot.

GPS is detected & position is updated without any troubles.

But I'm struggling with the the Track Made good for the GPRMC & GPVTG sentences. GPGA, GPRMC & GPVTG definitions

Speed & everything else is trivial to calculate, but I can't understand the Track.

If Im not mistaken the track is the angle to the true north of the course i.e. the distance orientation (?).

So my question is given 2 coordinates in latitude & longitude (conversion to meter is trivial) : how can I calculate the Track ?

A.albin
  • 11
  • 1

0 Answers0