Getting Started: Finding Reference Libraries
Nominal provides a lot of simulation code that can be accessed. The C# solution file provided with Nominal Editor has the lowest level of API connection to the source possible and has the most amount of exposed functionality. It can be tricky to find functions and components that already exist when developing custom code in this solution.
C# API
Nominal’s core infrastructure code is deployed in a C# solution environment. As such, all simulation components, except some camera or visualization-specific code, are written in C# in the back end. The code is auto-documented and this documentation can be found in the API
section of this documentation.
Namespaces
There are several namespaces that are exposed in the documentation. Some are more useful than others when it comes to writing custom C# components.
NominalSystems.Classes
: This is the main namespace that includes all spacecraft components such as solar panels, transmitters, flight software, reaction wheels and more. Most components created will inherit from a class found here.NominalSystems.Core
: The core infrastructure and architecture code can be found in this namespace, which includes the base classes for components, messages and simulations.NominalSystems.External
: This namespace includes functions and classes for accessing external hardware and software connections, such as MQTT, USB and TCP.NominalSystems.Maritime
: This is a new namespace that includes some sample components for maritime objects such as vessels.NominalSystems.Maths
: This namespace includes mathematical functions and structures for using mathematical operations in Nominal simulations. These include Vector and Matrix classes and operations associated with them.NominalSystems.Messages
: All simulation messages that exist within the Nominal infrastructure are found here and include their payload and message classes.NominalSystems.Universe
: This namespace contains the background classes for Universe functionality, including spacecraft, ground stations and planets.
Finding Properties
For each class that exists within the API documentation, there are several fields, properties and methods available. In C#, fields and properties are both class-level variables that can be accessed. The way they function internally is different but to develop components, they can be considered to both be variables. For example, the SolarPanel
class has the following properties and fields available publicly.
Note
When searching for public functions or documentation on specific properties, it is recommended that the Nominal C# API documentation is the first point of reference to use as this is the direct simulation architecture code.