亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? forms.c

?? 802.11仿真源碼 對分析RSSI很有用的
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*forms.cWritten by: Peter TzannesINPUT          ->    OUTPUTstrength'i'.txt     &            ->    analysed'i'.txtform'i'.csvwhere:  forms'i'.txt is the output of the strength.c file  form'i'.csv is the csv form fileand 'i' is an integer which represents different sample of data  The first few lines identify  - the confidence level  - the number of operating WLANs  - if the sample had ducted air-conditioning  - the number of people present while doing the experiment  This program calculates and writes to the output file for each MP:  - the distance from the router to all MP  - the room type   - the angle of incident between the router and MP  - the information form the strength.c programOUTPUT The output is in the format: Room> <MP> <Distance> <RSSI> < Number of excess packets >  <Number of total received packets> <Room number>  <Angle of Incident> and the <PER>   where "<>" identifies the use of a column. */#include <stdio.h>#include <stdlib.h>#include <string.h>#include <ctype.h>#include <math.h>#define MAXLINE 40#define KISLINE 350 //max line in Kismet form#define MAX_FIELD_SIZE 8#define pi 3.14159int router_found = 0; //variable used to determine if the experimental router was foundint low, high;        //the lowest and highest levels used in experimentint z = 0;            //global analyses counterint once = 0;         //ensure himidity is only run once float routerroomx, routerroomy, routerroomz; //router position coordinates of the roomdouble routerposx, routerposy, routerposz;   //router position cordinates relative to the origin//empty the contents of array tmpint empty(char *tmp){  int j;  for(j = 0 ; j<= MAX_FIELD_SIZE; j++)     tmp[j] = 0;    return(0);}//delete all commas in student numberint studnum(char *x) // the inital contents are x = #,1234567...{  int i,j;  char temp[BUFSIZ];    if (x[2] != 'z')    {      for(i = 0, j = 2; i <= strlen(x); i++, j++)	  temp[i] = x[j];            temp[7] = '\0';      strcpy(x, temp);    }  else // if students put the z in their student number    {      for(i = 0, j = 3; i <= strlen(x); i++, j++)	{	  temp[i] = x[j];      	}      temp[7] = '\0';      strcpy(x, temp);    }  return(0);}//delete commas in post codeint postcode(char *x) // initial contents are x = ,1234...{  int i,j;  char temp[BUFSIZ];  for(i = 0, j = 5; i <= strlen(x); i++, j++)    {      temp[i] = x[j];          }  temp[4] = '\0';  strcpy(x, temp);  return(0);}//Determines the number of floors used in the expeirment, using the data in the buildings form.//The highest floor is written to the variable floor, while the lowest floor is written to a variable low.int levelhouse(FILE *in){  char room[BUFSIZ], line[BUFSIZ];  int inc;  rewind(in);  for(inc = 0; inc < 6; inc++) //skip over first 6 lines      fgets(line, 150, in);  sscanf(line, "%s", room);  low = room[1];  fgets(line, 150, in);  sscanf(line, "%s", room);  high = room[1];  return(0);}//This function needs the relevent form'i'.txt file created by the program strength.c, //where the 'i' is the unique attribute number for that form. //The program then creates//Also calculates the angle of incidence, from router to MP and writes it to the file,//where 0 degrees means the router was directly op top of the MP. int form(int arg, int ROOM, int MP, FILE *out, int TMP, float distance, int rm_type, float displacementz){  FILE *fw;  char temp[BUFSIZ];    //a temp string  char line[MAXLINE];  const char *final = "strength";  int room, mp, pkt_over, pkt_total;  //int pkt_lost, pkt_recv;  float rssi;   float oldrssi = -1.0, angle = 0;   float per = 0;  float humidity = 0;  sprintf(temp,"%s%d.txt",final,arg); //form'i'.txt  fw = fopen(temp, "r");    if ((fw) == NULL)      exit(1);  if(once == 0) // global once counter  {    fgets(line, MAXLINE, fw);    sscanf(line,"%f\n", &humidity);    fprintf(out,"%f\n",humidity);    once++;  }  while(!feof(out))    {      fgets(line, MAXLINE, fw);      char *tmp;      tmp = (char *)malloc(60);       if(strcmp(line, "END") == 0)	return(0);      if(strcmp(line, "EMPTY") == 0)	return(0);      sscanf(line,"%g,%d,%d,%d,%d,%f\n", &per, &room, &mp, &pkt_over, &pkt_total, &rssi);      if(ROOM == 0)        //ROOM will be 0 if a line is not of the form ROOM MP RSSI        return(0);      if((ROOM == room) && (MP == mp))      {		if(displacementz >= 0)	  angle = (acos(displacementz/distance))*(180/pi); 	else	  angle = (asin(displacementz/distance))*(180/pi)+ 90;        fprintf(out, "%d %d %f %f %d %d %d %f %g\n", room, mp, distance, rssi, pkt_over, pkt_total, rm_type, angle, per);//printf output to file	       }      oldrssi = rssi;     //backup the rssi value.       }  fclose(fw);  return(0);}//This function determines the number of WLANs detected by Kismet, and then subtracts this from the //number of WLANs disabled during the experiment as recorded in the csv file. //It then writes number of operating WLANs to the output fileint kismet(int arg, FILE *out, FILE *in){  FILE *read;  char line[KISLINE];   char temp[10];    //a temp string  const char *kis = "Kismet";  int i = 0, j = 0, counter = 0;  sprintf(temp,"%s%d.csv",kis,arg); //form'i'.txt  read = fopen(temp, "r");    if ((read) == NULL)      exit(1);  fgets(line, KISLINE, read); //skip over first line  while(!feof(read))    {      fgets(line, KISLINE, read);      if(strlen(line) > 2) //skip counter over blank line	i++;    }  //find '802.11 disabled' in form  rewind(in);  while(j<18)  {    fgets(line, 100, in);       j++;  }  //deals with the first line of the 802.11 disabled section  fgets(line, KISLINE, in);      if(line[16] == '0')    counter++;  else    i--;    j = 0;  //deals with the rest  while(counter != 1)  {    fgets(line,KISLINE, in);        if(j == 4) //have recorded all fields in 802.11 disabled section    {      fprintf(out,"WLAN: 0%d \n",i);      return(0);    }    if(line[1] == '0')      counter++;    else      {	j++;	i--;      }  }  if((i >= 0) && (i <= 9)) //make number into 2 digits    fprintf(out,"WLAN: 0%d \n",i);  else    fprintf(out,"WLAN: %d \n",i);  return(0);}//Determines if the dwelling has airconditioning and the number of people//that were recorded in the spreadsheet, writes the result to the output fileint aircon_people(int arg, FILE *out, FILE *in){  char line[KISLINE];  int j = 0;  int yes = 1, no = 0;  rewind(in);  while(j < 15)  {    fgets(line,KISLINE, in);         j++;  }  fgets(line, KISLINE, in);    if(line[7] == '2')    fprintf(out,"AIR: %d \n",yes);  else    fprintf(out,"AIR: %d \n",no);    fgets(line, KISLINE, in);   if(line[9] == 0)   //if didn't fill in then assume only 1 person in dwelling    fprintf(out,"PEOPLE: %d \n",yes);   else    fprintf(out,"PEOPLE: %c \n",(line[9] - 1)); //greater than 9 people in dwelling are both set to 0,rest correspond to output number   return(0);}//This function is used to start from the beginning of the file, and find the beginning of the rooms. //Once found, all variables in that line are assigned a unique variable, so can be manipulated.//Depending on the fields set in the function call, either the coordinates or height of the router will be determined.int scan(int level, float xpos, float ypos, FILE *in, FILE *out, int coord, int height, int roomcoord, int confidence){  char room[BUFSIZ], line[BUFSIZ], temp[BUFSIZ];  int count = 0;  int inc; // major loop counter  int a,b,c,d,e,f,g,h,i,j,k, single,length,templ, test; //variables  float l,m,n,o,p; //variables  int roomcoordtemp = 1; //temp integer  float x,y,z; //coordinates  int perheight = 1.0; //height of the user when holding laptop  float displacementx, displacementy, displacementz; //displacement from MP to router at coordinates x,y,z   float dismag; //magnitude from the router  int one = 1;  rewind(in);  for(inc = 0; inc < 140; inc++)    {      a=b=c=d=e=f=g=h=i=j=k=-1;      l=m=n=o=p=-1.0;      fgets(line, BUFSIZ, in);      count =(sscanf(line, "%s", room));      if (strcmp(room,",,,Width") == 0)	{	  for(inc = 0; inc<150;inc++)	    {	      fgets(line, BUFSIZ, in);	      count =(sscanf(line, "%d,%d", &a,&b)); // read in first 2 numbers	      for(single = 0, count = 0, test = 0; single <= strlen(line); single++) //skip over works		{		  if (line[single] == ',')		      count++;		  if((count == 3) && (test == 0))		    {		      test = 1;		      for(length = single, templ = 0; length <= strlen(line); length++, templ++)			{			  temp[templ] = line[length];			}		    }  		}	      //read in all other variables	      count =(sscanf(temp, ",%f,%f,%f,%f,%d,%d,%d,%d,%d,%f,%d,%d,%d,%d", &l,&m,&n,&o,&c,&d,&e,&f,&g,&p,&h,&i,&j,&k)); //elements from a line	      if(coord == 1)       //coordinates of router need to be determined		{	  	    	  		  if(a == level)		    {		      routerroomx = n; //x coord of router		      routerroomy = o; //y coord of router		      if((xpos > l) || (ypos > o)) //students that meausred the router from the origin of the house			{			  routerroomx = xpos - n ; //position from origin minus coordinates of foom			  routerroomy = ypos - o;  //same method			  if ((routerroomx < 0) || (routerroomy < 0)) //if less than 0, then made a mistake			    {			      routerroomx = n;			      routerroomy = o;			    }			  return(0);			}		      return(0);		    }		}	      else if(height == 1) //height needs to be determined		{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91麻豆产精品久久久久久 | 亚洲国产精品精华液ab| 欧美日产国产精品| 一本色道a无线码一区v| 91亚洲精华国产精华精华液| 国产999精品久久久久久| 国产精品一区免费视频| 99精品久久免费看蜜臀剧情介绍| 久久成人免费电影| 精品一区二区三区免费视频| 麻豆精品视频在线观看| 久久精品国产免费| 国产精品自在在线| 不卡的电视剧免费网站有什么| 国产高清视频一区| 91亚洲精品乱码久久久久久蜜桃| 91免费国产在线观看| 精品视频色一区| 日韩免费福利电影在线观看| 久久久综合精品| 亚洲天堂福利av| 日韩专区中文字幕一区二区| 美女脱光内衣内裤视频久久网站| 国产精品自拍三区| 91网站视频在线观看| 欧美视频完全免费看| 91精品国产综合久久精品麻豆| 精品国产免费一区二区三区香蕉| 国产日韩高清在线| 亚洲国产精品精华液网站| 久久超碰97中文字幕| 成人白浆超碰人人人人| 欧美视频在线一区二区三区| 日韩欧美不卡在线观看视频| 国产精品青草综合久久久久99| 亚洲综合丝袜美腿| 国产精品资源在线| 欧美午夜不卡在线观看免费| 久久这里只有精品视频网| 一区二区三区四区视频精品免费| 久久99精品国产麻豆婷婷| 91香蕉国产在线观看软件| 欧美电影免费提供在线观看| 亚洲视频 欧洲视频| 美女在线一区二区| 91久久国产综合久久| 久久久久久久久蜜桃| 午夜影院久久久| eeuss影院一区二区三区| 91精品蜜臀在线一区尤物| 亚洲男人都懂的| 国产白丝精品91爽爽久久| 欧美肥大bbwbbw高潮| 亚洲欧洲精品天堂一级| 精品亚洲免费视频| 欧美一区日韩一区| 亚洲一级二级在线| 99在线精品免费| 久久女同性恋中文字幕| 蜜臀久久久久久久| 欧美日韩1区2区| 亚洲国产一区二区三区青草影视| 成人免费看的视频| 亚洲国产岛国毛片在线| 国产精品影音先锋| 久久亚洲精品国产精品紫薇| 青娱乐精品视频| 欧美一区二区三区在线观看视频| 亚洲曰韩产成在线| 日本道色综合久久| 一区二区高清在线| 91激情在线视频| 一区二区三区四区不卡在线 | 国产日韩欧美精品综合| 九九国产精品视频| 精品福利一区二区三区免费视频| 亚洲黄网站在线观看| 在线观看亚洲精品| 亚洲综合色网站| 欧美综合久久久| 亚洲综合在线五月| 欧美日韩国产一二三| 日韩精品一区第一页| 欧美福利视频导航| 蜜臀国产一区二区三区在线播放| 欧美一卡2卡三卡4卡5免费| 免费精品99久久国产综合精品| 日韩一级免费一区| 国产精品小仙女| 中文在线一区二区| 91精品91久久久中77777| 亚洲国产欧美日韩另类综合| 欧美乱妇15p| 久久99久久久久久久久久久| 久久美女高清视频| av不卡一区二区三区| 亚洲影视资源网| 日韩三级视频中文字幕| 国产精品99久久不卡二区| 最新久久zyz资源站| 欧美视频精品在线| 国产一区二区三区高清播放| 国产精品三级av在线播放| 欧美日韩在线综合| 国产精品一区三区| 亚洲国产日韩精品| 久久久亚洲高清| 色噜噜久久综合| 久久精品国产久精国产| 中文字幕在线一区免费| 4438x成人网最大色成网站| 久久99精品久久久久婷婷| 中文字幕一区av| 日韩亚洲欧美成人一区| www.久久久久久久久| 蜜桃视频第一区免费观看| 国产精品电影一区二区| 欧美精品第一页| 色综合色综合色综合 | 26uuu精品一区二区 | 无码av免费一区二区三区试看| 精品国产免费久久| 在线视频一区二区三区| 粉嫩嫩av羞羞动漫久久久| 日韩国产欧美在线视频| 亚洲视频一二区| 久久久亚洲精品石原莉奈| 7777精品伊人久久久大香线蕉的 | 免费视频一区二区| 亚洲免费视频成人| 欧美激情在线一区二区| 日韩色在线观看| 欧美三级视频在线播放| av一二三不卡影片| 国产一区二区不卡在线| 全国精品久久少妇| 亚洲午夜电影在线| 亚洲男人的天堂网| 国产精品免费看片| 国产午夜亚洲精品午夜鲁丝片 | 成人黄色在线视频| 国模套图日韩精品一区二区| 五月综合激情日本mⅴ| 亚洲综合丁香婷婷六月香| 成人免费小视频| 国产精品久久久久久久久晋中| 久久人人爽爽爽人久久久| 欧美videos大乳护士334| 制服丝袜中文字幕亚洲| 欧美电影在哪看比较好| 欧美浪妇xxxx高跟鞋交| 欧美欧美午夜aⅴ在线观看| 欧洲在线/亚洲| 欧美性色欧美a在线播放| 色婷婷av一区二区三区大白胸| 成人污视频在线观看| 成人性视频网站| av在线播放一区二区三区| 91香蕉视频在线| 色94色欧美sute亚洲线路一ni| 色噜噜狠狠色综合中国| 欧美三级三级三级爽爽爽| 在线播放一区二区三区| 91精品一区二区三区在线观看| 日韩亚洲欧美中文三级| 欧美成人猛片aaaaaaa| 久久精品一级爱片| 国产精品免费视频一区| 亚洲精品成a人| 免费在线观看一区二区三区| 国产在线视视频有精品| 成人综合日日夜夜| 欧美性大战久久| 欧美一区二区视频观看视频| 精品国产一区二区三区四区四| 国产欧美日本一区视频| 亚洲日韩欧美一区二区在线| 亚洲国产综合人成综合网站| 免费的成人av| www.欧美色图| 欧美丰满嫩嫩电影| 亚洲国产精品99久久久久久久久| 亚洲乱码日产精品bd| 免费在线观看日韩欧美| 成人精品在线视频观看| 7777精品伊人久久久大香线蕉超级流畅 | 日韩欧美久久久| 国产精品网站在线| 亚洲高清久久久| 国产成人在线色| 欧美日韩视频在线一区二区| 26uuu国产在线精品一区二区| 国产精品久久国产精麻豆99网站| 亚洲一级二级三级| 粉嫩绯色av一区二区在线观看| 色菇凉天天综合网| 国产嫩草影院久久久久| 三级欧美在线一区| 99久久久久久| 久久久精品黄色|