gps fix
This commit is contained in:
parent
9dbd248cd3
commit
705845efa9
|
@ -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.
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue