You are on page 1of 1

#include<stdio.

h>
#include<math.h>
#include<conio.h>
#include<stdlib.h>
#define var 1.7
#define pdop 3.303
void main()
{
float t1,t2,td,s,d;
float x,y,nx,ny,x1,y1;
float abx,aby,mx,my,acx,acy;
float est;
printf("Enter the time value t1 and t2\n");
scanf("%f %f",&t1,&t2);
printf("Enter the coodinates of GPS 1\n");
scanf("%f %f",&x1,&y1);
printf("Enter the coodinates of Component of GPS\n");
scanf("%f %f",&x,&y);
td=t2-t1;
d=sqrt(((x-x1)*(x-x1))+((y-y1)*(y-y1)));
s=(d/td);
nx=x+td*s;
ny=y+td*s;
printf("The Next state is %f,%f\n",nx,ny);
acx=x;
acy=y;
printf("The standard deviation is %f\n",var);
printf("The Postion Dilution of Precision is %f\n",pdop);
est=sqrt(((pdop*pdop)*(var*var))+1);
printf("The Standard Deviation is %f\n",est);
mx=nx-acx;
my=ny-acy;
if (mx<est){
abx=mx;
}
if (my<est){
aby=my;
}
printf("The Absolute Error is %f,%f\n",abx,aby);
}

You might also like