#include <bits/stdc++.h>
const double PI = acos(-1.0);
using namespace std;
long double dist(long double x1, long double y1, long double x2,
                 long double y2) {
  return ((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
int main() {
  ios_base::sync_with_stdio(false);
  int x, y, xx, yy;
  long double r, V, T, rr;
  int n;
  cin >> x >> y >> V >> T >> n;
  r = V * T;
  vector<pair<long double, long double> > v;
  v.reserve(n);
  for (int i = (0); i < n; i++) {
    cin >> xx >> yy >> rr;
    long double DD = dist(x, y, xx, yy);
    long double D = sqrt(DD);
    if (DD < rr * rr + 1e-9) {
      cout << 1 << endl;
      return 0;
    }
    if (D < rr + r) {
      long double dir = atan2((double)(yy - y), (double)(xx - x));
      if (dir < 0) dir += 2 * PI;
      long double ra;
      if (sqrt(DD - rr * rr) < r + 1e-9)
        ra = asin(rr / D);
      else
        ra = acos((D * D + r * r - rr * rr) / (2 * D * r));
      long double I = dir - ra;
      long double F = dir + ra;
      if (I < 0)
        v.push_back(make_pair(0, F)),
            v.push_back(make_pair(I + 2 * PI, 2 * PI));
      else if (F > 2 * PI)
        v.push_back(make_pair(0, F - 2 * PI)),
            v.push_back(make_pair(I, 2 * PI));
      else
        v.push_back(make_pair(I, F));
    }
  }
  long double res = 0;
  n = v.size();
  if (n == 0) {
    cout << 0 << endl;
    return 0;
  }
  sort(v.begin(), v.end());
  long double I = v[0].first, F = v[0].second;
  for (int i = (1); i < n; i++) {
    if (v[i].first > F + 1e-9) res += F - I, I = v[i].first;
    F = max(F, v[i].second);
  }
  res += F - I;
  cout << setprecision(10) << res / (2 * PI) << endl;
}
