mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-08 10:03:58 +02:00
fixup: normalize vector to satellite
This commit is contained in:
parent
3fb0969930
commit
f6786c3a66
2 changed files with 4 additions and 3 deletions
|
@ -46,8 +46,9 @@ LeoPropagationLossModel::~LeoPropagationLossModel ()
|
|||
double
|
||||
LeoPropagationLossModel::GetAngle (Ptr<MobilityModel> a, Ptr<MobilityModel> b)
|
||||
{
|
||||
Vector3D pa = a->GetPosition ();
|
||||
Vector3D pa = a->GetPosition () - b->GetPosition ();
|
||||
Vector3D pb = b->GetPosition ();
|
||||
pb = Vector3D (-pb.x, -pb.y, -pb.z);
|
||||
|
||||
double prod = abs ((pa.x * pb.x) + (pa.y * pb.y) + (pa.z * pb.z));
|
||||
double norm = pb.GetLength () * pa.GetLength ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue