Working and calculating with geographic positions I was thinking about how to implement a GPS navigation for my quadcopter.  I was writing some functions to calculate the angle between two positions (from home point to the target).

I'd like a review of this code.  I am not very sure whether I was calculating the geographic position right.

/*
 * Geographic calculations
 */
float UAVNav::width_of_merid_m(const float fLat_deg) {  
  float fdX_m = _2PI * _RADIUS_EARTH_m * cos(ToRad(fLat_deg) );
  fdX_m /= 360.f;
  return fdX_m;
}

float UAVNav::dist_2_equat_m(const float fLat_deg) {
  return (_PERIMETER_EARTH_m / 360.f) * fLat_deg;
}

float UAVNav::dist_2_greenw_m(const float fLat_deg, const float fLon_deg) {    
  return width_of_merid_m(fLat_deg) * fLon_deg;
}

float UAVNav::home_2_target_deg() { 
  const float fMod = 10000000.f;
  GPSPosition target = m_pReceiver-&gt;m_Waypoint;
  GPSData home = m_pHalBoard-&gt;get_gps();

  float fLatHome_deg = home.latitude / fMod;
  float fLonHome_deg = home.longitude / fMod;

  float fLatTarg_deg = target.latitude / fMod;
  float fLonTarg_deg = target.longitude / fMod;

  float fXHome = dist_2_greenw_m(fLatHome_deg, fLonHome_deg);
  float fYHome = dist_2_equat_m(fLatHome_deg);

  float fXTarg = dist_2_greenw_m(fLatTarg_deg, fLonTarg_deg);
  float fYTarg = dist_2_equat_m(fLatTarg_deg);

  float dX = fXTarg - fXHome;
  float dY = fYTarg - fYHome;

  // Calculate the angle to the destination direction
  // NOTE: Here the system is inverted by 90° to align the magnetic north to 0°
  m_fDestin_deg = ToDeg(atan2((float)dX, (float)dY) );
  return m_fDestin_deg;
}
There are some temporary variables that you might not use, such as fLatTarg_deg and fLotTarg_deg: you can commit the operation along with the function call.  

Also, the variables (which are actually costants, probably) _RADIUS_EARTH_m and _PERIMETER_EARTH_m are breaking the standard C++ naming conventions.