Global Mapper v25.0

Importing a Polar Plot to GM

acgardiner
acgardiner Global Mapper UserTrusted User
edited April 2008 in Technical Support
Is it possible to import into GM a set of signal coverage contours? I have an Excel file which includes in one column degrees (every 5 degrees from 0 to 360) and distance in kilometres in the other. The only GIS information I have for the contours are the latitude and longitude of the transmitter site. I need to display each contour as a continuous black line which typically appears as a cardioid pattern.

Comments

  • global_mapper
    global_mapper Administrator
    edited April 2008
    There really is not any support for something like that (i.e. a file listing angles and distances instead of coordinates) right now. What you could maybe do in Excel is create a formula to create new columns with the actual X and Y coordinates associated with each distance angle pair. Then you could save a CSV file from Excel with the X and Y coordinate columns and load that into Global Mapper.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • acgardiner
    acgardiner Global Mapper User Trusted User
    edited April 2008
    So I guess what I need to do is find a formula (using plane geometry as opposed to spherical since I'm dealing with distances of less than 100 km) that converts the points, expressed in polar coordinates, to latitude & longitude. Whew!! Where to start - guess I'll try browsing if I can come up with the right key words...............
  • global_mapper
    global_mapper Administrator
    edited April 2008
    That should work. For planar geometry, try the following:

    new_lon = orig_lon + ( dist / 108000 ) * cos( angle ) / cos( start_lat )
    new_lat = orig_lat + ( dist / 108000 ) * sin( angle )

    Note that the division by 108,000 is to approximate converting the distance from meters to degrees.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • acgardiner
    acgardiner Global Mapper User Trusted User
    edited April 2008
    Mike,

    Just to confirm, is that formula based on degrees (as opposed to radians) and kilometres (as opposed to miles or whatever)??
  • global_mapper
    global_mapper Administrator
    edited April 2008
    The formula assumes distances in meters. The formula doesn't specify degrees or radians, just convert as appropriate for whatever the sin and cos functions in Excel expect.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • acgardiner
    acgardiner Global Mapper User Trusted User
    edited April 2008
    I am assuming that zero degrees is true north so assume (I believe you assumed zero degrees would be on the positive x-axis) so I believe your formulas would read:

    new_lat = orig_lat + (dist/108000) * cos(angle)

    new_lon = orig_lon + (dist/108000) * sin(angle) / sin(start_lat)

    But I'm confused over the last expression in calculating longitude, i.e. sin(start/lat). Do you mean the starting latitude in decimal degrees?
  • global_mapper
    global_mapper Administrator
    edited April 2008
    The divide factor should remain cos( start_lat ) as the angle of the starting latitude is not dependent on whether you are using cartesian or cartographic angles. This factor is for adjusting for the curvature of the earth and the fact that lines of longitude get closer together as you get away from the equator. Thus it takes more degrees of longitude to get a set distance than it does degrees of latitude as you get further from the equator. The equation obviously fails at the poles, which is why a rigorous implementation would obviously use a much more complex algorithm that would be a pain to implement in Excel.

    I also think that rather than flipping sin and cos for the other angles that you should convert your cartographic angle to cartesian with the following formula (angles in degrees):

    cartesian_angle = 90 - cartographic_angle

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • acgardiner
    acgardiner Global Mapper User Trusted User
    edited April 2008
    But changing to cartesian won't improve the accuracy will it?

    I also think that rather than flipping sin and cos for the other angles that you should convert your cartographic angle to cartesian with the following formula (angles in degrees):

    cartesian_angle = 90 - cartographic_angle

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • global_mapper
    global_mapper Administrator
    edited April 2008
    No, won't affect the accuracy, I just haven't thought through whether flipping the sin and cos will work in all cases, so I suggested the alternative that I know should work. If you know flipping the sin and cos will work in all quadrants then go with that.
  • acgardiner
    acgardiner Global Mapper User Trusted User
    edited April 2008
    No, won't affect the accuracy, I just haven't thought through whether flipping the sin and cos will work in all cases, so I suggested the alternative that I know should work. If you know flipping the sin and cos will work in all quadrants then go with that.

    Works like a hot darn! Many, many thanks again, Mike, for the fabulous srvice!