用类处理线路阻抗数据。

Signed-off-by: facat@lab.com <facat@lab.com>
This commit is contained in:
facat@lab.com
2014-12-26 21:21:58 +08:00
parent 45a76228c4
commit 57dc9e9728
9 changed files with 107 additions and 4 deletions

View File

@@ -0,0 +1,24 @@
#include "line.h"
Line::Line(const QPair<QString,QString>& fromTo, ACLineSegment* ac):Branch(1,fromTo.first,fromTo.second)
{
this->ac=ac;
}
void Line::extract()
{
ACLineSegment *ac=this->ac;
double length=ac->getLength();
//单位阻抗
double r0=0.01;
double x0=0.01;
double g0=0;
double b0=0;
this->r=r0*length;
this->x=x0*length;
this->g1=g0*length;
this->g2=g0*length;
this->b1=b0*length;
this->b2=b0*length;
}