Directional antenna in WSN - sensors

When using directional antenna in wireless sensor network, suppose there are two nodes, A and B. A and B will be able to transmit data only if both their beams intersect.
But my question is, will B be able to receive data from A, if B lies on the active sector of A but their beams don't intersect?

Related

Data evaluation across multiple dimensions

So I am stuck on a task for which I need some guidance. I have two datasets in hand. One is output of a SVM, has 4 dimensions and represents DoE data, which will be later used for training a ML model. On the other hand, I have calibration data which is based on the 4 dimensions mentioned previously. Now, the task I have at hand is to verify if this calibration data falls within the DoE data, preferably at its center and how each individual operating point in the calibration data is distributed along the 4 dimensions. I need to do this later for all the calibration points to verify the accuracy of the DoE data.
Can anyone suggest how I can proceed with this?

Satisfiability 3-towers assignment

I have stared at this assignment for far too long now and I simply don't understand what I am supposed to do exactly. We are given a 3x3 chess board and have to produce some propositonal clauses to this problem. This is what information we have been given:
Write a Python program that generates the input for a SAT
solver to solve the 3-Towers problem:
a) Write a function pair2int(r,c)
which maps (1,1), (1,2), ..., (3,3) to 1 to 9
using the formula 3*(r-1)+c.
b) Write nested for-loops that go through
all positions on the board from (1,1) to (3,3)
and produces clauses that represent attacks.
c) Write a for-loop that produces clauses that
specify that all 3 rows contain a tower
We are expected to write clauses in Conjunctive normal form as far as I understand. Could also be done directly in DIMACS
So I have done the a part, but I simply don't understand how I am supposed to express attacks or even what an attack constitutes, exactly.
This is the part of the program that I have done (a):
def pair2int(r):
return [3*(p[0]-1)+p[1] for p in r]
print(pair2int([(1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3)]))
which simply returns a list of positions 1-9 on a 3x3 board:
[1,2,3,4,5,6,7,8,9]
I don't understand what I am supposed to do with this.
Can somebody push me in the right direction?
The three towers (rooks) have to be put on the chessboard without attacking eachother. Towers can either move horizontally (within a row) or vertically (within a column). Therefore, towers attack eachother if they are put on the same row or on the same column.
A problem solution consists of a set of coordinates (1..3;1..3) or cell numbers (1..9) of the three towers.
A possible binary encoding for tower coordinates consists of four binary variables per tower:
row (encoded with two bits)
column (encoded with two bits)
As alternative, you could encode the cell number 1..9 per tower. This also would require four bits per tower or 12 bits in total.
The constraints to be expressed as clauses:
All towers must have valid coordinates within the chessboard
No pair of towers shares the same row (i.e. one tower per row)
No pair of towers shares the same column (i.e. one tower per column)
3 towers is a simplification of the n queens problem.
Example solution for 8 rooks (Wikipedia):

How to link segments on a draw in Excel

I have a plot in Excel (displayed below) which includes 5 different segments (A, B, C, D and E). These segments were drawn separately and move also separately. Now, I would like to do two things:
"link" them together in other that if, I move the intersection point between A and B then the length of A and B automatically adjust (however keeping the intersection point between B and C static).
I like to force Excel to consider segment A for example vertical. In other words, it means that if I move the intersection between segments A and B as stated under 1, then segment A parallelly moves and stays vertical.
Is there a way to do these 2 things in Excel (I guess maybe in the configuration of the draw)?

How to calculate the neighbouring grids on geohash. Algorithms required

Hi I am working with a database with an implementation of geohash
So as shown above, as the zoom level goes down (6 zoom levels), more of abcd gets inserted into each grid. I have represented them as a rigid grid; however, the central point is different for all the grids. So for example, distance from a to b will not be the same as distance from a to c.
If it was a rigid grid, I can just get the closest four neighbouring grids; however, I cannot do that as the distances vary and the closest neighbours are not necessarily orthogonal. Only information that I have from the database is the centra point of each grid and the geohash key e.g. aa, ab, etc..
How will I find girds that are just north, west, east and south of each grid for every zoom level? (have 6 zoom levels)
As you can see a cell that ends in, for example, d, has a cell with the same prefix but ending in b north of it. This allows you to set up a mapping table.
In the cases where, like cb going north, you end up at ad, the trick is to recognize that going north from *b you need to look at the previous character (in this case, the c), go north from that character (a) and add the south-most edge of that column (d).
In short, it's a matter of implementing some mapping tables and some logic to deal with the edges.

Does getting a Cell id of mobile device will work to get accurate position of mobile phone in j2me

If I get the cell id
Will it work to get the exact location of the mobile devices through j2me programming?
I got to know how to get cell id by this link:
Can I fetch position of mobile device in j2me having no GPS service using information from cell tower
But whether to get location accurate is still a question?
One Single cell is not enough to get you the accurate location. you need at least 3 different cell to get a location as accurate as GPS
What the cell information can do for you is give you a good information of the area and measurements
See API Information http://www.opencellid.org/api
How To
Get a cell ID and save the distance
When the user cell changes .. get the distance using same API
As soon as you are able to get an additional cell information start triangulation
Triangulation http://en.wikipedia.org/wiki/Triangulation
Calculate distance between P1 and P2.
Calculate the distance between P1 and the center point of the new n-sphere
Calculate the ratio new n-sphere/d. (Used to find per-dimension distances between P1 and the centerpoint of the new n-sphere.
Calculate square of radius
Calculate center point of new n-sphere
Calculate distance between P1 and P2 on this dimension
Calculate distance between P1 and the center point of the new n-sphere on this dimension
Calculate the coordinate of the center point of the new n-sphere on this dimension.
Have only implemented the calculation on client side PHP not j2me ...
Thanks
:)
In short, no. To get an accurate location you need a mobile device with built-in GPS.
The Cell ID is a number identifying the cellphone tower that the mobile device is connected to. Therefore at best you can get the position of the cellphone tower, and use that as an estimate of the user position.
Also note that API's such as http://www.opencellid.org/api only give an estimate of the cell tower position based on data from other users, so it might not even be an accurate position for the cell tower.
In my experience this will work reasonably well in densely populated cities - you can get an accuracy of about 200-500m (still not close to what you'd get with a GPS). However, in more rural areas the accuracy could be as low as 10 or 20 km.
As pointed out by Baba, triangulation can give you a more accurate position. However, for this you need the distances to at least 3 towers, while in J2ME you can only get the ID of the closest tower (not even the distance). Some network operators do triangulation themselves, as they have all the data available to them. However, you'll have to talk to the specific network operators if you want access to this data.

Resources