How must the closure pipeline stage be modified to model an effective earth radius to account for refraction?

Categories:
Solution Number:
S20779
Last Modified:
2013-08-20
Issue

How must the closure pipeline stage be modified to model an effective earth radius to account for refraction?

Solution

The following simple test that incorporates the earth refractivity may be used to determine if a transmitter is too far from an receiver to reach it:D < sqrt (2KE) * (sqrt (Ht) + sqrt (Hr))All of the units are to be consistent in this formula: use meters for all variables, or feet for all variables, etc.E is the earth radius in metersK is the refractivity index (use the popular 1.33 value if a default value is needed.) Ht is the height of the transmitter, and Hr the height of the receiver above the earth surface.Note that is formula applies only when the nodes are close enough to the earth. For satellites or high-flying aircraft, the exisiting code may be used. Therefore, the modification to the pipeline stage involves creation of two cases which are handled separately in the code. Take the existing pipeline stage dra_closure.ps.c and modify it as follows:At the top of the function (right after the FIN statement):/* Use a simplified model to determine radio line of sight. This is applicable as long as the nodes *//* are not very high compared to the earth radius (this is used to simplify the math a bit). */#define ALT_THRESH 12756.0 /* 0.2% of earth radius */#define K2E 17008200.8 /* this is 2E * K, with K = 1.33; adjust K if you wish. *//* get the altitude for each node */tx_alt = op_td_get_dbl (pkptr, OPC_TDA_RA_TX_ALT);rx_alt = op_td_get_dbl (pkptr, OPC_TDA_RA_RX_ALT);/* We are using 0.2% of earth radius as not very high; note that this is still about 12 Km high! You could *//* easily use 1% and this formula would still be a very good approximation. *//* if either node is too high, then we can use the more elaborate approach to find LOS.*/if (tx_alt < ALT_THRESH && rx_alt < ALT_THRESH) { /* obtain the distance separating the tx and rx nodes. */ distance = op_td_get_dbl (pkptr, OPC_TDA_RA_START_DIST); /* test if there is LOS. */ if (distance * distance < K2E * (tx_alt + rx_alt + 2 * sqrt (tx_alt * rx_alt))) { occlude = OPC_FALSE; } else occlude = OPC_TRUE; }else { /* Existing code for LOS calculation goes here... */ /* NOTE THAT I HAVE NOT PROVIDED CODE FOR INCORPORATING */ /* an effective earth radius here by using K. Doing so with this code is a */ /* bit more complicated because the node positions would have to be adjusted as well. */ }/* This part is shared by both methods. *//* Place closure status in packet transmission data block. */op_td_set_int (pkptr...

Environment

Protocols->Wireless LAN,DES Kernel->Process Modeling/Coding

Attachments
NOTICE: Riverbed® product names have changed. Please refer to the Product List for a complete list of product names.
Can't find an answer? Create a case