Learn R Programming

TrackReconstruction (version 1.3)

GraphLimits: Determine Latitude and Longitude limits of a graph

Description

Finds the minimum and maximum of the longitude and latitude and then adds on 2.5% of the latitude and longitude to create boarders in the graph and accounts in a very simple way for projection distortion so long as maps are not to large.

Usage

GraphLimits(infile)

Arguments

infile

A file with columns of latitude and longitude labeled as Latitude and Longitude

Value

Returns a list of 4 scalars defining the boarders of the data

Details

Internal function used in the Mapper function. It attempts to account for the change in distance covered between longitude as latitude changes by using the cos(latitude) of the center of the latitude of the graph, and adjusting the longitude to cover the same distance. Hence, the boarders on the graph are set first by making the distances in latitude and longitude approximately equal in meters, then 2.5% is added on each end.

Examples

Run this code
# NOT RUN {
#Standardize tag output
betas<-Standardize(1,1,-1,1,1,1,-57.8,68.76,-61.8,64.2,-70.16,58.08,-10.1,9.55,-9.75,9.72,
-9.91,9.43)
#get declination and inclination data for study area
decinc<-c(10.228,65.918)
#data set with 11 associated GPS fixes in the "gpsdata" data set
data(rawdata)
DRoutput<-DeadReckoning(rawdata ,betas, decinc, Hz = 16, RmL = 2, DepthHz = 1, SpdCalc=3,
MaxSpd=3.5)
#prepare GPS data
data(gpsdata02)
gpsformat<-GPStable(gpsdata02)
Georeferenced<-GeoReference(DRoutput,gpsformat[1:2,])
Limits<-GraphLimits(Georeferenced)
Limits
# }

Run the code above in your browser using DataLab