This commit is contained in:
David St-Onge 2017-01-31 00:48:42 -05:00
parent 9dbd248cd3
commit 705845efa9
2 changed files with 3 additions and 1 deletions

View File

@ -97,7 +97,9 @@ void gps_from_rb(double range, double bearing, double out[3]) {
double lon = cur_pos[1]*M_PI/180.0;
bearing = bearing*M_PI/180.0;
out[0] = asin(sin(lat) * cos(range/EARTH_RADIUS) + cos(lat) * sin(range/EARTH_RADIUS) * cos(bearing));
out[0] = out[0]*180.0/M_PI;
out[1] = lon + atan2(sin(bearing) * sin(range/EARTH_RADIUS) * cos(lat), cos(range/EARTH_RADIUS) - sin(lat)*sin(out[0]));
out[1] = out[1]*180.0/M_PI;
out[2] = height; //constant height.
}

View File

@ -12,7 +12,7 @@ function updated_neigh(){
neighbors.broadcast(updated, update_no)
}
TARGET_ALTITUDE = 10.01
TARGET_ALTITUDE = 10.0
# Lennard-Jones parameters
TARGET = 50.0 #0.000001001