Exemple #1
0
def rotate_from_ecef_to_enu(lat, lon):
    """rotate_from_ecef_to_enu(lat, lon)

    Parameters
    -----------

    lat :  array_like    latitude (degrees)
    lon :  array_like    longitude (degrees)

    Returns
    -------
    versor : array_like euclid.Versor representing the transformation from ECEF
    to ENU
    """
    ## Note the negative sign on the latitude
    return ned2enu.compose(charts.Pitch(lon)).compose(charts.Roll(-lat))
Exemple #2
0
from isceobj.Util.geo import charts

## Function that converts a coordinate instance to ECEF
to_ecef = methodcaller('ecef')
## Function that converts a coordinate instance to LLH
to_llh = methodcaller('llh')
## Function that converts a coordinate instance to LTP
to_ltp = lambda inst, peg_point=None: inst.ltp(peg_point=peg_point)
## Function that converts a coordinate instance to SCH
to_sch = lambda inst, peg_point=None: inst.sch(peg_point=peg_point)

## <a href="http://mathworld.wolfram.com/AliasTransformation.html">Alias
## transformation</a> from
## <a href="http://en.wikipedia.org/wiki/North_east_down">North East Down</a>
## to <a href="http://en.wikipedia.org/wiki/Geodetic_system#Local_east.2C_north.2C_up_.28ENU.29_coordinates">East North Up</a>
ned2enu = charts.Roll(90).compose(charts.Pitch(90))

## <a href="http://mathworld.wolfram.com/AliasTransformation.html">Alias
## transformation</a> to <a href="http://en.wikipedia.org/wiki/North_east_down">
## NED</a> from <a href="http://en.wikipedia.org/wiki/Geodetic_system#Local_east.2C_north.2C_up_.28ENU.29_coordinates">ENU</a>
enu2ned = ~ned2enu

## A peg point is simple enough to be a more than a
##<a href="http://docs.python.org/library/collections.html#collections.namedtuple">
## namedtuple</a>.
PegPoint = namedtuple("PegPoint", "lat lon hdg")

## Latitude and Longitude pairs are common enough to get a namedtuple.
LatLon = namedtuple("LatLon", "lat lon")