A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
LeoConstellationTracer Class Reference

Helper class to trace LEO constellation mobility and/or antenna pointing. More...

Collaboration diagram for LeoConstellationTracer:

Public Member Functions

 LeoConstellationTracer (Ptr< Node > groundNode, LeoMode mode, Ptr< ThreeGppPropagationLossModel > propagationLossModel, Vector groundNodePosGEO, Vector groundNodePosECEF, std::ostream *traceStream)
 Construct a LeoConstellationTracer.
void CourseChange (Ptr< const MobilityModel > mob) const
 CourseChange callback that outputs trace data.
Vector GeneratePoint (const Vector &nodePosECEF, const double azimuth, const double inclination) const
 Compute a point along a satellite's antenna pointing direction.
void UpdateAntennaOrientation (Ptr< Node > node, Time period) const
 Periodically steer a satellite node's antenna toward the ground station.

Private Attributes

Ptr< Nodem_groundNode
 Ground station node.
Vector m_groundNodePosECEF
 Ground station ECEF position.
Vector m_groundNodePosGEO
 Ground station geodetic position.
LeoMode m_mode
 Simulation mode.
Ptr< ThreeGppPropagationLossModelm_propagationLossModel
 Propagation loss model.
std::ostream * m_traceStream
 Output stream for trace data.

Detailed Description

Helper class to trace LEO constellation mobility and/or antenna pointing.

This tracer periodically updates satellite antenna orientation toward a fixed ground station, optionally computes propagation loss, and outputs trace data including satellite position, antenna pointing vector endpoints, path loss, slant distance, and elevation angle.

Definition at line 95 of file leo-satellite-example.cc.

Constructor & Destructor Documentation

◆ LeoConstellationTracer()

LeoConstellationTracer::LeoConstellationTracer ( Ptr< Node > groundNode,
LeoMode mode,
Ptr< ThreeGppPropagationLossModel > propagationLossModel,
Vector groundNodePosGEO,
Vector groundNodePosECEF,
std::ostream * traceStream )
inline

Construct a LeoConstellationTracer.

Parameters
groundNodePointer to the ground station node.
modeThe simulation mode.
propagationLossModelThe propagation loss model (can be null for non-channel modes).
groundNodePosGEOGround station geodetic position (lat/lon/alt).
groundNodePosECEFGround station ECEF position (x/y/z in meters).
traceStreamOutput stream for trace data.

Definition at line 108 of file leo-satellite-example.cc.

References m_groundNode, m_groundNodePosECEF, m_groundNodePosGEO, m_mode, m_propagationLossModel, m_traceStream, and propagationLossModel.

Member Function Documentation

◆ CourseChange()

void LeoConstellationTracer::CourseChange ( Ptr< const MobilityModel > mob) const

CourseChange callback that outputs trace data.

The output columns depend on the mode:

  • orbit: Time,Satellite,x,y,z,Speed
  • antenna: Time,Satellite,x,y,z,x_2,y_2,z_2
  • channel: Time,Satellite,x,y,z,x_2,y_2,z_2,PathLoss_dB,SlantDistance_m,ElevationAngle_deg
Parameters
mobthe satellite mobility model that changed course.

Definition at line 251 of file leo-satellite-example.cc.

References Antenna, ns3::GeographicPositions::CartesianToGeographicCoordinates(), Channel, ns3::ConstCast(), GeneratePoint(), ns3::GeographicPositions::GeographicToTopocentricCoordinates(), ns3::Angles::GetInclination(), groundStation, m_groundNode, m_mode, m_propagationLossModel, ns3::Simulator::Now(), Orbit, ns3::RadiansToDegrees(), and ns3::GeographicPositions::SPHERE.

Here is the call graph for this function:

◆ GeneratePoint()

Vector LeoConstellationTracer::GeneratePoint ( const Vector & nodePosECEF,
const double azimuth,
const double inclination ) const

Compute a point along a satellite's antenna pointing direction.

Given a satellite position in ECEF and its antenna azimuth and inclination angles, this function returns a second ECEF point at the end of the antenna orientation vector (whose length equals the satellite-to-ground-station distance). The two points can be used to visualize the antenna pointing direction.

Parameters
nodePosECEFthe satellite node ECEF position.
azimuththe antenna azimuth angle in radians.
inclinationthe antenna inclination angle in radians.
Returns
ECEF coordinate of the endpoint of the orientation vector.

Definition at line 209 of file leo-satellite-example.cc.

References ns3::GeographicPositions::CartesianToGeographicCoordinates(), ns3::GeographicPositions::GeographicToCartesianCoordinates(), groundStation, ns3::GeographicPositions::SPHERE, and ns3::GeographicPositions::TopocentricToGeographicCoordinates().

Referenced by CourseChange().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateAntennaOrientation()

void LeoConstellationTracer::UpdateAntennaOrientation ( Ptr< Node > node,
Time period ) const

Periodically steer a satellite node's antenna toward the ground station.

The antenna angles are computed from the relative position between the satellite and a fixed ground station, then applied to the node's uniform planar antenna array.

Parameters
nodethe satellite node.
periodthe interval at which to update the antenna angles (seconds).

Definition at line 175 of file leo-satellite-example.cc.

References ns3::GeographicPositions::CartesianToGeographicCoordinates(), ns3::GeographicPositions::GeographicToTopocentricCoordinates(), ns3::Angles::GetAzimuth(), ns3::Angles::GetInclination(), groundStation, ns3::Simulator::Schedule(), ns3::UniformPlanarArray::SetAlpha(), ns3::GeographicPositions::SPHERE, and UpdateAntennaOrientation().

Referenced by UpdateAntennaOrientation().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_groundNode

Ptr<Node> LeoConstellationTracer::m_groundNode
private

Ground station node.

Definition at line 167 of file leo-satellite-example.cc.

Referenced by LeoConstellationTracer(), and CourseChange().

◆ m_groundNodePosECEF

Vector LeoConstellationTracer::m_groundNodePosECEF
private

Ground station ECEF position.

Definition at line 170 of file leo-satellite-example.cc.

Referenced by LeoConstellationTracer().

◆ m_groundNodePosGEO

Vector LeoConstellationTracer::m_groundNodePosGEO
private

Ground station geodetic position.

Definition at line 169 of file leo-satellite-example.cc.

Referenced by LeoConstellationTracer().

◆ m_mode

LeoMode LeoConstellationTracer::m_mode
private

Simulation mode.

Definition at line 166 of file leo-satellite-example.cc.

Referenced by LeoConstellationTracer(), and CourseChange().

◆ m_propagationLossModel

Ptr<ThreeGppPropagationLossModel> LeoConstellationTracer::m_propagationLossModel
private

Propagation loss model.

Definition at line 168 of file leo-satellite-example.cc.

Referenced by LeoConstellationTracer(), and CourseChange().

◆ m_traceStream

std::ostream* LeoConstellationTracer::m_traceStream
private

Output stream for trace data.

Definition at line 171 of file leo-satellite-example.cc.

Referenced by LeoConstellationTracer().


The documentation for this class was generated from the following file: