A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
geocentric-ecef-mobility-model.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Jesse Chiu <jessest94106@gmail.com>
7 */
8
9#ifndef GEOCENTRIC_ECEF_MOBILITY_MODEL_H
10#define GEOCENTRIC_ECEF_MOBILITY_MODEL_H
11
13
14namespace ns3
15{
16
17/**
18 * @ingroup mobility
19 * @ingroup leo
20 * @brief Fixed geocentric mobility model whose generic position is ECEF
21 *
22 * This class adapts GeocentricConstantPositionMobilityModel for NTN scenarios
23 * where fixed ground nodes and satellite nodes must report positions in the
24 * same coordinate frame through the generic MobilityModel API.
25 *
26 * GeocentricConstantPositionMobilityModel provides GetGeocentricPosition() for
27 * ECEF (Earth-Centered Earth-Fixed) coordinates, but its GetPosition() reports
28 * the local topocentric/ENU (East-North-Up) position. LEO satellite mobility
29 * models report ECEF coordinates from GetPosition(). Some NR, 3GPP propagation,
30 * spectrum, and antenna geometry code queries nodes only through
31 * MobilityModel::GetPosition(), so changing those call sites to use
32 * GetGeocentricPosition() would require broader API changes.
33 *
34 * GeocentricEcefMobilityModel therefore overrides DoGetPosition() so
35 * GetPosition() returns the same ECEF coordinates as GetGeocentricPosition(),
36 * while retaining the geographic and geocentric accessors from the parent class.
37 *
38 * @internal
39 * TODO: Consider if a unified units/coordinate system framework could
40 * eliminate the need for specialized mobility model classes like this one
41 * by allowing positions to carry their coordinate system metadata.
42 */
44{
45 public:
46 /**
47 * Register this type with the TypeId system.
48 * @return the object TypeId
49 */
50 static TypeId GetTypeId();
51
52 /**
53 * Create a geocentric ECEF mobility model
54 */
56
57 /**
58 * Destructor
59 */
60 ~GeocentricEcefMobilityModel() override = default;
61
62 private:
63 /**
64 * @brief Override to return ECEF coordinates instead of ENU
65 * @return the position in ECEF (Earth-Centered Earth-Fixed) coordinates
66 *
67 * This overrides the parent class's DoGetPosition() which returns ENU coordinates.
68 * Instead, this returns the same ECEF coordinates as DoGetGeocentricPosition().
69 */
70 Vector DoGetPosition() const override;
71};
72
73} // namespace ns3
74
75#endif /* GEOCENTRIC_ECEF_MOBILITY_MODEL_H */
GeocentricConstantPositionMobilityModel()=default
Create a position located at coordinates (0,0,0).
~GeocentricEcefMobilityModel() override=default
Destructor.
static TypeId GetTypeId()
Register this type with the TypeId system.
GeocentricEcefMobilityModel()=default
Create a geocentric ECEF mobility model.
Vector DoGetPosition() const override
Override to return ECEF coordinates instead of ENU.
a unique identifier for an interface.
Definition type-id.h:50
Class GeocentricConstantPositionMobilityModel declaration.
Every class exported by the ns3 library is enclosed in the ns3 namespace.