- // TODO: Add noise and other errors.
-/*
-
- // Bias and random error
- double random_factor = sg_random();
- double random_error = 1.4;
- double error_radius = 5.1;
- double bias_max_radius = 5.1;
- double random_max_radius = 1.4;
-
- bias_length += (random_factor-0.5) * 1.0e-3;
- if (bias_length <= 0.0) bias_length = 0.0;
- else if (bias_length >= bias_max_radius) bias_length = bias_max_radius;
- bias_angle += (random_factor-0.5) * 1.0e-3;
- if (bias_angle <= 0.0) bias_angle = 0.0;
- else if (bias_angle >= 360.0) bias_angle = 360.0;
-
- double random_length = random_factor * random_max_radius;
- double random_angle = random_factor * 360.0;
-
- double bias_x = bias_length * cos(bias_angle * SG_PI / 180.0);
- double bias_y = bias_length * sin(bias_angle * SG_PI / 180.0);
- double random_x = random_length * cos(random_angle * SG_PI / 180.0);
- double random_y = random_length * sin(random_angle * SG_PI / 180.0);
- double error_x = bias_x + random_x;
- double error_y = bias_y + random_y;
- double error_length = sqrt(error_x*error_x + error_y*error_y);
- double error_angle = atan(error_y / error_x) * 180.0 / SG_PI;
-
- double lat2;
- double lon2;
- double az2;
- geo_direct_wgs_84 ( altitude_m, latitude_deg,
- longitude_deg, error_angle,
- error_length, &lat2, &lon2,
- &az2 );
- //cout << lat2 << " " << lon2 << endl;
- printf("%f %f \n", bias_length, bias_angle);
- printf("%3.7f %3.7f \n", lat2, lon2);
- printf("%f %f \n", error_length, error_angle);
-
-*/