#!/bin/bash
#define what shell we want to use above
format="json" #xml or json
user="" #add your current user
nano_ip="$(curl ifconfig.co)"
ip_locaddr=https://freegeoip.app/$format/$nano_ip
data_file=/mnt/c/Users/$user/output.$format #change this to your expected path
touch data_file #make the file
echo data_file #make sure we have the right one
curl "$ip_locaddr" > data_file #write it out
cat data_file #let's see what it says
因此,据我所知,最好的方法是为jetson nano提供一个实际的gps模块(不知道确切的型号,但我认为我们可以使用流行的4g型号),一个例子是https://www.waveshare.com/sim7600g-h-4g-for-jetson-nano.htm,但你也可以做一些不太准确的事情。小bash脚本,希望对你有帮助
首先,我将ssh连接到您的设备中,您可以运行
ifconfig
来了解一些想法。默认情况下,对于无线模块为wlan0
,对于有线连接为eth0
。 让我们把文件归档然后在这里运行这个小脚本:
现在,您应该能够在运行
./nanoloc.sh
时看到它的输出希望这有帮助,我也从WSL(你可以从它的安装路径看到)运行它,并在Linux上测试
相关问题 更多 >
编程相关推荐