-
Notifications
You must be signed in to change notification settings - Fork 0
Dead Reckoning
Howard (Luhao) Wang edited this page Jun 13, 2019
·
8 revisions
#Samprith Kalakata
#May, 2019
#Attempting to calculate significant wave height from data generated from SmartFin (https://smartfin.org/)
#Research consulted: https://journals.ametsoc.org/doi/pdf/10.1175/2010JTECHO724.1
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from mpl_toolkits.basemap import Basemap
import pandas as pd
import numpy as np
from scipy import stats
from scipy import constants
from scipy import signal #added
from scipy.interpolate import CubicSpline
from scipy.interpolate import interp1d
from scipy.integrate import simps
from scipy.integrate import cumtrapz
from scipy.signal import butter, lfilter, freqz
import os
import datetime
import pytz
import re
import peakutils
import statsmodels.api as sm
import requests
import mpld3
import folium
#import cmocean
import skinematics as skin
from skinematics import quat, vector, misc, rotmat, imus, view
import pygame
from plotly import tools #added all the plotly's
import plotly.offline
import plotly.graph_objs as go
import math #added
import re #added
# For the definition of the abstract base class IMU_Base
import abc
import sys
# %matplotlib notebook
%matplotlib inline
ride_ids = ['15218']
# 14743 - Motion Control July 10th
# 14750 - Magnetometer Control July 11th
# 14814 - Pool Displacement Control July 17th
# 14815 - Compass Orientation (Lying on Charger Side) July 19th
# 14816 - Orientation w Higher Sampling (Lying on Charger Side) July 20th
# 14827 - Pool Displacement Control w Higher Sampling (Jul 23)
# 14888 - First Buoy Calibration Experiment (July 30)
# 15218 - Jasmine's Second Ride Sesh filmed with GoPro (Aug 29)
#%% Fin ID scraper
# Input fin ID, get all ride IDs
# base URL to which we'll append given fin IDs
fin_url_base = 'http://surf.smartfin.org/fin/'
# Look for the following text in the HTML contents in fcn below
str_id_ride = 'rideId = \'' # backslash allows us to look for single quote
str_id_date = 'var date = \'' # backslash allows us to look for single quote
#%% Ride ID scraper
# Input ride ID, get ocean and motion CSVs
# Base URL to which we'll append given ride IDs
ride_url_base = 'https://surf.smartfin.org/ride/'
# Look for the following text in the HTML contents in fcn below
str_id_csv = 'img id="temperatureChart" class="chart" src="'
def get_csv_from_ride_id(rid):
# Build URL for each individual ride
ride_url = ride_url_base+str(rid)
print(ride_url)
# Get contents of ride_url
html_contents = requests.get(ride_url).text
# Find CSV identifier
loc_csv_id = html_contents.find(str_id_csv)
# Different based on whether user logged in with FB or Google
offset_googleOAuth = [46, 114]
offset_facebkOAuth = [46, 112]
if html_contents[loc_csv_id+59] == 'f': # Facebook login
off0 = offset_facebkOAuth[0]
off1 = offset_facebkOAuth[1]
else: # Google login
off0 = offset_googleOAuth[0]
off1 = offset_googleOAuth[1]
csv_id_longstr = html_contents[loc_csv_id+off0:loc_csv_id+off1]
# print(csv_id_longstr)
# Stitch together full URL for CSV
if ("media" in csv_id_longstr) & ("Calibration" not in html_contents): # other junk URLs can exist and break everything
ocean_csv_url = 'https://surf.smartfin.org/'+csv_id_longstr+'Ocean.CSV'
motion_csv_url = 'https://surf.smartfin.org/'+csv_id_longstr+'Motion.CSV'
print(ocean_csv_url)
# Go to ocean_csv_url and grab contents (theoretically, a CSV)
ocean_df_small = pd.read_csv(ocean_csv_url, parse_dates = [0])
elapsed_timedelta = (ocean_df_small['UTC']-ocean_df_small['UTC'][0])
ocean_df_small['elapsed'] = elapsed_timedelta/np.timedelta64(1, 's')
motion_df_small = pd.read_csv(motion_csv_url, parse_dates = [0])
# Reindex on timestamp if there are at least a few rows
if len(ocean_df_small) > 1:
ocean_df_small.set_index('UTC', drop = True, append = False, inplace = True)
motion_df_small.set_index('UTC', drop = True, append = False, inplace = True)
#print(ocean_df_small)
#May need to change this sampling interval:
sample_interval = '33ms'
ocean_df_small_resample = ocean_df_small.resample(sample_interval).mean()
motion_df_small_resample = motion_df_small.resample(sample_interval).mean()
# No need to save many extra rows with no fix
motion_df_small = motion_df_small[~np.isnan(motion_df_small.Latitude)]
return ocean_df_small_resample, motion_df_small_resample
else:
ocean_df_small_resample = pd.DataFrame() # empty DF just so something is returned
motion_df_small_resample = pd.DataFrame()
return ocean_df_small_resample, motion_df_small_resample
appended_ocean_list = [] # list of DataFrames from original CSVs
appended_motion_list = []
appended_multiIndex = [] # fin_id & ride_id used to identify each DataFrame
## Nested loops (for each fin ID, find all ride IDs, then build a DataFrame from all ride CSVs)
## (Here, ride IDS are either ocean or motion dataframes)
count_good_fins = 0
# Loop over ride_ids and find CSVs
for rid in ride_ids:
try:
new_ocean_df, new_motion_df = get_csv_from_ride_id(rid) # get given ride's CSV from its ride ID using function above
#print(len(new_ocean_df))
#print(len(new_motion_df))
if not new_ocean_df.empty: # Calibration rides, for example
# Append only if DF isn't empty. There may be a better way to control empty DFs which are created above
appended_multiIndex.append(str(rid)) # build list to be multiIndex of future DataFrame
appended_ocean_list.append(new_ocean_df)
appended_motion_list.append(new_motion_df)
print("Ride data has been uploaded.")
#print("Ride: ", rid, "data has been uploaded.")
count_good_fins += 1
except:
print("Ride threw an exception!")
#print("Ride ", rid, "threw an exception!")
#%% Build the "Master" DataFrame
# appended_ocean_df.summary()
df_keys = tuple(appended_multiIndex) # keys gotta be a tuple, a list which data in it cannot be changed
ocean_df = pd.concat(appended_ocean_list, keys = df_keys, names=['ride_id'])
motion_df = pd.concat(appended_motion_list, keys = df_keys, names = ['ride_id'])
##Here, maybe just use info from the motion_df and don't worry about ocean_df data for now.
##If you do want ocean_df data, look at how Phil was getting it from "July 10th and 11th Calibration" jupyter notebook file.
#print(motion_df)
print("finished fetching data frame")
https://surf.smartfin.org/ride/15218
https://surf.smartfin.org/media/201808/google_105349665704999793400_0006667E229D_180829164842_Ocean.CSV
Ride data has been uploaded.
finished fetching data frame
#print(motion_df)
saved_copy_motion_df = motion_df.copy(deep=True) #make a copy of the dataframe with raw data
#Reading data from ride_ids = ['xxxxx']
#The name of the motion dataframe is: motion_df
#Get times from the "Time" column to create time_o_list and time_e_list.
#Get imus from the "IMU A[*]" column to create the imu acc arrays.
#Drop the "nan" values from the columns that we care about.
dropped_motion_df = motion_df.dropna(subset=['Time', 'IMU A1', 'IMU A2', 'IMU A3'])
#Can test that this works by printing this one:
#dropped_motion_df = motion_df.dropna(subset=['Time', 'IMU A1', 'IMU A2', 'IMU A3', 'Latitude'])
#print(dropped_df)
time_e_list = []
time_o_list = []
#Remove all nan instances in time:
time_array_nans = np.array(dropped_motion_df.loc[:,"Time"], dtype=float)
time_array = []
imu1_array_nans = np.array(dropped_motion_df.loc[:,"IMU A1"], dtype=float)
imu_array1 = []
imu2_array_nans = np.array(dropped_motion_df.loc[:,"IMU A2"], dtype=float)
imu_array2 = []
imu3_array_nans = np.array(dropped_motion_df.loc[:,"IMU A3"], dtype=float)
imu_array3 = []
#Get all the times and imus where time, imu1, imu2, and imu3 are NOT nan values:
for t,x,y,z in zip(time_array_nans, imu1_array_nans, imu2_array_nans, imu3_array_nans):
if (np.isnan(t)==0 and np.isnan(x)==0 and np.isnan(y)==0 and np.isnan(z)==0):
time_array.append(t)
imu_array1.append(x)
imu_array2.append(y)
imu_array3.append(z)
#for x in time_array:
# print(x)
start_time = time_array[0]
time_len = len(time_array)
i = 0
while (i < time_len - 1):
prev = time_array[i]
after = time_array[i+1]
#print(prev, " ", after)
#print(after - prev)
offset = after - prev
#if (np.isnan(offset)==0):
time_o_list.append(offset)
elapsed = time_array[i] - start_time
#if (np.isnan(elapsed)==0):
time_e_list.append(elapsed)
i = i + 1
##Check to make sure there are no "nan" values:
i = 0
while (i < len(time_o_list)):
if (np.isnan(time_o_list[i])):
print("Error! Value at index: ", i, " is nan")
i = i + 1
#Drop the last value from each of the imu lists to make it match the time list.
del(imu_array1[-1])
del(imu_array2[-1])
del(imu_array3[-1])
print(len(time_e_list))
print(len(time_o_list))
print(len(imu_array1))
print(len(imu_array2))
print(len(imu_array3))
8348
8348
8348
8348
8348
## Convert raw units to actual units (acc to [m/s^2]) and (time to [s])
#Raw acceleration constant 512 = 1g (accelerometer's measured force due to gravity)
g_const = 512
#Approximate measurement for gravity:
gravity = -9.80665
# Correct the IMU Acceleration columns into units of meters
# Dividing by 512 is equivalent to muliplying by 4 to correct the bit shifting by 2 places and dividing by 2048 to convert bits to G's
# Multiplying by the 9.81 afterwards is simply to convert G's into m/s^2
def convert_acc_units(acc_array):
ret_array = []
for a in acc_array:
#Acceleration is now in m/s^2, need to subtract gravity from vertical axis. (??)
new_a = a / g_const * gravity - gravity
ret_array.append(new_a)
return ret_array
imu1_array = convert_acc_units(imu_array1) #new units in m/s^2
imu2_array = convert_acc_units(imu_array2) #new units in m/s^2
imu3_array = convert_acc_units(imu_array3) #new units in m/s^2
##To check:
#for x,y in zip(imu2_array, imu_array2):
# print(x,y)
def convert_time_units(time_array):
ret_array = []
for t in time_array:
new_t = t * (10**(-3)) #converting units in milliseconds to seconds
ret_array.append(new_t)
return ret_array
time_o_array = convert_time_units(time_o_list) #new units in seconds
time_e_array = convert_time_units(time_e_list) #new units in seconds
#Seperate each of the subexperiments into its own acc lists.
#i.e. subexperiment1 corresponds to acc1, (subexperiment2 => acc2), etc.
time_e_list1 = []
time_e_list2 = []
time_e_list3 = []
acc_list = []
acc_list1 = []
acc_list2 = []
acc_list3 = []
time_array = []
acc_array = []
gravity = -9.80665
#For our controlled experiments, we know that imu2 is the vertical axis
acc_list = imu2_array
########## new db ##########
acc_list_FB = imu1_array
acc_list_SD = imu3_array
i = 0
while (i < (len(acc_list)) - 1):
if (time_e_array[i] > 300 and time_e_array[i] <= 450):
acc_list1.append(acc_list[i])
time_e_list1.append(time_e_array[i])
if (time_e_array[i] > 450 and time_e_array[i] <= 670):
acc_list2.append(acc_list[i])
time_e_list2.append(time_e_array[i])
if (time_e_array[i] > 670 and time_e_array[i] <= 850):
acc_list3.append(acc_list[i])
time_e_list3.append(time_e_array[i])
i = i + 1
print
#Plot the subexperiments to verify correctness:
for a,t in zip(acc_list,time_e_array): #acc_array becomes only acc values we care about
if t > 300 and t <= 850:
acc_array.append(a)
time_array.append(t)
time_array = np.array(time_array)
acc_array = np.array(acc_array)
time_array1 = np.array(time_e_list1)
acc_array1 = np.array(acc_list1)
time_array2 = np.array(time_e_list2)
acc_array2 = np.array(acc_list2)
time_array3 = np.array(time_e_list3)
acc_array3 = np.array(acc_list3)
##PSD Step 2: Detrend the data
dacc_array1 = signal.detrend(acc_array1)
dacc_array2 = signal.detrend(acc_array2)
dacc_array3 = signal.detrend(acc_array3)
########## new db ##########
dacc_array_FB = signal.detrend(acc_list_FB)
dacc_array_SD = signal.detrend(acc_list_SD)
std1_FB = np.std(dacc_array_FB)*3
std3_SD = np.std(dacc_array_SD)*3
##Remove outliers--points greater than 3x the standard deviation
std1 = np.std(dacc_array1)*3
std2 = np.std(dacc_array2)*3
std3 = np.std(dacc_array3)*3
#Returns a new array that is the same as the array passed in, with its outliers removed.
def removed_outliers(a_array, time_array, std):
i = 0
count = 0
ret_accs = []
ret_times = []
while i < (len(a_array)):
#if smaller than std, keep that value (larger ones get removed)
if abs(a_array[i]) < std:
ret_accs.append(a_array[i])
ret_times.append(time_array[i])
else:
count = count + 1 #could help with debugging to know how many outliers removed
i = i + 1
return count, ret_accs, ret_times;
count1, ro_array1, ro_time1 = removed_outliers(dacc_array1, time_array1, std1)
count2, ro_array2, ro_time2 = removed_outliers(dacc_array2, time_array2, std2)
count3, ro_array3, ro_time3 = removed_outliers(dacc_array3, time_array3, std3)
########## new db ##########
count1_FB, ro_array1_FB, ro_time1_FB = removed_outliers(dacc_array_FB, time_e_array, std1_FB)
count3_SD, ro_array3_SD, ro_time3_SD = removed_outliers(dacc_array_SD, time_e_array, std3_SD)
#print(len(dacc_array1))
#print(count1)
#print(len(ro_array1))
##Set up data interpolation (using Cubic Splines) for use in next step
cs1 = CubicSpline(ro_time1, ro_array1)
cs2 = CubicSpline(ro_time2, ro_array2)
cs3 = CubicSpline(ro_time3, ro_array3)
########## new db ##########
cs1_FB = CubicSpline(ro_time1_FB, ro_array1_FB)
cs3_SD = CubicSpline(ro_time3_SD, ro_array3_SD)
##interpld returns a function that relates y=ro_array (without outliers) to x=time:
#cs1 = interp1d(ro_time1, ro_array1)
#cs2 = interp1d(ro_time2, ro_array2)
#cs3 = interp1d(ro_time3, ro_array3)
#Now, use this interpolation to put points back into the original graph:
def add_interpolated_pts(a_array, time_array, std, cs):
i = 0
ret_acc = []
while i < (len(a_array)):
if abs(a_array[i]) > std:
ret_acc.append(cs(time_array[i]))
else:
ret_acc.append(a_array[i])
i = i + 1
return ret_acc;
#These are the new arrays with the interpolated points (which we will
#feed into a Kalman filter later).
interp_array1 = add_interpolated_pts(dacc_array1, time_array1, std1, cs1)
interp_array2 = add_interpolated_pts(dacc_array2, time_array2, std2, cs2)
interp_array3 = add_interpolated_pts(dacc_array3, time_array3, std3, cs3)
########## new db ##########
interp_array1_FB = add_interpolated_pts(dacc_array_FB, time_e_array, std1_FB, cs1_FB)
interp_array3_SD = add_interpolated_pts(dacc_array_SD, time_e_array, std3_SD, cs3_SD)
#print(len(interp_array1))
#print(len(dacc_array1))
##To verify that the two arrays are different(i.e. pts were actually interpolated):
j = 0
count = 0
while (j < (len(interp_array1) - 1)):
if interp_array1[j] != dacc_array1[j]:
count = count + 1
j = j + 1
#print(count)
##Now, feed interpolated arrays through a Kalman filter:
##(Actually I'm going to use a LOWESS filter for simplicity)
#print("\n")
#print("Here, I'm implementing a lowess filter instead of a Kalman \n filter right now because it seems simpler to implement.")
#print("\n")
lowess = sm.nonparametric.lowess
#Parameters: takes in (y,x, ...)
filtered1 = lowess(interp_array1, time_array1, frac=0.005, is_sorted=True, return_sorted=False)
filtered2 = lowess(interp_array2, time_array2, frac=0.002, is_sorted=True, return_sorted=False)
filtered3 = lowess(interp_array3, time_array3, frac=0.002, is_sorted=True, return_sorted=False)
########## new db ##########
filtered1_FB = lowess(interp_array1_FB, time_e_array, frac=0.002, is_sorted=True, return_sorted=False)
filtered3_SD = lowess(interp_array3_SD, time_e_array, frac=0.002, is_sorted=True, return_sorted=False)
#First, find peaks and valleys of the waveforms:
#(Found that this works better when the data has been detrended.)
indexes0 = peakutils.indexes(acc_array, thres=0.02/max(acc_array), min_dist=100)
indexes1 = peakutils.indexes(dacc_array1, thres=0.02/max(dacc_array1), min_dist=100)
indexes2 = peakutils.indexes(dacc_array2, thres=0.02/max(dacc_array2), min_dist=100)
indexes3 = peakutils.indexes(dacc_array3, thres=0.02/max(dacc_array3), min_dist=100)
########## new db ##########
indexes1_FB = peakutils.indexes(dacc_array_FB, thres=0.02/max(dacc_array_FB), min_dist=100)
indexes3_SD = peakutils.indexes(dacc_array_SD, thres=0.02/max(dacc_array_SD), min_dist=100)
col_0t = time_array # First column data
col_0a = acc_array # Second column data
col_1t = time_array1 # First column data
col_1a = dacc_array1 # Second column data
col_2t = time_array2 # First column data
col_2a = dacc_array2 # Second column data
col_3t = time_array3 # First column data
col_3a = dacc_array3 # Second column data
#Index1 gets the peaks, while index2 gets the valleys
index_max0 = peakutils.indexes(col_0a, thres=0.66, min_dist=25)
index_min0 = peakutils.indexes(-col_0a, thres=0.66, min_dist=25)
index_max1 = peakutils.indexes(col_1a, thres=0.66, min_dist=25)
index_min1 = peakutils.indexes(-col_1a, thres=0.66, min_dist=25)
index_max2 = peakutils.indexes(col_2a, thres=0.66, min_dist=25)
index_min2 = peakutils.indexes(-col_2a, thres=0.66, min_dist=25)
index_max3 = peakutils.indexes(col_3a, thres=0.66, min_dist=25)
index_min3 = peakutils.indexes(-col_3a, thres=0.66, min_dist=25)
#First integral of acc to get velocity:
from scipy import integrate
def calculate_new_range(time_array, array_of_values, low_time, high_time):
new_time_array = []
new_value_array = []
for t,v in zip(time_array, array_of_values):
if (t > low_time and t < high_time):
new_time_array.append(t)
new_value_array.append(v)
return new_time_array, new_value_array
new_time_array2, new_dacc_array2 = calculate_new_range(time_array2, dacc_array2, 500, 640)
############################# new dr ##########################
new_time_array_FB, new_dacc_array_FB = calculate_new_range(time_e_array, dacc_array_FB, 0, 200)
new_time_array_SD, new_dacc_array_SD = calculate_new_range(time_e_array, dacc_array_SD, 0, 200)
############################# new dr ##########################
int1_FB = integrate.cumtrapz(x=new_time_array_FB, y=new_dacc_array_FB, initial=0) #First integral is the velocity:
dint1_FB = signal.detrend(int1_FB)
int2_FB = integrate.cumtrapz(x=new_time_array_FB, y=dint1_FB, initial=0) #Second integral is the displacment:
dint2_FB = signal.detrend(int2_FB)
int1_SD = integrate.cumtrapz(x=new_time_array_SD, y=new_dacc_array_SD, initial=0) #First integral is the velocity:
dint1_SD = signal.detrend(int1_SD)
int2_SD = integrate.cumtrapz(x=new_time_array_SD, y=dint1_SD, initial=0) #Second integral is the displacment:
dint2_SD = signal.detrend(int2_SD)
#First integral is the velocity:
int1 = integrate.cumtrapz(x=new_time_array2, y=new_dacc_array2, initial=0)
dint1 = signal.detrend(int1)
#Second integral is the displacment:
int2 = integrate.cumtrapz(x=new_time_array2, y=dint1, initial=0)
dint2 = signal.detrend(int2)
f1 = plt.figure(figsize=(12,5))
ax1 = f1.add_subplot(121)
ax2 = f1.add_subplot(122)
f2 = plt.figure(figsize=(12,5))
ax3 = f2.add_subplot(121)
ax4 = f2.add_subplot(122)
ax1.plot(new_time_array2, int1)
ax1.set_title('Velocity vs. Time')
ax1.set_xlabel('Time [s]')
ax1.set_ylabel('Velocity [m/s]')
ax1.axhline(0, color="orange", ls='--')
ax2.plot(new_time_array2, dint1)
ax2.set_title('Detrended Velocity vs. Time')
ax2.set_xlabel('Time [s]')
ax2.set_ylabel('Velocity [m/s]')
ax2.axhline(0, color="orange",ls='--')
ax3.plot(new_time_array2, int2)
ax3.set_title('Displacement vs. Time')
ax3.set_xlabel('Time [s]')
ax3.set_ylabel('Displacement [m]')
ax4.plot(new_time_array2, dint2)
ax4.set_title('Detrended Displacement vs. Time')
ax4.set_xlabel('Time [s]')
ax4.set_ylabel('Displacement [m]')
plt.show()
print(dint2_FB)
print(dint2_SD)
[ 2.44213007e+01 2.41713897e+01 2.39480902e+01 2.37479998e+01
2.35507814e+01 2.33350190e+01 2.30935765e+01 2.28422136e+01
2.26004016e+01 2.23601409e+01 2.21048245e+01 2.18418421e+01
2.15781352e+01 2.13019413e+01 2.10098608e+01 2.06830724e+01
2.03422975e+01 2.00006795e+01 1.96621083e+01 1.93090088e+01
1.89419107e+01 1.85659152e+01 1.81822587e+01 1.77953100e+01
1.74059191e+01 1.70078464e+01 1.66251497e+01 1.62471358e+01
1.58788091e+01 1.55076189e+01 1.51333438e+01 1.47541767e+01
1.43671038e+01 1.39700162e+01 1.35653304e+01 1.31581778e+01
1.27537897e+01 1.23539520e+01 1.19745419e+01 1.15943255e+01
1.12235763e+01 1.08636515e+01 1.05145679e+01 1.01802701e+01
9.85378893e+00 9.53422222e+00 9.22492026e+00 8.92703552e+00
8.64501966e+00 8.37680585e+00 8.11433131e+00 7.86634267e+00
7.63856282e+00 7.44185498e+00 7.28128801e+00 7.15393349e+00
7.06115242e+00 6.98225802e+00 6.91769644e+00 6.86789685e+00
6.82986589e+00 6.79625111e+00 6.73451040e+00 6.62989863e+00
6.52261353e+00 6.43393051e+00 6.32986075e+00 6.16614178e+00
5.88539505e+00 5.50640831e+00 5.08387885e+00 4.76030794e+00
4.44176449e+00 4.04959790e+00 3.61193993e+00 3.17458998e+00
2.72881700e+00 2.25910107e+00 1.81045166e+00 1.39778501e+00
1.00475865e+00 6.12204472e-01 2.03159427e-01 -2.11172555e-01
-6.32607784e-01 -1.06661950e+00 -1.51863490e+00 -1.98834935e+00
-2.45370595e+00 -2.93191695e+00 -3.39132753e+00 -3.84505657e+00
-4.29448188e+00 -4.71180844e+00 -5.11377471e+00 -5.55725987e+00
-6.00224134e+00 -6.39732256e+00 -6.73214341e+00 -7.05442083e+00
-7.37474609e+00 -7.67671287e+00 -7.92332936e+00 -8.13088304e+00
-8.32933464e+00 -8.52641277e+00 -8.68003439e+00 -8.75911833e+00
-8.80092947e+00 -8.84238984e+00 -8.83086806e+00 -8.73408035e+00
-8.58896134e+00 -8.38977370e+00 -8.13459708e+00 -7.83098321e+00
-7.42209991e+00 -6.91944551e+00 -6.38970730e+00 -5.87735006e+00
-5.38923953e+00 -4.93140169e+00 -4.48394811e+00 -4.04628180e+00
-3.60500658e+00 -3.17318959e+00 -2.75369590e+00 -2.34906838e+00
-1.96051077e+00 -1.58077994e+00 -1.20293996e+00 -8.29505721e-01
-4.63940827e-01 -8.23110549e-02 3.30110483e-01 7.53392883e-01
1.22797804e+00 1.75249961e+00 2.27875101e+00 2.79321183e+00
3.27555891e+00 3.73050412e+00 4.16202217e+00 4.58743272e+00
4.98494220e+00 5.34788887e+00 5.66981626e+00 5.99411761e+00
6.35389264e+00 6.79203471e+00 7.26274122e+00 7.73705439e+00
8.20683196e+00 8.65035634e+00 9.05822372e+00 9.43479626e+00
9.77658535e+00 1.00703793e+01 1.03267496e+01 1.05686497e+01
1.08125640e+01 1.10732946e+01 1.13526358e+01 1.15967072e+01
1.18014829e+01 1.19738962e+01 1.21049177e+01 1.21895151e+01
1.22421716e+01 1.22934328e+01 1.23362412e+01 1.23601251e+01
1.23902265e+01 1.24310520e+01 1.24797809e+01 1.25503646e+01
1.26611311e+01 1.27930780e+01 1.29271321e+01 1.30626949e+01
1.31973159e+01 1.33190272e+01 1.34300048e+01 1.35424283e+01
1.36736843e+01 1.38244033e+01 1.40007135e+01 1.42194657e+01
1.45002470e+01 1.47321854e+01 1.48445886e+01 1.48822207e+01
1.48942728e+01 1.49077805e+01 1.49328807e+01 1.49659405e+01
1.49852425e+01 1.49470536e+01 1.48214851e+01 1.46114541e+01
1.43519642e+01 1.40749213e+01 1.37997021e+01 1.35369693e+01
1.32943484e+01 1.30653145e+01 1.28403536e+01 1.26015699e+01
1.23497793e+01 1.20934188e+01 1.18492855e+01 1.16394837e+01
1.14318081e+01 1.11842062e+01 1.09453436e+01 1.08115930e+01
1.07691748e+01 1.07579193e+01 1.07154781e+01 1.06208903e+01
1.04979537e+01 1.03263361e+01 1.00797353e+01 9.76213806e+00
9.40371474e+00 9.04320458e+00 8.69771608e+00 8.37932650e+00
8.06303116e+00 7.72991305e+00 7.40018921e+00 7.09002380e+00
6.79601329e+00 6.51617972e+00 6.24723702e+00 5.98380008e+00
5.72197928e+00 5.46995624e+00 5.22176752e+00 4.97110952e+00
4.69772761e+00 4.39233427e+00 4.11236329e+00 3.86164866e+00
3.60504611e+00 3.32470826e+00 3.03890501e+00 2.77147156e+00
2.53447784e+00 2.31490801e+00 2.06317714e+00 1.68734851e+00
1.17206185e+00 5.79696345e-01 -9.19514975e-03 -5.39696971e-01
-1.06268845e+00 -1.61533840e+00 -2.22156385e+00 -2.86128314e+00
-3.49043786e+00 -4.09589883e+00 -4.68294176e+00 -5.27332302e+00
-5.86179511e+00 -6.42323286e+00 -6.95879050e+00 -7.51822861e+00
-8.08178790e+00 -8.64247316e+00 -9.20216227e+00 -9.75586111e+00
-1.03190136e+01 -1.08837926e+01 -1.14427569e+01 -1.19970283e+01
-1.25697534e+01 -1.31543129e+01 -1.37155856e+01 -1.41853340e+01
-1.45638544e+01 -1.49199139e+01 -1.52861596e+01 -1.56586799e+01
-1.60415010e+01 -1.64488029e+01 -1.68992509e+01 -1.73745693e+01
-1.78648790e+01 -1.83697908e+01 -1.89247261e+01 -1.94793398e+01
-2.00354354e+01 -2.05510438e+01 -2.10045378e+01 -2.13669495e+01
-2.15567082e+01 -2.16350393e+01 -2.17185829e+01 -2.18081850e+01
-2.19003478e+01 -2.20150447e+01 -2.21533236e+01 -2.22912199e+01
-2.24281266e+01 -2.25685319e+01 -2.26227728e+01 -2.25317069e+01
-2.23795479e+01 -2.22296520e+01 -2.21263010e+01 -2.21095815e+01
-2.21571756e+01 -2.22557084e+01 -2.24143471e+01 -2.26866591e+01
-2.30796721e+01 -2.34920557e+01 -2.38421300e+01 -2.41131326e+01
-2.43334055e+01 -2.45504761e+01 -2.48014473e+01 -2.50712323e+01
-2.53320743e+01 -2.55800486e+01 -2.58160399e+01 -2.60318107e+01
-2.62195938e+01 -2.63944900e+01 -2.65929678e+01 -2.67942471e+01
-2.69603143e+01 -2.70818142e+01 -2.71670288e+01 -2.72346042e+01
-2.73134133e+01 -2.74629760e+01 -2.76423012e+01 -2.77490578e+01
-2.78000647e+01 -2.78242798e+01 -2.78002811e+01 -2.77461007e+01
-2.77157138e+01 -2.77140314e+01 -2.77021343e+01 -2.76750228e+01
-2.76136462e+01 -2.75043221e+01 -2.74135815e+01 -2.73875435e+01
-2.73787255e+01 -2.73508110e+01 -2.73229146e+01 -2.73206400e+01
-2.73385449e+01 -2.73517852e+01 -2.73128410e+01 -2.72044409e+01
-2.70481891e+01 -2.68739506e+01 -2.66911668e+01 -2.64679743e+01
-2.61992184e+01 -2.59089906e+01 -2.56463611e+01 -2.54585273e+01
-2.53838299e+01 -2.53822779e+01 -2.53198979e+01 -2.51728192e+01
-2.49899107e+01 -2.48066633e+01 -2.46553533e+01 -2.45266258e+01
-2.43720175e+01 -2.42054749e+01 -2.40904595e+01 -2.40310692e+01
-2.39904337e+01 -2.39446090e+01 -2.38656592e+01 -2.37441248e+01
-2.35978329e+01 -2.34742723e+01 -2.33512684e+01 -2.31925886e+01
-2.29837495e+01 -2.27491838e+01 -2.25278045e+01 -2.23226255e+01
-2.21352470e+01 -2.19634508e+01 -2.17093932e+01 -2.13218181e+01
-2.08884176e+01 -2.04165096e+01 -1.99515528e+01 -1.95210562e+01
-1.91053891e+01 -1.87010660e+01 -1.83014471e+01 -1.79327751e+01
-1.76224994e+01 -1.73289860e+01 -1.70127127e+01 -1.66914699e+01
-1.63319740e+01 -1.59560445e+01 -1.55790639e+01 -1.52288899e+01
-1.49475137e+01 -1.47778072e+01 -1.47339138e+01 -1.46900767e+01
-1.45261618e+01 -1.43000283e+01 -1.40881731e+01 -1.38910041e+01
-1.37011422e+01 -1.35451762e+01 -1.34516959e+01 -1.34072290e+01
-1.33666868e+01 -1.33368146e+01 -1.33800560e+01 -1.35573461e+01
-1.38037805e+01 -1.39751262e+01 -1.40445884e+01 -1.40501208e+01
-1.40026230e+01 -1.39379412e+01 -1.38936937e+01 -1.38862834e+01
-1.39157583e+01 -1.39591863e+01 -1.39903187e+01 -1.40060680e+01
-1.40084096e+01 -1.39991108e+01 -1.39902607e+01 -1.40339240e+01
-1.41912477e+01 -1.44445462e+01 -1.46564795e+01 -1.47568400e+01
-1.48373335e+01 -1.48975027e+01 -1.48568823e+01 -1.47112075e+01
-1.45046467e+01 -1.42806620e+01 -1.40584703e+01 -1.38701454e+01
-1.36979597e+01 -1.35345851e+01 -1.33545405e+01 -1.31473721e+01
-1.29308989e+01 -1.27368335e+01 -1.26307027e+01 -1.24962186e+01
-1.21201812e+01 -1.15449788e+01 -1.08581710e+01 -1.00344603e+01
-9.16230098e+00 -8.34247023e+00 -7.51851955e+00 -6.70851997e+00
-5.92787692e+00 -5.15619638e+00 -4.39531743e+00 -3.62275356e+00
-2.83114531e+00 -2.04550455e+00 -1.30501076e+00 -6.29097065e-01
-5.23084858e-02 3.87390006e-01 7.31940626e-01 9.48334491e-01
1.19629339e+00 1.63559092e+00 2.24752275e+00 2.95480908e+00
3.63295682e+00 4.18753834e+00 4.62552991e+00 5.02918768e+00
5.38526695e+00 5.67657524e+00 5.90281383e+00 6.08027606e+00
6.25256310e+00 6.46224419e+00 6.71500849e+00 6.99494411e+00
7.27838321e+00 7.53158370e+00 7.78723206e+00 8.01897898e+00
8.15382344e+00 8.16191584e+00 8.20874980e+00 8.39854934e+00
8.68329804e+00 9.02663180e+00 9.38799398e+00 9.75514816e+00
1.01001234e+01 1.04132653e+01 1.07294343e+01 1.10749695e+01
1.14190485e+01 1.16984661e+01 1.19375686e+01 1.21605436e+01
1.23346005e+01 1.23937507e+01 1.23561887e+01 1.23374533e+01
1.23808603e+01 1.24458581e+01 1.25173548e+01 1.25779661e+01
1.26242875e+01 1.26577193e+01 1.26795727e+01 1.26817419e+01
1.26606546e+01 1.26022197e+01 1.24993467e+01 1.23532454e+01
1.21638492e+01 1.19388874e+01 1.17018108e+01 1.14914772e+01
1.13318313e+01 1.12188607e+01 1.11438065e+01 1.10919401e+01
1.10439410e+01 1.09889549e+01 1.09317205e+01 1.08933928e+01
1.08881986e+01 1.08540052e+01 1.06889244e+01 1.04006212e+01
1.01850589e+01 1.01421057e+01 1.01632294e+01 1.02227707e+01
1.03480524e+01 1.05386840e+01 1.07562767e+01 1.09490454e+01
1.10818307e+01 1.11412879e+01 1.11463387e+01 1.11130748e+01
1.10664124e+01 1.10324180e+01 1.10243100e+01 1.10330368e+01
1.10472111e+01 1.10744341e+01 1.11113370e+01 1.11645954e+01
1.12353710e+01 1.12924439e+01 1.12645745e+01 1.10555134e+01
1.07041597e+01 1.04636599e+01 1.04249980e+01 1.04760114e+01
1.05892439e+01 1.07799115e+01 1.10112143e+01 1.12439524e+01
1.14449580e+01 1.15965257e+01 1.17046440e+01 1.17851278e+01
1.18330467e+01 1.18465780e+01 1.18247766e+01 1.17900576e+01
1.17753531e+01 1.17971260e+01 1.18474868e+01 1.18984470e+01
1.19216942e+01 1.19215144e+01 1.19456129e+01 1.20899671e+01
1.23422262e+01 1.25876523e+01 1.28415592e+01 1.31346299e+01
1.34181613e+01 1.36553521e+01 1.38459036e+01 1.39994723e+01
1.41177628e+01 1.42112676e+01 1.42936831e+01 1.43763060e+01
1.44820306e+01 1.46131471e+01 1.47403297e+01 1.48166722e+01
1.47726509e+01 1.45248854e+01 1.41354885e+01 1.38783833e+01
1.38938514e+01 1.40732929e+01 1.43269416e+01 1.46326966e+01
1.48854281e+01 1.50258113e+01 1.51134155e+01 1.51832072e+01
1.52081083e+01 1.51417900e+01 1.49978307e+01 1.48069172e+01
1.46208459e+01 1.44759651e+01 1.43783726e+01 1.42824000e+01
1.41478943e+01 1.39594003e+01 1.37650232e+01 1.36235875e+01
1.35019141e+01 1.33737048e+01 1.32630639e+01 1.31698948e+01
1.31097404e+01 1.30835220e+01 1.30619136e+01 1.30354104e+01
1.30327873e+01 1.30760827e+01 1.31186129e+01 1.31592646e+01
1.33103221e+01 1.36203189e+01 1.39652697e+01 1.42978148e+01
1.45618669e+01 1.45931591e+01 1.44009353e+01 1.41683330e+01
1.38808258e+01 1.34806671e+01 1.30307157e+01 1.25539016e+01
1.20529430e+01 1.15679653e+01 1.10746083e+01 1.05909331e+01
1.01233243e+01 9.68701123e+00 9.25426189e+00 8.83027106e+00
8.41111993e+00 7.91822309e+00 7.25401089e+00 6.62374639e+00
6.36439061e+00 6.41887203e+00 6.55437207e+00 6.66980920e+00
6.74283510e+00 6.79940818e+00 6.81439257e+00 6.75913219e+00
6.64087015e+00 6.50274881e+00 6.35532972e+00 6.13516917e+00
5.85487874e+00 5.64886316e+00 5.50919583e+00 5.34616269e+00
5.28644992e+00 5.38366410e+00 5.54188288e+00 5.69095175e+00
5.83896210e+00 5.96728895e+00 6.04389566e+00 6.09100301e+00
6.12027647e+00 6.14616962e+00 6.16868197e+00 6.18948793e+00
6.20867466e+00 6.21950348e+00 6.22460848e+00 6.20473140e+00
6.14021738e+00 6.02273059e+00 5.89088829e+00 5.81960872e+00
5.81002421e+00 5.82469706e+00 5.84009532e+00 5.82139528e+00
5.78855202e+00 5.75132911e+00 5.70088947e+00 5.65497382e+00
5.61837347e+00 5.58390873e+00 5.52315140e+00 5.42831449e+00
5.33547220e+00 5.24200217e+00 5.14312740e+00 5.04563424e+00
4.94360220e+00 4.84941539e+00 4.76991724e+00 4.67534376e+00
4.57692439e+00 4.59363548e+00 4.82261907e+00 5.20874850e+00
5.59753139e+00 5.87007241e+00 6.01096513e+00 6.06755553e+00
6.09144506e+00 6.09684174e+00 6.09941669e+00 6.10025273e+00
6.09994251e+00 6.10277338e+00 6.09156446e+00 6.03699219e+00
5.93250807e+00 5.79267477e+00 5.60810759e+00 5.37309125e+00
5.10109607e+00 4.79715350e+00 4.48550188e+00 4.13397097e+00
3.74046601e+00 3.32248706e+00 2.88275730e+00 2.42096982e+00
1.95070591e+00 1.48554386e+00 1.06742936e+00 6.44038776e-01
8.89708312e-02 -5.85637924e-01 -1.28498050e+00 -1.95060989e+00
-2.61301259e+00 -3.27812996e+00 -3.96563237e+00 -4.64070424e+00
-5.29187214e+00 -5.90618384e+00 -6.51888607e+00 -7.14384054e+00
-7.78997243e+00 -8.43004189e+00 -9.09707654e+00 -9.75654292e+00
-1.04298478e+01 -1.11278206e+01 -1.18547189e+01 -1.25786555e+01
-1.32704866e+01 -1.39648038e+01 -1.46680063e+01 -1.53819056e+01
-1.60926222e+01 -1.67699824e+01 -1.74372592e+01 -1.81014131e+01
-1.87769456e+01 -1.94669798e+01 -2.01450741e+01 -2.08114847e+01
-2.14507626e+01 -2.20830945e+01 -2.26967250e+01 -2.32918310e+01
-2.38752931e+01 -2.44508186e+01]
[ -5.82752874 -6.04743522 -6.24729896 -6.42791912 -6.60625005
-6.7801578 -6.93201078 -7.06614583 -7.18164436 -7.27123292
-7.33676167 -7.38234845 -7.4073677 -7.40576369 -7.37169486
-7.30876285 -7.22939781 -7.14182494 -7.05461875 -6.95565583
-6.83121047 -6.69064931 -6.53391056 -6.35183251 -6.15289446
-5.94194536 -5.7183582 -5.45438758 -5.15510967 -4.82739235
-4.47900899 -4.10782564 -3.71201004 -3.28761817 -2.8313094
-2.34306149 -1.82064045 -1.25816212 -0.68072593 -0.05198119
0.61009054 1.30574316 2.05257412 2.85383207 3.72101676
4.6577705 5.66594356 6.78020149 7.99329529 9.24647578
10.57427674 11.90825111 13.16925827 14.35219197 15.48016488
16.56328861 17.36204445 18.09436183 18.74679215 19.30938344
19.77191958 20.17765158 20.49284695 20.72220356 20.85626248
20.86178315 20.75844728 20.56311332 20.21704941 19.65917879
18.71265328 17.6052084 16.41882026 15.20776825 14.01202532
12.89784209 11.90405482 10.92651743 9.98467599 9.09947569
8.2258109 7.3471708 6.46912399 5.6259342 4.80271783
3.99897684 3.21714687 2.46539533 1.78165687 1.09793395
0.43595862 -0.20159027 -0.82864707 -1.45435252 -2.03795725
-2.57260097 -3.04577538 -3.47886173 -3.89495344 -4.35899113
-4.8861053 -5.48196905 -6.0483259 -6.56071801 -7.04779848
-7.50602737 -7.94896237 -8.46168349 -9.06800108 -9.74183569
-10.38381854 -10.97705827 -11.53855671 -12.14122099 -12.83840135
-13.55231248 -14.24304573 -14.81569878 -15.29198221 -15.76555434
-16.25390045 -16.73738165 -17.22802733 -17.70790602 -18.1801389
-18.6243856 -19.02805842 -19.40166856 -19.74881387 -20.06977378
-20.3698467 -20.65636527 -20.9283938 -21.170415 -21.3644898
-21.50917616 -21.63033493 -21.72974098 -21.79716169 -21.85683859
-21.94110941 -22.03733196 -22.11473143 -22.16839308 -22.20407342
-22.23718053 -22.26956029 -22.2966604 -22.30425941 -22.30760709
-22.32714025 -22.33327259 -22.30184794 -22.243101 -22.18389995
-22.16188741 -22.17289988 -22.15832955 -22.08800462 -21.98087211
-21.87154283 -21.80020194 -21.74433232 -21.66116873 -21.55316578
-21.43331209 -21.33092476 -21.2639538 -21.21186312 -21.14672717
-21.05512315 -20.95378842 -20.86035817 -20.77162431 -20.68452201
-20.59816807 -20.49604747 -20.37150114 -20.23163583 -20.08450042
-19.93042857 -19.77269024 -19.60486968 -19.42842196 -19.23674711
-19.04976928 -18.9104895 -18.81791745 -18.74860813 -18.71709821
-18.70714517 -18.69067673 -18.6685729 -18.65164575 -18.66768294
-18.72303913 -18.78239619 -18.8437845 -18.90741618 -18.94929037
-18.96623086 -18.96602033 -18.93743821 -18.87100921 -18.79803432
-18.74925086 -18.71897645 -18.69440385 -18.65612692 -18.58524092
-18.50024577 -18.42003892 -18.34439316 -18.29201149 -18.24733347
-18.17621537 -18.09353565 -18.06709477 -18.1253855 -18.20442117
-18.24603861 -18.26693782 -18.27775011 -18.26390733 -18.22116379
-18.16087864 -18.0848514 -17.99575639 -17.90475712 -17.82080934
-17.72912163 -17.60621678 -17.45801273 -17.2996084 -17.13080898
-16.95820866 -16.77653898 -16.5716882 -16.33697521 -16.08841339
-15.84246817 -15.60677672 -15.37506055 -15.13232577 -14.93315295
-14.75825522 -14.53194542 -14.24575445 -13.9449112 -13.64313139
-13.31970318 -12.97121089 -12.6244589 -12.28173387 -11.9544856
-11.63725089 -11.29343831 -10.95269 -10.63133867 -10.33777907
-10.06761304 -9.8092025 -9.57631402 -9.37727242 -9.20101897
-9.02134587 -8.83541518 -8.65355254 -8.48504704 -8.31044232
-8.11607816 -7.89547063 -7.65013643 -7.39619729 -7.13172698
-6.85359609 -6.5656389 -6.28741414 -6.01655169 -5.7431534
-5.49024142 -5.28023811 -5.07232374 -4.83533624 -4.59234855
-4.36753482 -4.13899836 -3.87393153 -3.57680141 -3.28983185
-2.99988348 -2.71847072 -2.46352163 -2.24718766 -2.04951555
-1.79765125 -1.47527523 -1.23624041 -1.10955571 -0.99759757
-0.87873913 -0.75183995 -0.61570056 -0.46891481 -0.29994018
-0.11806709 0.06630626 0.25531677 0.41613186 0.4801292
0.47139273 0.48678675 0.54133997 0.59715912 0.63922735
0.66068336 0.67758472 0.71717227 0.77721446 0.84366744
0.92334167 1.04885516 1.24677748 1.48696342 1.71030709
1.89873025 2.08929498 2.31250698 2.57610681 2.84630726
3.10328492 3.35986633 3.62512395 3.89998503 4.16091616
4.42103368 4.69655318 4.99906269 5.30393091 5.57836791
5.82998318 6.05698891 6.21747461 6.34158014 6.4893212
6.6924853 6.95290473 7.21458473 7.44321223 7.67133309
7.92063224 8.16833332 8.375379 8.53028829 8.65276144
8.74414206 8.80055168 8.84240403 8.92517894 9.05384228
9.19681514 9.33993923 9.49615143 9.69253491 9.92666338
10.18527832 10.46370654 10.77089621 11.10115766 11.45532233
11.86455522 12.33333772 12.84506256 13.31599552 13.71237131
14.07554154 14.4622736 14.88618037 15.32204403 15.75729819
16.20346481 16.65517356 17.07303369 17.44292511 17.83186737
18.22716565 18.63556561 19.07649009 19.55086634 20.03971111
20.54636506 21.0874425 21.66496648 22.25621954 22.89173581
23.58803899 24.22003272 24.78137829 25.32227742 25.86584336
26.42601713 27.01902667 27.66148627 28.35733994 29.09303458
29.86829073 30.69730932 31.54277416 32.45574903 33.39691073
34.38106352 35.40303253 36.44693081 37.491008 38.46419913
39.28818515 39.95315474 40.62422426 41.30583305 41.86764367
42.31777468 42.73415213 43.15563248 43.59030645 44.06908465
44.60506443 45.21636847 45.88642694 46.48873428 46.95499852
47.3087965 47.54075702 47.63561331 47.66276372 47.67843619
47.70330489 47.73112832 47.7615154 47.80384028 47.86064426
47.93320939 48.03913232 48.20057223 48.3812956 48.52087035
48.56264127 48.62456393 48.88596414 49.30523309 49.68024563
49.87244175 49.88354464 49.83416762 49.79005063 49.74077059
49.71189448 49.72396058 49.76762739 49.83090916 49.9134074
50.00427186 50.09759278 50.20257106 50.32736275 50.46814413
50.60208489 50.5517257 50.17054807 49.61975565 49.0779435
48.53386726 47.98210535 47.4098391 46.84432554 46.31842379
45.81514676 45.34395948 44.93129119 44.57272094 44.25365117
43.96728793 43.71654492 43.46797566 43.21798549 43.00061065
42.81205204 42.57612653 42.32137936 42.05786986 41.73274022
41.36203405 40.93953581 40.5030252 40.09355213 39.73104934
39.40045534 39.09527289 38.80581395 38.50845783 38.19280777
37.86422147 37.54492447 37.20662196 36.90540753 36.63745601
36.40577759 36.15526958 35.78571604 35.358742 34.8295069
34.12009435 33.27119674 32.38339075 31.53673972 30.72564002
29.9198869 29.10453867 28.32009336 27.57021808 26.86441513
26.14171911 25.40740513 24.62617337 23.7447545 22.89981792
22.11192252 21.20986659 20.13541738 19.03068843 18.03628934
17.04231522 16.09308301 15.20044911 14.33901569 13.4777773
12.60710259 11.73428199 10.87485322 10.06544163 9.31158563
8.59924134 7.91809259 7.27533575 6.67055983 6.05144094
5.45352018 4.90176237 4.38621803 3.89380551 3.44268403
3.06451919 2.73120462 2.33921953 1.82659933 1.27979878
0.68161738 -0.07006056 -1.04051871 -2.1447807 -3.26847134
-4.33841259 -5.35788315 -6.41496836 -7.45461051 -8.44473378
-9.39125273 -10.2968004 -11.18277652 -12.02160646 -12.84062785
-13.64413719 -14.43041176 -15.15742338 -15.82301318 -16.43159708
-17.0772732 -17.72864975 -18.31551589 -18.83916363 -19.31703773
-19.81953902 -20.40291437 -21.02645165 -21.62976458 -22.19113741
-22.70880896 -23.1824579 -23.62505202 -24.04549163 -24.47467575
-24.84436573 -25.13046191 -25.36551983 -25.58124059 -25.79363902
-25.98889476 -26.16999798 -26.34353485 -26.5061773 -26.69272562
-26.92739962 -27.17879121 -27.42690494 -27.68138822 -27.94739392
-28.2252015 -28.51780545 -28.80497137 -29.05244669 -29.26563489
-29.4635964 -29.64316517 -29.79811341 -29.90570504 -29.96754859
-30.00138527 -30.02765147 -30.09206136 -30.29257554 -30.63128351
-30.98749335 -31.27068058 -31.43587853 -31.58369921 -31.77529721
-31.94838669 -32.07009629 -32.12514993 -32.14994726 -32.17454928
-32.21039738 -32.24363484 -32.25442453 -32.23909624 -32.17962145
-32.06376325 -31.90445806 -31.68783447 -31.43231893 -31.19556308
-30.99756016 -30.8081638 -30.58431614 -30.30024154 -29.94525819
-29.56679807 -29.19775942 -28.82159839 -28.4287477 -28.01352914
-27.56394964 -27.06223513 -26.5328694 -26.00699823 -25.52653211
-25.1324765 -24.91705962 -24.96710888 -25.21994094 -25.46297201
-25.56996729 -25.56817939 -25.51387624 -25.39527032 -25.23074152
-25.04862499 -24.82238518 -24.53967348 -24.18758407 -23.81703035
-23.4468737 -23.06774447 -22.64764298 -22.1951531 -21.73330752
-21.22325842 -20.65261468 -20.13063966 -19.75265273 -19.46834405
-19.20523551 -18.90357523 -18.56705552 -18.21646968 -17.85662224
-17.46939054 -17.03755691 -16.56201941 -16.05687781 -15.5290898
-15.02782 -14.56297886 -14.21481994 -13.93846118 -13.74054311
-13.5866495 -13.36028199 -13.01206912 -12.5536147 -12.0103756
-11.44390272 -10.87251652 -10.31498317 -9.73307852 -9.14177692
-8.59671342 -8.05991548 -7.4863042 -6.89041721 -6.3166903
-5.78169333 -5.29134726 -4.85540995 -4.51123851 -4.24333681
-4.05105649 -3.89314359 -3.73609573 -3.55908039 -3.36054752
-3.12371566 -2.79110192 -2.33096107 -1.7506189 -1.0889516
-0.3767371 0.37864504 1.19130591 2.04470237 2.8836246
3.6522338 4.42502387 5.14250161 5.66609687 5.90080449
5.91640943 5.75637234 5.41430698 5.02667179 4.69720752
4.41274485 4.18824945 4.05304182 3.9515199 3.76497763
3.45297204 3.01085458 2.4595578 1.89572893 1.37578101
0.9222021 0.53035079 0.18618321 -0.16486978 -0.52779904
-0.9132655 -1.25649558 -1.50919917 -1.68627713 -1.84113933
-2.04508349 -2.36505907 -2.81243286 -3.28168306 -3.67225568
-4.09506362 -4.64814741 -5.27474113 -5.99362324 -6.80570532
-7.68295999 -8.51958415 -9.29118607 -9.96219883 -10.49511683
-10.87925986 -11.21558565 -11.5531984 -11.86208204 -12.08779362
-12.23235577 -12.28210381 -12.28421066 -12.23601452 -12.02096765
-11.59268002 -11.03323625 -10.38351721 -9.64795233 -8.85806054
-7.9410321 -6.86435535 -5.69733419 -4.53926475 -3.46167671
-2.39882682 -1.30685299 -0.09857721 1.2492944 2.70663918
4.18279881 5.64663953]
#print(motion_df)
saved_copy_motion_df = motion_df.copy(deep=True) #make a copy of the dataframe with raw data
dropped_motion_df = motion_df.dropna(subset=['Latitude', 'Longitude'])
#print(saved_copy_motion_df)
#Create arrays with just the longitude and the latitude
lat_array = np.array(dropped_motion_df.loc[:,"Latitude"], dtype=float)
lon_array = np.array(dropped_motion_df.loc[:,"Longitude"], dtype=float)
#confirm that these two arrays are the same length
print(len(lat_array))
print(len(lon_array))
#Account for how data is represented divide lat by 10^5 and lon by 10^4
lat_array[:] = [x / 10.0**5 for x in lat_array]
lon_array[:] = [x / 10.0**5 for x in lon_array]
print(lat_array[0])
print(lon_array[0])
357
357
32.85846
-117.25781
# Place map
gmap = gmplot.GoogleMapPlotter(lat_array[0], lon_array[0], 13)
gmap.scatter(lat_array, lon_array, '#3B0B39', size=5, marker=False)
gmap.plot(lat_array, lon_array, 'cornflowerblue', edge_width = 3.0)
# Draw
gmap.draw("dead-reckoning-IA.html")
Created by: Howard Wang, 05/08/19