Last modified 4 years ago
You are here: Manual / Seamcat / seamcatmath
TracNav
SEAMCAT Manual Table of contents
- About this Wiki
- About the STG (SEAMCAT Technical Group)
- About the source code
- Frequently Asked Questions
- How to register on TracTool?
- Tutorial videos
- Known Issues
- Disclaimer
Introduction
Main structural elements of SEAMCAT
Data elements
- SEAMCAT Data types
- Function entry dialog window
- Emissions mask dialog window
- Random distribution dialog window
- Antenna pattern dialog window
- Signal display window
- How to generate a truncated distribution?
Simulation workspace
Creating SEAMCAT scenario
- Simulation scenario and its programming
- Victim link dialog window
- Interfering link dialog window
- CDMA system dialog window
- Sharing and importing scenarios
CDMA module
- CDMA Module Overview
- CDMA Simulation Engine (CDMAE)
- CDMA system dialog window
- CDMA Link level data
- CDMA simulation algorithm
- CDMA input parameters
- CDMA output results
OFDMA module
Cognitive Radio System module
Performing a simulation
- Simulation control settings
- Running a simulation (event generation)
- Calculating probability of interference
Simulation results
- Producing simulation report
- Logging options and Remote server
- Saving results in .csv format
Library of scenario elements
- SEAMCAT Library
- Antenna elements
- Receiver elements
- Transmitter elements
- CDMA Link level data
- Propagation model plugins
- Post processing plugins
- Setting up environment for programming plugins
- Exporting and importing a library
Special functions
Detailed algorithms
- Calculation of wanted signal (dRSS)
- Calculation of unwanted and blocking signals (iRSS)
- Calculation of overloading (iRSS)
- Calculation of intermodulation signal (iRSS)
- Interference calculation (non-CDMA/non-OFDMA)
- CDMA simulation algorithm
- OFDMA simulation algorithm
Elementary calculations
- Relative location of VR and IT (Simulation Radius)
- Relative location of transceivers within a link
- Calculation of azimuths and elevations (within a link)
- Calculation of azimuths and elevations (IT-VR path)
- Calculation of antenna gains
- Calculation of VR blocking attenuation
- Calculation of the coverage radius of a transmitter
- Calculation of IT power control gain
- Calculation of IT (unwanted) emissions
Propagation models
- Guide to propagation models in SEAMCAT
- How to test propagation model?
- ITU-R P.1546 model
- Extended Hata and Hata-SRD models
- Spherical diffraction model
- Free Space Loss model
- User-defined model (Propagation plug-in)
- JTG5-6 propagation plug-in
- SE42 propagation plug-in
- Longley Rice propagation plug-in
- Winner propagation plug-in
- IEEE 802.11 Model C (modified) plug-in
Reference annexes
- Setting antenna height, pointing azimuth and elevation
- Setting path azimuths in links
- Setting blocking attenuation of victim receiver
- Scenario consistency check
- Error and warning messages
Example Scenarios
Release to be tested by STG
Seamcat Math
package org.seamcat.mathematics;
import static java.lang.Math.PI;
/**
* This class contains the needed mathematic functions not included in the J2SE
* standard Math-class
*
* @author Christian Petersen
*/
public class Mathematics {
private static double DEFAULT_DELOG = -1000;
private static double last_dbm;
private static double last_res;
public static double calculateDistance(double x1, double y1, double x2,
double y2) {
return Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
public static final double delogaritmize(double value) {
if (value == 0) {
return DEFAULT_DELOG;
}
return Math.pow(10, value / 10);
}
public static final double fromdBm2Watt(double dbm) {
if (last_dbm != dbm) {
last_res = Math.pow(10, (dbm - 30) / 10);
last_dbm = dbm;
}
return last_res;
}
public static double fromLinearTodB(double value) {
return 10 * Math.log10(value);
}
public static final double fromWatt2dBm(double watt) {
if (watt == 0) {
return DEFAULT_DELOG;
}
return 10 * Math.log10(watt) + 30;
}
public static final double powerSummation(double… powers) {
double total = 0;
for (double power : powers) {
if (power != 0.0) {
total += Math.pow(10, (power - 30) / 10);
}
}
return 10 * Math.log10(total) + 30;
}
public static final double round(double d) {
if (d == 0) {
return 0.0d;
}
return Math.rint(d * 1000) / 1000;
}
private static final double DEGRAD = PI / 180.0;
private static final double RADEG = 180.0 / PI;
/**
* Returns the arc cosine of an angle, in the range of 0.0 through pi.
*
* @param angle
* given in degrees
* @return The arc cosine of an angle given in degrees, in the range of 0.0
* through pi.
*/
public static double acosD(double angle) {
return Math.acos(angle) * RADEG;
}
/**
* Returns the arc sine of an angle, in the range of -pi/2 through pi/2.
*
* @param x
* angle given in degrees
* @return The arc sine of an angle given in degrees, in the range of -pi/2
* through pi/2.
*/
public static double asinD(double x) {
return Math.asin(x) * RADEG;
}
/**
* Converts rectangular coordinates (x, y) to polar (r, theta).
*
* @param x
* @param y
* @return The arc tangent of an angle in degrees specified by rectangular
* coordinates.
*/
public static double atan2D(double x, double y) {
return Math.atan2(y, x) * RADEG;
}
/**
* Returns the arc tangent of an angle, in the range of -pi/2 through pi/2.
*
* @param angle
* given in degrees
* @return The arc tangent of an angle given degrees, in the range of -pi/2
* through pi/2.
*/
public static double atanD(double angle) {
return RADEG * Math.atan(angle);
}
/**
* Returns the trigonometric cosine of an angle
*
* @param angle
* in degrees
* @return The trigonometric cosine of an angle in degrees
*/
public static double cosD(double angle) {
return Math.cos(angle * DEGRAD);
}
/**
* Hyberbolic Cosine function
*
* @param x
* @return The hyberbolic cosine value of given argument
*/
public static double cosh(double x) {
return (Math.exp(x) + Math.exp(-x)) / 2;
}
/**
* Return average value of an array of <code>double</code> values.
*
* @param p
* Array of double values
* @return The average value of array range from 0 - p.length
*/
public static double getAverage(double[] p) {
return Mathematics.getAverage(p, p.length);
}
/**
* Return average value of an array of <code>double</code> values, for
* <code>length</code> length of array.
*
* @param p
* Array of double values
* @param length
* The number of array entries to average over
* @return The average value of array range from 0 - <code>length</code>
*/
public static double getAverage(double[] p, int length) {
double sum = 0;
for (int i = 0; i < length && i < p.length; i++) {
sum += p[i];
}
return sum / length;
}
/**
* Return Standard Deviation of array
*
* @param p
* Array of double values
* @return getStdDev(p,ave,p.length)
*/
public static double getStdDev(double[] p) {
return Mathematics.getStdDev(p, Mathematics.getAverage(p), p.length);
}
/**
* Return Standard Deviation of array with given average.
*
* @param p
* Array of double values
* @param ave
* Average value of p
* @return getStdDev(p,ave,p.length)
*/
public static double getStdDev(double[] p, double ave) {
return Mathematics.getStdDev(p, ave, p.length);
}
/**
* Return Standard Deviation of array with given average and length
*
* @param p
* Array of double values
* @param ave
* Average value of p
* @param length
* The number of array which has been averaged over
* @return Standard deviation of array values ranging from 0 - length
*/
public static double getStdDev(double[] p, double ave, int length) {
double sum = 0;
for (int i = 0; i < length && i < p.length; i++) {
double dev = ave - p[i];
sum += dev * dev;
}
return Math.sqrt(sum / (length - 1));
}
/**
* Return maximum value of double array
*
* @param p
* Array of double values
* @return highest entry value.
*/
public static double max(double[] p) {
double max = Double.NEGATIVE_INFINITY;
for (int i = 0; i < p.length; i++) {
if (p[i] > max) {
max = p[i];
}
}
return max;
}
/**
* Return minimum value of double array
*
* @param p
* Array of double values
* @return lowest entry value
*/
public static double min(double[] p) {
double min = Double.MAX_VALUE;
for (int i = 0; i < p.length; i++) {
if (p[i] < min) {
min = p[i];
}
}
return min;
}
/**
* Returns the trigonometric sine of an angle
*
* @param angle
* in degrees
* @return The trigonometric sine of an angle in degrees
*/
public static double sinD(double angle) {
return Math.sin(angle * DEGRAD);
}
/**
* Hyberbolic Sine function
*
* @param x
* @return The hyberbolic sine value of given argument
*/
public static double sinh(double x) {
return (Math.exp(x) - Math.exp(-x)) / 2;
}
/**
* Returns the trigonometric tangent of an angle
*
* @param angle
* in degrees
* @return The trigonometric tangent of an angle in degrees
*/
public static double tanD(double angle) {
return Math.tan(angle * DEGRAD);
}
/**
* Hyberbolic trigonometric tangent function
*
* @param x
* @return The hyberbolic trigonometric tangent value of given argument
*/
public static double tanh(double x) {
return (Math.exp(x) - Math.exp(-x)) / (Math.exp(x) + Math.exp(-x));
}
/**
* All methods are static - this constructor prevents instantiation of this
* class
*/
private Mathematics() {
}
}
