Esempio n. 1
0
def LV(stfrom, stto, error=0.001, insthgt=0.0, trgthgt=0.0, obsdate=None):
    angle = stfrom.heightDifferenceTo(stto, instofst=insthgt, trgtofst=trgthgt)
    return Obs(
        "LV",
        obsdate=obsdate,
        obsvalue=ObsVal(
            stfrom.code(), stto.code(), angle, error, insthgt=insthgt, trgthgt=trgthgt
        ),
    )
Esempio n. 2
0
def SD(stfrom, stto, error=0.001, insthgt=0.0, trgthgt=0.0, obsdate=None):
    angle = stfrom.distanceTo(stto, instofst=insthgt, trgtofst=trgthgt)
    return Obs(
        "SD",
        obsdate=obsdate,
        obsvalue=ObsVal(
            stfrom.code(), stto.code(), angle, error, insthgt=insthgt, trgthgt=trgthgt
        ),
    )
Esempio n. 3
0
def AZ(stfrom, stto, error=0.001, insthgt=0.0, trgthgt=0.0, obsdate=None):
    angle = stfrom.azimuthTo(stto, instofst=insthgt, trgtofst=trgthgt)
    return Obs(
        "AZ",
        obsdate=obsdate,
        obsvalue=ObsVal(
            stfrom.code(), stto.code(), angle, error, insthgt=insthgt, trgthgt=trgthgt
        ),
    )
Esempio n. 4
0
def GX(stfrom, error=0.001, insthgt=0.0, trgthgt=0.0, obsdate=None):
    xyz = stfrom.xyz(offset=insthgt)
    covar = np.identity(3) * error * error
    obs = Obs(
        "GX",
        obsdate=obsdate,
        obsvalue=ObsVal(stfrom.code(), value=xyz, insthgt=insthgt),
    )
    obs.setCovariance(covar)
    return obs
Esempio n. 5
0
def ZD(stfrom, stto, error=0.001, insthgt=0.0, trgthgt=0.0, refcoef=0.0, obsdate=None):
    angle = stfrom.zenithDistanceTo(
        stto, instofst=insthgt, trgtofst=trgthgt, refcoef=refcoef
    )
    return Obs(
        "ZD",
        obsdate=obsdate,
        obsvalue=ObsVal(
            stfrom.code(), stto.code(), angle, error, insthgt=insthgt, trgthgt=trgthgt
        ),
    )
Esempio n. 6
0
def GB(stfrom, stto, error=0.001, insthgt=0.0, trgthgt=0.0, obsdate=None):
    xyz0 = stfrom.xyz(offset=insthgt)
    xyz2 = stto.xyz(offset=trgthgt)
    dxyz = xyz2 - xyz0
    covar = np.identity(3) * error * error
    obs = Obs(
        "GB",
        obsdate=obsdate,
        obsvalue=ObsVal(
            stfrom.code(), stto.code(), value=dxyz, insthgt=insthgt, trgthgt=trgthgt
        ),
    )
    obs.setCovariance(covar)
    return obs
Esempio n. 7
0
def HA(
    stfrom, targets, offset=0.0, error=0.001, insthgt=0.0, trgthgt=0.0, obsdate=None
):
    ha = Obs("HA", obsdate=obsdate)
    refha = None
    for stto in targets:
        angle = stfrom.azimuthTo(stto, instofst=insthgt, trgtofst=trgthgt)
        if refha is None:
            refha = angle - offset
        angle = angle - refha
        if angle < 0:
            angle += 360.0
        ha.addObservation(
            ObsVal(
                stfrom.code(),
                stto.code(),
                angle,
                error,
                insthgt=insthgt,
                trgthgt=trgthgt,
            )
        )
    return ha