Wireless-Innovation-Forum / 6-GHz-AFC

This repository contains code and data for testing the compliance of Automated Frequency Coordinator (AFC) software. The AFC is defined by the FCC in proceeding 18-295 on Unlicensed Use of the 6 GHz Band. This repository contains procedures, documentation, and tests for such software, and for the devices authorized by it. To contribute, please first read the CONTRIBUTING file in the repository for instructions.
14 stars 3 forks source link

AFCS.SIP2: Antenna number is None for some some incumbents #49

Closed alexcpn closed 7 months ago

alexcpn commented 8 months ago

While running the calculation for AFCS.SIP2

https://github.com/Wireless-Innovation-Forum/6-GHz-AFC/blob/main/src/harness/inquiries/AFCS.SIP.2.json https://github.com/Wireless-Innovation-Forum/6-GHz-AFC/blob/main/src/harness/masks/AFCS.SIP.2_mask.json

I am missing certain expected frequencies. On debugging I am getting the following errors from the parse Antenna table

[ERROR] Got antenna_number=None for WLG531 select antenna_number  from antenna   where unique_system_identifier =991328 and location_number =2 and antenna_type_code ='R'
[ERROR] Got antenna_number=None for WLG567 select antenna_number  from antenna   where unique_system_identifier =991362 and location_number =2 and antenna_type_code ='R'
[ERROR] Got antenna_number=None for WLE991 select antenna_number  from antenna   where unique_system_identifier =990273 and location_number =2 and antenna_type_code ='R'
[ERROR] Got antenna_number=None for WLE991 select antenna_number  from antenna   where unique_system_identifier =990273 and location_number =2 and antenna_type_code ='R'
[ERROR] Got antenna_number=None for WLG487 select antenna_number  from antenna   where unique_system_identifier =991291 and location_number =2 and antenna_type_code ='R'
[ERROR] Got antenna_number=None for WLG423 select antenna_number  from antenna   where unique_system_identifier =991234 and location_number =2 and antenna_type_code ='R'
[ERROR] Got antenna_number=None for WHS257 select antenna_number  from antenna   where unique_system_identifier =984560 and location_number =2 and antenna_type_code ='R'
[ERROR] Got antenna_number=None for WHY774 select antenna_number  from antenna   where unique_system_identifier =985915 and location_number =2 and antenna_type_code ='R'
[ERROR] Got antenna_number=None for WLJ416 select antenna_number  from antenna   where unique_system_identifier =992617 and location_number =2 and antenna_type_code ='R'

Directly parsing the same from AN.dat file gives the same result

AN|991328|||WLG531||1|1||T||13.7|SCALA ELECTRONICS|PR-950 (H)|3.6|H|24.0|18.2|132.7|||||||||||WELD BLDG|||1||||| -->ok antenna number, location number
AN|991328|||WLG531|||2||R||14.0|SCALA ELECTRONICS|PR-950 (H)|||24.0|18.2||||||||||||HELMICK ROCK|||1|||||
--> Not ok NaN, Location number

similarly

AN|991291|||WLG487||1|1||T||47.2|SCALA|PR-950|0.8|V|12.0|18.2|32.3|||||||||||WFVA-WBQB Studio, VA|||1||||| - ok
AN|991291|||WLG487|||2||R||98.1|SCALA|PR-950|||12.0|18.2||||||||||||WBQB Transmitter, VA|||1|||||
A - Not ok 

Since I am not able to process these incumbents further, not sure if I am deviating from expected due to these. And how to handle such entries

[INFO] Expected Frequency
[INFO] 5925-5930,upperBound:23.0 nominalValue:23.0
[INFO] 5930-5949,upperBound:11.1 nominalValue:9.1
[INFO] 5949-6050,upperBound:11.2 nominalValue:9.2
[INFO] 6050-6078,upperBound:23.0 nominalValue:23.0
[INFO] 6078-6109,upperBound:-0.4 nominalValue:-2.4
[INFO] 6109-6137,upperBound:23.0 nominalValue:23.0
[INFO] 6137-6168,upperBound:-0.3 nominalValue:-2.3
[INFO] 6168-6211,upperBound:23.0 nominalValue:23.0
[INFO] 6211-6241,upperBound:14.3 nominalValue:12.3
[INFO] 6241-6302,upperBound:7.1 nominalValue:5.1
[INFO] 6302-6331,upperBound:17.2 nominalValue:15.2
[INFO] 6331-6359,upperBound:20.9 nominalValue:18.9
[INFO] 6359-6392,upperBound:18.2 nominalValue:16.2
[INFO] 6392-6420,upperBound:18.3 nominalValue:16.3
[INFO] 6420-6425,upperBound:23.0 nominalValue:23.0
[INFO] 6525-6540,upperBound:23.0 nominalValue:23.0
[INFO] 6540-6570,upperBound:23.0 nominalValue:22.9
[INFO] 6570-6580,upperBound:23.0 nominalValue:23.0
[INFO] 6580-6590,upperBound:16.6 nominalValue:14.6
[INFO] 6590-6600,upperBound:23.0 nominalValue:22.7
[INFO] 6600-6610,upperBound:23.0 nominalValue:23.0
[INFO] 6610-6640,upperBound:17.1 nominalValue:15.1
[INFO] 6640-6650,upperBound:23.0 nominalValue:23.0
[INFO] 6676-6680,upperBound:19.9 nominalValue:17.9
[INFO] 6680-6694,upperBound:23.0 nominalValue:21.3
[INFO] 6694-6700,upperBound:23.0 nominalValue:21.4
[INFO] 6700-6710,upperBound:15.4 nominalValue:13.4
[INFO] 6710-6770,upperBound:23.0 nominalValue:23.0
[INFO] 6770-6800,upperBound:20.0 nominalValue:18.0
[INFO] 6800-6803,upperBound:23.0 nominalValue:23.0
[INFO] 6803-6808,upperBound:12.8 nominalValue:10.8
[INFO] 6808-6810,upperBound:23.0 nominalValue:23.0
[INFO] 6810-6820,upperBound:23.0 nominalValue:21.0
[INFO] 6820-6850,upperBound:23.0 nominalValue:23.0
[INFO] 6850-6860,upperBound:8.8 nominalValue:6.8
[INFO] 6860-6870,upperBound:17.1 nominalValue:15.1
[INFO] 6870-6875,upperBound:23.0 nominalValue:23.0
[INFO] Calculated Frequency
[INFO] 5925.0-5930.025  psd: 23.0
[INFO] 5930.025-5990.025  psd: 6.219191836425139
[INFO] 5990.025-5990.025  psd: 13.85296052719508
[INFO] 5990.025-6049.325  psd: 6.305186061950664
[INFO] 6049.325-6049.325  psd: 13.938954752720633
[INFO] 6049.325-6049.325  psd: 6.735629829972865
[INFO] 6049.325-6078.8  psd: 20.544533585352156
[INFO] 6078.8-6078.8  psd: 14.752804037801184
[INFO] 6078.8-6108.45  psd: 20.58690124882682
[INFO] 6108.45-6108.45  psd: 19.707454580243535
[INFO] 6108.45-6182.24  psd: 23.0
[INFO] 6182.24-6212.24  psd: 20.936217148698717
[INFO] 6212.24-6212.24  psd: 22.69089925450075
[INFO] 6212.24-6241.89  psd: 10.153347855745494
[INFO] 6241.89-6241.89  psd: 22.01576242664595
[INFO] 6241.89-6241.89  psd: 10.166160438213751
[INFO] 6241.89-6241.89  psd: 22.732356824034753
[INFO] 6241.89-6301.365  psd: 10.28888165057397
[INFO] 6301.365-6301.365  psd: 2.3875370096089483
[INFO] 6301.365-6360.665  psd: 21.371769755427493
[INFO] 6360.665-6419.965  psd: 21.45275269207636
[INFO] 6419.965-6419.965  psd: 18.65690619256381
[INFO] 6419.965-6419.965  psd: 10.26858071224217
[INFO] 6419.965-6425.0  psd: 23.0
[INFO] 6525.0-6540.0  psd: 23.0
[INFO] 6540.0-6570.0  psd: 18.975517513951672
[INFO] 6570.0-6580.0  psd: 23.0
[INFO] 6580.0-6590.0  psd: 22.982061224444777
[INFO] 6590.0-6600.0  psd: 16.745014053790953
[INFO] 6600.0-6600.0  psd: 18.49004492119849
[INFO] 6600.0-6610.0  psd: 17.228282029739717
[INFO] 6610.0-6640.0  psd: 8.105362298937578
[INFO] 6640.0-6640.0  psd: 14.74214179332975
[INFO] 6640.0-6670.0  psd: 18.407024789643486
[INFO] 6670.0-6675.2  psd: 0
[INFO] 6675.2-6700.0  psd: 23.0
[INFO] 6700.0-6710.0  psd: 7.891977330796422
[INFO] 6710.0-6740.0  psd: 23.0
[INFO] 6740.0-6750.0  psd: 22.929933803037386
[INFO] 6750.0-6760.0  psd: 21.334022352800133
[INFO] 6760.0-6770.0  psd: 21.346871304311975
[INFO] 6770.0-6770.0  psd: 20.06551084449481
[INFO] 6770.0-6800.0  psd: 5.0818170848481685
[INFO] 6800.0-6800.0  psd: 17.24195391811736
[INFO] 6800.0-6800.0  psd: 22.236040062833467
[INFO] 6800.0-6830.0  psd: 20.920960112729716
[INFO] 6830.0-6840.0  psd: 21.436285663715978
[INFO] 6840.0-6850.0  psd: 22.07539302837614
[INFO] 6850.0-6860.0  psd: 23.0
[INFO] 6860.0-6870.0  psd: 9.10214734191419
[INFO] 6870.0-6875.0  psd: 23.0
AEgbert commented 8 months ago

For the examples you provided with missing antenna numbers, the path number does appear to be provided. The listed path number should allow you to link these antennas to the associated transmitter and continue processing.

alexcpn commented 8 months ago

@AEgbert

To get the transmit antenna parameters from the path table, I use a query like

       sql=f"select transmit_location_number ,transmit_antenna_number ,path_number  from  path \
        where  unique_system_identifier ={record['unique_system_identifier']} and \
        receiver_location_number = {record['receiver_location_number']} and \
        receiver_antenna_number ={record['receiver_antenna_number']}"

For this I need the receiver_antenna_number. I tried without this just to checked the path data without receiver antenna number and this is missing in path data as well

select receiver_location_number ,receiver_antenna_number ,transmit_location_number ,transmit_antenna_number ,path_number  from  path 
        where  unique_system_identifier =991328 and 
        receiver_location_number =2  

image

PA|991327|||WLG530||1|1|1|1|2||Fixed Point-to-Point|N||||||||||
PA|991328|||WLG531||1|1|1|2|||Fixed Point-to-Point|N||N|||||||| --> Receiver antenna missing here as well
PA|991329|||WLG532||1|1|1|1|2||Fixed Point-to-Point|N|||||||||
alexcpn commented 7 months ago

I was earlier also using the Receiver antenna number to select from path; I found that I can skip that and still select the entries from the path table as the receiver_location_number is identifying the row correctly

Earlier

     sql=f"select transmit_location_number ,transmit_antenna_number ,path_number  from  path \
        where  unique_system_identifier ={record['unique_system_identifier']} and \
        receiver_location_number = {record['receiver_location_number']} \
        and   receiver_antenna_number ={record['receiver_antenna_number']}" #

Now

     sql=f"select transmit_location_number ,transmit_antenna_number ,path_number  from  path \
        where  unique_system_identifier ={record['unique_system_identifier']} and \
        receiver_location_number = {record['receiver_location_number']}"
        #and   receiver_antenna_number ={record['receiver_antenna_number']}" #
alexcpn commented 7 months ago

Closing this as