#include <stdio.h>

#include "radius.h"

inline float RcalcN(WifiPair* pCur){
return pow(10, (pCur->nS0 - pCur->S)/(10*pCur->nPow));
}

inline float dRdN(WifiPair* pCur, float R){
return R/(10*pCur->nPow*log10(exp(1)));
}

inline float dRdS0(WifiPair* pCur, float R){
return 10. * pCur->Rcalc * pow(log10(pCur->Rcalc),2) /
  log10(exp(1)) /
  (pCur->S - pCur->nS0);
}

