Skip to content

Commit

Permalink
Updated to OMNeT++ 6.0 and INET version 4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiden Valentine committed Sep 8, 2022
1 parent 8204099 commit 1c4ed8e
Show file tree
Hide file tree
Showing 34 changed files with 207 additions and 1,902 deletions.
2 changes: 1 addition & 1 deletion .cproject
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.1285866155" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.1219187897" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.link.option.paths.764289972" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.link.option.paths.764289972" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="/opt/local/lib"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1910133341" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
Expand Down
2 changes: 1 addition & 1 deletion .oppbuildspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<buildspec version="4.0">
<dir makemake-options="--make-so --deep -I/opt/local/include/igraph -I/Users/av288/omnetpp-5.7/samples/os3/src -ligraph -lxml2 -lz -lgmp -lblas -lglpk -llapack -larpack --meta:recurse --meta:export-include-path --meta:use-exported-include-paths --meta:export-library --meta:use-exported-libs --meta:feature-cflags --meta:feature-ldflags" path="src" type="makemake"/>
<dir makemake-options="--make-so --deep -I/opt/local/include/igraph -I/Users/av288/omnetpp-6.0/samples/os3/src -ligraph -lxml2 -lz -lgmp -lblas -lglpk -llapack -larpack --meta:recurse --meta:export-include-path --meta:use-exported-include-paths --meta:export-library --meta:use-exported-libs --meta:feature-cflags --meta:feature-ldflags" path="src" type="makemake"/>
<dir path="." type="custom"/>
</buildspec>
2 changes: 1 addition & 1 deletion .project
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<name>leosatellites</name>
<comment></comment>
<projects>
<project>inet4</project>
<project>inet4.4</project>
<project>os3</project>
</projects>
<buildSpec>
Expand Down
4 changes: 2 additions & 2 deletions .settings/language.settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-752866304400390766" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1420930569822462258" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand All @@ -16,7 +16,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-752866304400390766" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1420930569822462258" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
This project provides communication and mobility models that are built around the OS3 framework for OMNeT++/INET.
This project provides communication and mobility models that are built around the OS3 framework for OMNeT++/INET. OMNeT++ 6.0 and INET version 4.4 are used in this project version. The igraph library is used to create a topology every x seconds of the satelite constellations. K-Shortest-path implemention is only present in the dev build of igraph, therefore that required. See the makemake instructions for how the library (and its dependancies) can be added. A igraph project is included within my GitHub repo which can be cloned and referenced for use in this project.

Once the project has been cloned, right click on the project and go onto properties. Then go onto OMNeT++ > Makemake. Then double click on src: makemake to open the make file options. In the Compile tab the absolute path of the OS3 src folder should be specified as an include path. The following examples are done on a Linux system, but the setup should be almost identicle for macOS.

/Volumes/LocalDataHD/av288/omnetpp-5.6.2/samples/os3/src
/Volumes/LocalDataHD/av288/omnetpp-6.0/samples/os3/src

Then in the command line, set the enviroment as follows. It is vital that every directory mentioned is the respective directory for your system.

cd $HOME/omnetpp-5.6.2
cd $HOME/omnetpp-6.0

. setenv

\# then, the working directory is set to the /src/ folder of the leosatellites project.

cd $HOME/omnetpp-5.6.2/samples/leosatellites/src
cd $HOME/omnetpp-6.0/samples/leosatellites/src

\# note that depending on how inet is installed, it may appear as inet or inet4 (we use inet here) # this command generates the makefile. Make sure that the paths are correct for INET (the INET_PROJ variable) and OS3 (the OS3_PROJ variable).

opp_makemake --make-so -f --deep -O out -KINET_PROJ=$HOME/omnetpp-5.6.2/samples/inet -KOS3_PROJ=$HOME/omnetpp-5.6.2/samples/os3 -DINET_IMPORT '-I$(OS3_PROJ)/src' '-I$(INET_PROJ)/src' -I/usr/include/curl '-L$(INET_PROJ)/src' '-L$(OS3_PROJ)/src' '-lINET$(D)' '-los3$(D)'
opp_makemake --make-so -f --deep -KINET4_4_PROJ=$HOME/omnetpp-6.0/samples/inet4.4 -KOS3_PROJ=$HOME/omnetpp-6.0/samples/os3 -DINET_IMPORT '-I/opt/local/include/igraph -I$(OS3_PROJ)/src' '-I$(INET4_4_PROJ)/src' '-I/opt/homebrew/Cellar/curl/7.83.1/include/curl' '-L/opt/local/lib' '-L$(INET4_4_PROJ)/src' '-L$(OS3_PROJ)/src' '-ligraph' '-lxml2 -lz' '-lgmp' '-lblas' '-lglpk' '-llapack' '-larpack' '-lINET$(D)' '-los3$(D)'

\# this command builds the shared library for leosatellites

make MODE=release && make MODE=debug

Simulations can now be run, by first changing to the directory of the respective simulation. For example:

cd $HOME/omnetpp-5.6.2/samples/leosatellites/simulations/SatSGP4
cd $HOME/omnetpp-6.0/samples/leosatellites/simulations/SatSGP4

\# to run in debug mode

opp_run_dbg -m -u Qtenv -c Experiment-Image -n $HOME/omnetpp-5.6.2/samples/leosatellites/src:..:$HOME/omnetpp-5.6.2/samples/inet/src:$HOME/omnetpp-5.6.2/samples/inet/examples:$HOME/omnetpp-5.6.2/samples/inet/tutorials:$HOME/omnetpp-5.6.2/samples/inet/showcases:$HOME/omnetpp-5.6.2/samples/os3/simulations:$HOME/omnetpp-5.6.2/samples/os3/src --image-path=$HOME/omnetpp-5.6.2/samples/inet/images:$HOME/omnetpp-5.6.2/samples/os3/images -l $HOME/omnetpp-5.6.2/samples/leosatellites/src/leosatellites omnetpp.ini
opp_run_dbg -m -u Qtenv -c Experiment1 -n ../../src:..:../../../inet4.4/examples:../../../inet4.4/showcases:../../../inet4.4/src:../../../inet4.4/tests/validation:../../../inet4.4/tests/networks:../../../inet4.4/tutorials:../../../os3/simulations:../../../os3/src -x inet.common.selfdoc;inet.linklayer.configurator.gatescheduling.z3;inet.emulation;inet.showcases.visualizer.osg;inet.examples.emulation;inet.showcases.emulation;inet.transportlayer.tcp_lwip;inet.applications.voipstream;inet.visualizer.osg;inet.examples.voipstream --image-path=../../../inet4.4/images:../../../os3/images -l ../../src/leosatellites -l ../../../inet4.4/src/INET -l ../../../os3/src/os3 --debug-on-errors=true omnetpp.ini

\# to run in release mode

opp_run -m -u Qtenv -c Experiment-Image -n $HOME/omnetpp-5.6.2/samples/leosatellites/src:..:$HOME/omnetpp-5.6.2/samples/inet/src:$HOME/omnetpp-5.6.2/samples/inet/examples:$HOME/omnetpp-5.6.2/samples/inet/tutorials:$HOME/omnetpp-5.6.2/samples/inet/showcases:$HOME/omnetpp-5.6.2/samples/os3/simulations:$HOME/omnetpp-5.6.2/samples/os3/src --image-path=$HOME/omnetpp-5.6.2/samples/inet/images:$HOME/omnetpp-5.6.2/samples/os3/images -l $HOME/omnetpp-5.6.2/samples/leosatellites/src/leosatellites omnetpp.ini
opp_run -m -u Qtenv -c Experiment1 -n ../../src:..:../../../inet4.4/examples:../../../inet4.4/showcases:../../../inet4.4/src:../../../inet4.4/tests/validation:../../../inet4.4/tests/networks:../../../inet4.4/tutorials:../../../os3/simulations:../../../os3/src -x inet.common.selfdoc;inet.linklayer.configurator.gatescheduling.z3;inet.emulation;inet.showcases.visualizer.osg;inet.examples.emulation;inet.showcases.emulation;inet.transportlayer.tcp_lwip;inet.applications.voipstream;inet.visualizer.osg;inet.examples.voipstream --image-path=../../../inet4.4/images:../../../os3/images -l ../../src/leosatellites -l ../../../inet4.4/src/INET -l ../../../os3/src/os3 --debug-on-errors=true omnetpp.ini

# Source Code Referencing
If you use this code or want to cite its existence in your paper please use the following bibtex:
Expand Down
40 changes: 22 additions & 18 deletions simulations/SatSGP4/SatSGP4.ned
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
package leosatellites.simulations.SatSGP4;

import leosatellites.base.BasicSatellite;
import leosatellites.base.LaserSatellite;
import leosatellites.base.GroundStation;
import leosatellites.base.LaserSatellitePPP;
import leosatellites.base.GroundStationPPP;
import os3.base.MissionControlCenter;
import inet.physicallayer.contract.packetlevel.IRadioMedium;
import inet.physicallayer.apskradio.packetlevel.ApskScalarRadioMedium;
import inet.physicallayer.wireless.common.contract.packetlevel.IRadioMedium;
import inet.physicallayer.wireless.apsk.packetlevel.ApskScalarRadioMedium;
import os3.base.CNI_OS3;
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import leosatellites.networklayer.configurator.ipv4.SatelliteNetworkConfigurator;
import leosatellites.networklayer.configurator.ipv4.LeoIpv4NetworkConfigurator;
import inet.networklayer.configurator.ipv4.Ipv4FlatNetworkConfigurator;
import inet.visualizer.contract.IIntegratedVisualizer;
import inet.node.inet.WirelessHost;
import inet.node.inet.INetworkNode;
import inet.node.contract.INetworkNode;

import inet.common.geometry.common.SimpleGeographicCoordinateSystem;
import inet.common.geometry.common.OsgGeographicCoordinateSystem;
import inet.environment.objectcache.GridObjectCache;

import leosatellites.physicallayer.unitdisk.SatelliteUnitDiskTransmitter;
import leosatellites.physicallayer.propagation.SatellitePropagation;

import leosatellites.common.LeoChannelConstructor;
//
// Network SatSGP4 enables satellite movement on worldmap. This is the primary satellite network that
// is testing throughout the project by Aiden Valentine. The network has been largely adpated from the
Expand All @@ -32,29 +32,33 @@ network SatSGP4
parameters:
int numOfSats; // Number of satellites
int numOfGS; // Number of Mission Control Centers
double incl;
double alt;
int satsPerPlane;
int numOfPlanes;
@display("bgi=background_earth,s;bgb=2160,1080");
//@statistic[rtt](source=count(GS[0].app[0].rtt); record=figure; targetFigure=rttCounter; checkSignals=false);
//@figure[rttCounter](type=plot; pos=600,50; label="Round Trip Time");
submodules:
visualizer: <default("IntegratedCanvasVisualizer")> like IIntegratedVisualizer if hasVisualizer() {
@display("p=305.665,67.625`");
visualizer: <default(firstAvailableOrEmpty("IntegratedCanvasVisualizer"))> like IIntegratedVisualizer if typename != "" {
parameters:
@display("p=100,400;is=s");
}
configurator: SatelliteNetworkConfigurator {
configurator: LeoIpv4NetworkConfigurator {
@display("p=183.94,67.625");
}
satellite[numOfSats]: LaserSatellite { //LaserSatellite for using NoradA, Satellite for Ground-Relays using TLE
satellite[numOfSats]: LaserSatellitePPP { //LaserSatellite for using NoradA, Satellite for Ground-Relays using TLE
parameters:
@display("p=238.04,327.305;i=satellit_blue");
NoradModule.satPerPlane = parent.satsPerPlane;
NoradModule.planes = parent.numOfPlanes;
}
groundStation[numOfGS]: GroundStation {
groundStation[numOfGS]: GroundStationPPP {
parameters:
@display("p=238.04,343.535;r=10;i=device/receiverdish");
}
radioMedium: <default("UnitDiskRadioMedium")> like IRadioMedium {
//radioMedium: ApskScalarRadioMedium {
parameters:
//numChannels = 2;
@display("p=421.98,64.92;i=misc/sun");
channelConstructor: LeoChannelConstructor {
@display("p=704.06,601.0725;i=abstract/person,#17FF39;b=,,rect;is=vl;t=Channel Constructor");
}
connections allowunconnected:
}
Loading

0 comments on commit 1c4ed8e

Please sign in to comment.