Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cfg/InOut/Inp_NOS3.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<<<<<<<<<<<<<<<< 42 NOS3 Time Configuration File >>>>>>>>>>>>>>>>>>>
command ! NOS3 Time Bus
tcp://nos_engine_server:12001 ! NOS3 Time Connection String
tcp://nos-engine-server:12001 ! NOS3 Time Connection String
4 changes: 2 additions & 2 deletions cfg/nos3_defs/cpu1_device_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
*/
#define GENERIC_RADIO_CFG
#define GENERIC_RADIO_CFG_PROX_DATA_SIZE 64
#define GENERIC_RADIO_CFG_FSW_IP "nos_fsw"
#define GENERIC_RADIO_CFG_DEVICE_IP "radio_sim"
#define GENERIC_RADIO_CFG_FSW_IP "nos-fsw"
#define GENERIC_RADIO_CFG_DEVICE_IP "radio-sim"
#define GENERIC_RADIO_CFG_DEVICE_DELAY_MS 250
#define GENERIC_RADIO_CFG_UDP_PROX_TO_FSW 7010
#define GENERIC_RADIO_CFG_UDP_FSW_TO_PROX 7011
Expand Down
32 changes: 16 additions & 16 deletions cfg/sims/nos3-simulator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<absolute-start-time>814254200.0</absolute-start-time>
<sim-microseconds-per-tick>10000</sim-microseconds-per-tick>
<real-microseconds-per-tick>10000</real-microseconds-per-tick>
<nos-connection-string>tcp://nos_engine_server:12001</nos-connection-string>
<nos-connection-string>tcp://nos-engine-server:12001</nos-connection-string>
</common>

<simulators>
Expand All @@ -24,7 +24,7 @@
<connections>
<connection>
<type>time</type>
<nos-connection-string-override>tcp://sc_1_nos_engine_server:12001</nos-connection-string-override>
<nos-connection-string-override>tcp://sc01-nos-engine-server:12001</nos-connection-string-override>
<bus-name>command</bus-name>
<node-name>sc1-time-driver</node-name>
</connection>
Expand Down Expand Up @@ -112,7 +112,7 @@
</simulator>

<simulator>
<name>cmdbus_bridge</name>
<name>cmdbus-bridge</name>
<active>true</active>
<hardware-model>
<type>SIM_CMDBUS_BRIDGE</type>
Expand All @@ -131,7 +131,7 @@
<!-- -->

<simulator>
<name>sample_sim</name>
<name>sample-sim</name>
<active>true</active>
<library>libsample_sim.so</library>
<hardware-model>
Expand Down Expand Up @@ -212,7 +212,7 @@
</simulator>

<simulator>
<name>generic_eps_sim</name>
<name>generic-eps-sim</name>
<active>true</active>
<library>libgeneric_eps_sim.so</library>
<hardware-model>
Expand Down Expand Up @@ -380,7 +380,7 @@
</simulator>

<simulator>
<name>generic_css_sim</name>
<name>generic-css-sim</name>
<active>true</active>
<library>libgeneric_css_sim.so</library>
<hardware-model>
Expand Down Expand Up @@ -409,7 +409,7 @@
</simulator>

<simulator>
<name>generic_torquer_sim</name>
<name>generic-torquer-sim</name>
<active>true</active>
<library>libgeneric_torquer_sim.so</library>
<hardware-model>
Expand Down Expand Up @@ -440,7 +440,7 @@
</simulator>

<simulator>
<name>generic_thruster_sim</name>
<name>generic-thruster-sim</name>
<active>true</active>
<library>libgeneric_thruster_sim.so</library>
<hardware-model>
Expand Down Expand Up @@ -493,7 +493,7 @@
</simulator>

<simulator>
<name>generic_fss_sim</name>
<name>generic-fss-sim</name>
<active>true</active>
<library>libgeneric_fss_sim.so</library>
<hardware-model>
Expand All @@ -517,7 +517,7 @@
</simulator>

<simulator>
<name>generic_radio_sim</name>
<name>generic-radio-sim</name>
<active>true</active>
<library>libgeneric_radio_sim.so</library>
<hardware-model>
Expand All @@ -530,14 +530,14 @@
</connection>
<connection>
<name>fsw</name>
<ip>nos_fsw</ip>
<ip>nos-fsw</ip>
<ci-port>5010</ci-port>
<to-port>5011</to-port>
<radio-port>5015</radio-port>
</connection>
<connection>
<name>radio</name>
<ip>radio_sim</ip>
<ip>radio-sim</ip>
<cmd-port>5014</cmd-port>
</connection>
<connection>
Expand All @@ -561,7 +561,7 @@
</connection>
<connection>
<name>prox</name>
<ip>radio_sim</ip>
<ip>radio-sim</ip>
<rcv-port>7012</rcv-port>
<fsw-port>7010</fsw-port>
<fwd-port>7011</fdw-port>
Expand All @@ -575,7 +575,7 @@
</simulator>

<simulator>
<name>generic_imu_sim</name>
<name>generic-imu-sim</name>
<active>true</active>
<library>libgeneric_imu_sim.so</library>
<hardware-model>
Expand All @@ -602,7 +602,7 @@
</simulator>

<simulator>
<name>generic_mag_sim</name>
<name>generic-mag-sim</name>
<active>true</active>
<library>libgeneric_mag_sim.so</library>
<hardware-model>
Expand All @@ -629,7 +629,7 @@
</simulator>

<simulator>
<name>generic_star_tracker_sim</name>
<name>generic-star-tracker-sim</name>
<active>true</active>
<library>libgeneric_star_tracker_sim.so</library>
<hardware-model>
Expand Down
4 changes: 2 additions & 2 deletions cfg/sims/nos_engine_server_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"server_uris": [
{
"name": "fsw",
"server_uri": "tcp://nos_engine_server:12000"
"server_uri": "tcp://nos-engine-server:12000"
},
{
"name": "nos3",
"server_uri": "tcp://nos_engine_server:12001"
"server_uri": "tcp://nos-engine-server:12001"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion components/cryptolib
69 changes: 69 additions & 0 deletions docs/wiki/Architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Architecture

When NOS3 launches, it spawns docker containers to reduce the need to install and manage packages directly in Linux.

![NOS Basic Architecture](./_static/NOS_Basic.drawio.png)

The above image depicts installation Option A with a Linux Virtual Machine (VM) encasing everything.
When running in the VM, docker containers are networked to provide the modules expected in an operational simulator.

![image](./_static/NOS3-Container-Deployment.png)

Every process in NOS3 runs in its own container (as is best practice) and Docker networks are used to separate different groups of containers from one another.
On the top of the graphic is a cloud labeled 'COSMOS', but in current versions that can be either OpenC3, COSMOS, or YAMCS, the latter being the default.
This is the ground software with which the satellite(s) can be commanded.
Each satellite consists of a group of containers placed in its own network, illustrated in the grey cloud and labeled 'nos3_sc_1'.
Then there exists a group of universally necessary containers which can be shared between the different satellites, which are assigned to 'nos3-core'.

## Satellite(s)

Within each satellite, there are a variety of different "component" simulators to represent different parts of the vehicle.
These component simulators communicate via the NOS Engine middleware which provides interfaces via the hardware library (HWLIB) that model the behaviors at the bits and bytes level.
Flight software has no knowledge that it is not executing in space.
The dynamics engine (42) maintains the state of the spacecraft attitude, orientation, and environment and interfaces with the simulation.
These component simulators can have back doors for testing various fault scenarios that are accessible via the NOS Terminal or NOS UDP interfaces to enable scripting.

Note that multiple spacecraft have been tested as a proof of concept.
The configuration files can be edited to recreate this, but various limitations are present.

## Middleware - NOS Engine

NOS Engine is a message passing middleware designed specifically for use in simulation.
With a modular design, the library provides a powerful core layer that can be extended to simulate specific communication protocols, including I2C, SPI, and CAN Bus.
With advanced features like time synchronization, data manipulation, and fault injection, NOS Engine provides a fast, flexible, and reusable system for connecting and testing the pieces of a simulation.

NOS Engine is built on a conceptual model based on two fundamental types of objects: nodes and buses.
A node is any type of endpoint in the system capable of sending and/or receiving messages.
Any node in the system has to belong to a group, referred to as a bus.
A bus can have an arbitrary number of nodes, and each node on the bus must have a name that is unique from other member nodes.
The nodes of a bus operate in a sandbox; a node can communicate with another node on the same bus, but cannot talk to nodes that are members of a different bus.

Within NOS3, NOS Engine is used to provide software simulations of hardware buses.
NOS Engine provides the infrastructure for each hardware simulator to be a node on the appropriate bus and for the flight software to interact with hardware simulator nodes on their bus.
NOS Engine also provides plug-ins for various protocols such as I2C, SPI, CAN, and UART.
These plug-ins allow each bus and the nodes on that bus to communicate using calls and concepts specific to that protocol.

## Dynamics

42 is a general-purpose, multi-body, multi-spacecraft simulation.
For NOS3, it simulates the motion of the simulated spacecraft.
The progression of time for 42 is driven through NOS Engine and 42 provides output ephemeris, attitude, sun vector, magnetic field vector, and other environmental data to simulators that are part of NOS3.
42 is open source C code. For NOS3 it is installed on the virtual machine in the directory /home/jstar/.nos3/42.

## Directory Layout

The top level of NOS3 contains the following:
* `cfg` the configuration files for the mission and spacecraft
* `components` the repositories for the hardware component apps
* `docs` various documentation related to the project
* `fsw` the repositories for flight software
* `gsw` the repositories for ground station files and other ground tools
* `scripts` various convenience scripts
* `sims` the common simulators

Once you have forked or mirrored the top level NOS3 repository for your own use, it it recommended that only specific files be edited.
The directory structure has been setup to enable this and quick review of merge requests as they are ready:
* `cfg`, define your mission parameters
* `components`, develop custom components
* `gsw`, develop custom procedures and command/telemetry databases
* `scripts`, modify Dockerfile and various scripts to ensure the required toolchains for flight are included
2 changes: 1 addition & 1 deletion docs/wiki/NOS3_Architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Every process in NOS3 runs in its own container (as is best practice) and Docker
On the top of the graphic is a cloud labeled 'COSMOS', but in current versions that can be either OpenC3, COSMOS, or YAMCS, the latter being the default.
This is the ground software with which the satellite(s) can be commanded.
Each satellite consists of a group of containers placed in its own network, illustrated in the grey cloud and labeled 'nos3_sc_1'.
Then there exists a group of universally necessary containers which can be shared between the different satellites, which are assigned to 'nos3_core'.
Then there exists a group of universally necessary containers which can be shared between the different satellites, which are assigned to 'nos3-core'.

## Satellite(s)

Expand Down
2 changes: 1 addition & 1 deletion docs/wiki/NOS3_Flight_Software.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ NOS Engine supplies time on a created bus interface.

The interface is created with the following nos engine connection string:
```
“tcp://nos_engine_server:12000”
“tcp://nos-engine-server:12000”
```


Expand Down
Loading