GPrathap 9 years ago
parent c1b2195021
commit 096bade36b

@ -29,13 +29,8 @@ import org.wso2.carbon.device.mgt.iot.droneanalyzer.plugin.constants.DroneConsta
import org.wso2.carbon.device.mgt.iot.droneanalyzer.plugin.controller.DroneController;
import org.wso2.carbon.device.mgt.iot.droneanalyzer.plugin.controller.impl.DroneControllerImpl;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.QueryParam;
import javax.ws.rs.*;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import java.util.concurrent.ConcurrentHashMap;
@ -57,11 +52,10 @@ public class DroneControllerService {
--------------------------------------------------------------------------------------- */
@Path("controller/register/{owner}/{deviceId}/{ip}/{port}")
@POST
public String registerDeviceIP(@PathParam("owner") String owner, @PathParam("deviceId") String deviceId,
public Response registerDeviceIP(@PathParam("owner") String owner, @PathParam("deviceId") String deviceId,
@PathParam("ip") String deviceIP,
@PathParam("port") String devicePort,
@Context HttpServletResponse response,
@Context HttpServletRequest request) {
@Context HttpServletResponse response) {
String result;
log.info("Got register call from IP: " + deviceIP + " for Device ID: " + deviceId + " of owner: " + owner);
String deviceHttpEndpoint = deviceIP + ":" + devicePort;
@ -72,17 +66,16 @@ public class DroneControllerService {
log.debug(result);
}
log.info(owner + deviceId + deviceIP + devicePort );
return result;
return Response.ok(Response.Status.OK.getStatusCode()).build();
}
@Path("controller/send_command")
@POST
@Feature( code="send_command", name="Send Command", type="operation",
description="Send Commands to Drone")
/*@Feature( code="send_command", name="Send Command", type="operation",
description="Send Commands to Drone")*/
public Response droneController(@HeaderParam("owner") String owner, @HeaderParam("deviceId") String deviceId,
@QueryParam("action") String action, @QueryParam("duration") String duration,
@QueryParam("speed") String speed){
@FormParam("action") String action, @FormParam("duration") String duration,
@FormParam("speed") String speed){
try {
DeviceValidator deviceValidator = new DeviceValidator();
if (!deviceValidator.isExist(owner, SUPER_TENANT, new DeviceIdentifier(deviceId,

@ -38,8 +38,7 @@ public class DroneRealTimeService {
public DroneRealTimeService() {
messageController = new MessageTransformer();
xmppConnector = new DroneAnalyzerXMPPConnector(messageController);
if (XmppConfig.getInstance().isEnabled()){
if (!XmppConfig.getInstance().isEnabled()){
xmppConnector.connect();
} else {
log.warn("XMPP disabled in 'devicemgt-config.xml'. Hence, DroneAnalyzerXMPPConnector not started.");
@ -58,24 +57,23 @@ public class DroneRealTimeService {
@OnMessage
public void onMessage(String message, Session session){
try {
while(true){
if((messageController !=null) && (!messageController.isEmptyQueue())){
String message1 = messageController.getMessage();
session.getBasicRemote().sendText(message1);
try{
if((messageController !=null) && (!messageController.isEmptyQueue())){
String message1 = messageController.getMessage();
session.getBasicRemote().sendText(message1);
}
Thread.sleep(DroneConstants.MINIMUM_TIME_DURATION);
} catch (IOException ex) {
log.error(ex.getMessage() + "\n" + ex);
} catch (InterruptedException e) {
log.error(e.getMessage(), e);
}
Thread.sleep(DroneConstants.MINIMUM_TIME_DURATION);
}
} catch (IOException ex) {
log.error(ex.getMessage() + "\n" + ex);
} catch (InterruptedException e) {
log.error(e.getMessage(), e);
}
}
@OnClose
public void onClose(Session session){
try {
xmppConnector.disconnect();
log.info("XMPP connection is disconnected");

@ -35,33 +35,29 @@ public class DroneAnalyzerXMPPConnector extends XMPPTransportHandler {
private static Log log = LogFactory.getLog(DroneAnalyzerXMPPConnector.class);
private static String xmppServerIP;
private static int xmppServerPort;
private static String xmppAdminUsername;
private static String xmppAdminPassword;
private static String xmppAdminAccountJID;
private MessageTransformer messageTransformer;
private ScheduledFuture<?> connectorServiceHandler;
private ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();
public DroneAnalyzerXMPPConnector(MessageTransformer messageTransformer) {
super(XmppConfig.getInstance().getXmppServerIP(),
XmppConfig.getInstance().getSERVER_CONNECTION_PORT());
super(XmppConfig.getInstance().getXmppServerIP(),XmppConfig.getInstance().getSERVER_CONNECTION_PORT());
this.messageTransformer = messageTransformer;
}
@Override
public void connect() {
Runnable connector = new Runnable() {
@Override
public void run() {
if (!isConnected()) {
try {
initConnector();
connectToServer();
loginToServer(xmppAdminUsername, xmppAdminPassword, null);
setFilterOnReceiver(DroneConstants.DEVICE_ID+ "@" + xmppServerIP);
setFilterOnReceiver(xmppAdminAccountJID);
} catch (TransportHandlerException e) {
if (log.isDebugEnabled()) {
log.warn("Connection/Login to XMPP server at: " + server + " as " +
@ -84,18 +80,28 @@ public class DroneAnalyzerXMPPConnector extends XMPPTransportHandler {
@Override
public void processIncomingMessage(Message message) throws TransportHandlerException {
String from = message.getFrom();
String subject = message.getSubject();
String inbound_message = message.getBody();
int indexOfAt = from.indexOf("@");
int indexOfSlash = from.indexOf("/");
String deviceId = from.substring(0, indexOfAt);
String resource = from.substring(indexOfSlash + 1, from.length());
if ((inbound_message != null)&&(resource.equals(DroneConstants.MESSAGE_RESOURCE)) ){
messageTransformer.messageTranslater(inbound_message);
} else {
log.error("Message is empty or it is not belongs to "+ DroneConstants.DEVICE_ID);
try{
String from = message.getFrom();
String inbound_message = message.getBody();
int indexOfSlash = from.indexOf("/");
if(indexOfSlash==0){
if(log.isDebugEnabled()){
log.debug("Required resource not available.");
}
}else{
String resource = from.substring(indexOfSlash + 1, from.length());
if ((inbound_message != null)&&(resource.equals(DroneConstants.MESSAGE_RESOURCE)) ){
messageTransformer.messageTranslater(inbound_message);
} else {
if(log.isDebugEnabled()){
log.debug("Message is empty or it is not belongs to " + xmppAdminUsername);
}
}
}
}catch(ArrayIndexOutOfBoundsException e){
log.error("Wrong message format: input message", e);
}catch(RuntimeException e){
log.error("Unexpected error has been occurred, ", e);
}
}
@ -117,18 +123,15 @@ public class DroneAnalyzerXMPPConnector extends XMPPTransportHandler {
log.warn("Unable to 'STOP' connection to XMPP server at: " + server +
" for user - " + xmppAdminUsername);
}
try {
Thread.sleep(timeoutInterval);
} catch (InterruptedException e1) {
log.error("XMPP-Terminator: Thread Sleep Interrupt Exception for "
+ DroneConstants.DEVICE_TYPE + " type.", e1);
}
}
}
};
Thread terminatorThread = new Thread(stopConnection);
terminatorThread.setDaemon(true);
terminatorThread.start();

@ -35,11 +35,11 @@ public class MessageTransformer {
private Log log = LogFactory.getLog(MessageTransformer.class);
private CircularFifoQueue<String> sharedQueue;
private String outbound_message_format_for_simulator = "{\"quatanium_val\":[%f, %f, %f, %f]," +
"\"basicParam\":{\"velocity\":[%f, %f, %f], \"global_location\":[%f, %f, %f]},\"battery_level\":%f, \"device_type\":\"IRIS_DRONE\"}";
private String outbound_message_format_for_iris_drone = "{\"quatanium_val\":[%f, %f, %f]," +
private String outboundMessageFormatForSimulator = "{\"quatanium_val\":[%f, %f, %f, %f]," +
"\"basicParam\":{\"velocity\":[%f, %f, %f], \"global_location\":[%f, %f, %f]},\"battery_level\":%f, \"device_type\":\"SIMULATOR\"}";
private String outboundMessageFormatForIrisDrone = "{\"quatanium_val\":[%f, %f, %f]," +
"\"basicParam\":{\"velocity\":[%f, %f, %f], \"global_location\":[%f, %f, %f]},\"battery_level\":%f," +
"\"device_type\":\"SIMULATOR\"}";
"\"device_type\":\"IRIS_DRONE\"}";
public MessageTransformer(){
sharedQueue = new CircularFifoQueue<String>(DroneConstants.MAXIMUM_BUFFERE_SIZE_OF_SHARED_QUEUE);
@ -47,19 +47,18 @@ public class MessageTransformer {
private void messageTranslaterForSimulator(JsonNode inbound_message){
JsonNode node = inbound_message;
String outbound_message;
String outboundMessage;
try {
JsonNode velocity = node.get(MessageConfig.OUT_BASIC_PARAM_VAL).get(MessageConfig.OUT_BASIC_PARAM_VELOCITY);
JsonNode global_location = node.get(MessageConfig.OUT_BASIC_PARAM_VAL).get(
JsonNode globalLocation = node.get(MessageConfig.OUT_BASIC_PARAM_VAL).get(
MessageConfig.OUT_BASIC_PARAM_GLOBAL_LOCATION);
JsonNode quatanium_vals = node.get(MessageConfig.OUT_QUATANNIM_VAL);
JsonNode battery_level = node.get(MessageConfig.OUT_BATTERY_LEVEL);
outbound_message = String.format(outbound_message_format_for_simulator, sTd(quatanium_vals.get(0)),
sTd(quatanium_vals.get(1)), sTd(quatanium_vals.get(2)), sTd(quatanium_vals.get(0)),
sTd(velocity.get(0)), sTd(velocity.get(1)), sTd(velocity.get(2)), sTd(global_location.get(0)),
sTd(global_location.get(1)), sTd(global_location.get(2)), sTd(battery_level));
sharedQueue.add(outbound_message);
JsonNode quataniumVals = node.get(MessageConfig.OUT_QUATANNIM_VAL);
JsonNode batteryLevel = node.get(MessageConfig.OUT_BATTERY_LEVEL);
outboundMessage = String.format(outboundMessageFormatForSimulator, sTd(quataniumVals.get(0)),
sTd(quataniumVals.get(1)), sTd(quataniumVals.get(2)), sTd(quataniumVals.get(0)),
sTd(velocity.get(0)), sTd(velocity.get(1)), sTd(velocity.get(2)), sTd(globalLocation.get(0)),
sTd(globalLocation.get(1)), sTd(globalLocation.get(2)), sTd(batteryLevel));
sharedQueue.add(outboundMessage);
} catch (Exception e) {
log.error(e.getMessage()+",\n"+ e);
}
@ -67,19 +66,19 @@ public class MessageTransformer {
private void messageTranslaterForIRISDrone(JsonNode inbound_message){
JsonNode node = inbound_message;
String outbound_message;
String outboundMessage;
try {
JsonNode velocity = node.get(MessageConfig.OUT_BASIC_PARAM_VAL).get(MessageConfig.OUT_BASIC_PARAM_VELOCITY);
JsonNode global_location = node.get(MessageConfig.OUT_BASIC_PARAM_VAL).get(
JsonNode globalLocation = node.get(MessageConfig.OUT_BASIC_PARAM_VAL).get(
MessageConfig.OUT_BASIC_PARAM_GLOBAL_LOCATION);
JsonNode quatanium_vals = node.get(MessageConfig.OUT_QUATANNIM_VAL);
JsonNode battery_level = node.get(MessageConfig.OUT_BATTERY_LEVEL);
outbound_message = String.format(outbound_message_format_for_iris_drone, sTd(quatanium_vals.get(0)),
sTd(quatanium_vals.get(1)), sTd(quatanium_vals.get(2)), sTd(velocity.get(0)),
sTd(velocity.get(1)), sTd(velocity.get(2)), sTd(global_location.get(0)),
sTd(global_location.get(1)), sTd(global_location.get(2)), sTd(battery_level));
sharedQueue.add(outbound_message);
JsonNode quataniumVals = node.get(MessageConfig.OUT_QUATANNIM_VAL);
JsonNode batteryLevel = node.get(MessageConfig.OUT_BATTERY_LEVEL);
outboundMessage = String.format(outboundMessageFormatForIrisDrone, sTd(quataniumVals.get(0)),
sTd(quataniumVals.get(1)), sTd(quataniumVals.get(2)), sTd(velocity.get(0)),
sTd(velocity.get(1)), sTd(velocity.get(2)), sTd(globalLocation.get(0)),
sTd(globalLocation.get(1)), sTd(globalLocation.get(2)), sTd(batteryLevel));
sharedQueue.add(outboundMessage);
}catch (Exception e) {
log.error(e.getMessage()+",\n"+ e);
@ -87,20 +86,22 @@ public class MessageTransformer {
}
public void messageTranslater(String inbound_message){
JsonNode actualMessage = null;
JsonNode actualMessage;
ObjectMapper objectMapper = new ObjectMapper();
try {
actualMessage = objectMapper.readValue(inbound_message, JsonNode.class);
JsonNode deviceType = actualMessage.get(MessageConfig.IN_DEVICE_TYPE);
switch (deviceType.getTextValue()) {
case MessageConfig.IN_IRIS_DRONE:
messageTranslaterForIRISDrone(actualMessage);
break;
case MessageConfig.IN_SIMULATOR:
messageTranslaterForSimulator(actualMessage);
break;
default:
if(log.isDebugEnabled()){
log.debug("Wrong message format");
}
}
} catch (JsonProcessingException e) {
log.error("Incoming message might be corrupted, "+ e);

@ -19,16 +19,14 @@
package org.wso2.carbon.device.mgt.iot.droneanalyzer.controller.api.impl.util;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.certificate.mgt.core.service.CertificateManagementService;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.analytics.exception.DataPublisherConfigurationException;
import org.wso2.carbon.device.mgt.analytics.service.DeviceAnalyticsService;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.iot.controlqueue.xmpp.XmppConfig;
import org.wso2.carbon.device.mgt.iot.droneanalyzer.controller.api.impl.transport.DroneAnalyzerXMPPConnector;
import org.wso2.carbon.device.mgt.iot.droneanalyzer.plugin.constants.DroneConstants;
import org.wso2.carbon.device.mgt.iot.droneanalyzer.plugin.controller.DroneController;
import org.wso2.carbon.device.mgt.iot.droneanalyzer.controller.api.impl.exception.DroneAnalyzerException;
import org.wso2.carbon.device.mgt.iot.droneanalyzer.controller.api.impl.transport.DroneAnalyzerXMPPConnector;
import org.wso2.carbon.device.mgt.iot.transport.TransportHandlerException;
import java.io.File;
@ -46,8 +44,7 @@ public class DroneAnalyzerServiceUtils {
String xmppServerDomain = XmppConfig.getInstance().getXmppEndpoint();
int indexOfChar = xmppServerDomain.lastIndexOf(File.separator);
if (indexOfChar != -1) {
xmppServerDomain = xmppServerDomain.substring((indexOfChar + 1),
xmppServerDomain.length());
xmppServerDomain = xmppServerDomain.substring((indexOfChar + 1), xmppServerDomain.length());
}
indexOfChar = xmppServerDomain.indexOf(":");
if (indexOfChar != -1) {
@ -58,43 +55,47 @@ public class DroneAnalyzerServiceUtils {
droneXMPPConnector.publishDeviceData(clientToConnect, message, "CONTROL-REQUEST");
}
public static boolean sendControlCommand(DroneController controller, String deviceId, String action, double speed, double duration)
public static boolean sendControlCommand(DroneController controller, String deviceId, String action,
double speed, double duration)
throws DeviceManagementException {
boolean control_state = false;
boolean controlState = false;
try{
switch (action){
case DroneConstants.TAKE_OFF:
control_state = controller.takeoff();
controlState = controller.takeoff();
break;
case DroneConstants.LAND:
control_state = controller.land();
controlState = controller.land();
break;
case DroneConstants.BACK:
control_state = controller.back(speed, duration);
controlState = controller.back(speed, duration);
break;
case DroneConstants.CLOCK_WISE:
control_state = controller.clockwise(speed, duration);
controlState = controller.clockwise(speed, duration);
break;
case DroneConstants.COUNTER_CLOCKWISE:
control_state = controller.conterClockwise(speed, duration);
controlState = controller.conterClockwise(speed, duration);
break;
case DroneConstants.DOWN:
control_state = controller.down(speed, duration);
controlState = controller.down(speed, duration);
break;
case DroneConstants.FRONT:
control_state = controller.back(speed, duration);
controlState = controller.back(speed, duration);
break;
case DroneConstants.FORWARD:
control_state = controller.clockwise(speed, duration);
controlState = controller.clockwise(speed, duration);
break;
case DroneConstants.UP:
control_state = controller.up(speed, duration);
controlState = controller.up(speed, duration);
break;
default:
log.error("Invalid command");
break;
}
}catch(Exception e){
log.error(e.getMessage()+ "\n"+ e);
}
return control_state;
return controlState;
}
public static boolean publishToDAS(String owner, String deviceId, float temperature) {
@ -117,21 +118,4 @@ public class DroneAnalyzerServiceUtils {
}
return true;
}
public static CertificateManagementService getCertificateManagementService() throws
DroneAnalyzerException {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
CertificateManagementService certificateManagementService = (CertificateManagementService)
ctx.getOSGiService(CertificateManagementService.class, null);
if (certificateManagementService == null) {
String msg = "EnrollmentService is not initialized";
log.error(msg);
throw new DroneAnalyzerException(msg);
}
return certificateManagementService;
}
}

@ -27,8 +27,6 @@ import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService;
import org.wso2.carbon.device.mgt.iot.droneanalyzer.plugin.impl.DroneAnalyzerManagerService;
import org.wso2.carbon.device.mgt.iot.service.DeviceTypeService;
/**
* @scr.component name="org.wso2.carbon.device.mgt.iot.droneanalyzer.plugin.internal
* .DroneAnalyzerManagementServiceComponent"

@ -33,6 +33,7 @@ DEVICE_OWNER = configParser.get('Device-Configurations', 'owner')
DEVICE_ID = configParser.get('Device-Configurations', 'deviceId')
XMPP_EP = configParser.get('Device-Configurations', 'xmpp-ep')
AUTH_TOKEN = configParser.get('Device-Configurations', 'auth-token')
DEVICE_PASSWORD = configParser.get('Device-Configurations', 'auth-token')
CONTROLLER_CONTEXT = configParser.get('Device-Configurations', 'controller-context')
HTTPS_EP = configParser.get('Device-Configurations', 'https-ep')
HTTP_EP = configParser.get('Device-Configurations', 'http-ep')

@ -23,9 +23,9 @@ import util
XMPP_ENDPOINT = util.XMPP_EP.split(":")
XMPP_IP = XMPP_ENDPOINT[1].replace('//', '')
XMPP_PORT = int(XMPP_ENDPOINT[2])
MESSAGE_TO = "admin"
XMPP_OWN = util.DEVICE_OWNER
XMPP_PWD = util.DEVICE_ID
MESSAGE_TO = util.DEVICE_OWNER
XMPP_PWD = util.DEVICE_PASSWORD
XMPP_OWN = util.DEVICE_ID
XMPP_RESOURCE = "drone_current_status"
XMPP_JID = MESSAGE_TO + "@" + XMPP_IP + "/" + XMPP_RESOURCE

@ -66,7 +66,7 @@ while true; do
done
cp deviceConfig.properties ./src
./src/IRIS+DroneStatistics.py -i $push_interval -b $baud -c $connection_target
python ./src/IRIS+DroneStatistics.py -i $push_interval -b $baud -c $connection_target
if [ $? -ne 0 ]; then
echo "Could not start the service..."

@ -169,3 +169,52 @@
.navbar {
border-radius: 0;
}
.circle {
background: none repeat scroll 0 0 #191919;
border-radius: 50px;
height: 50px;
padding: 10px;
width: 50px;
color: #fff;
}
.padding-top-double {
padding-top: 20px;
}
.padding-double {
padding: 20px;
}
.grey {
color: #333;
}
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #7f7f7f;
margin: 1em 0;
padding: 0;
opacity: 0.2;
}
.light-grey {
color: #7c7c7c;
}
.uppercase {
text-transform: uppercase;
}
.grey-bg {
background-color: #f6f4f4;
}
path {
stroke: black;
stroke-width: 2;
fill: none;
}
.axis path, .axis line {
fill: none;
stroke: #ccc;
stroke-width: 2;
shape-rendering: crispEdges;
}

@ -20,7 +20,7 @@ var config_api = function () {
var config_api = this;
var domain = "localhost";
var port = "9793";
var context_controller = "/drone_analyzer/DroneAnalyzerServiceUnitManager/controller/send_command";
var context_controller = "/drone_analyzer/controller/send_command";
config_api.config_3dobject_holder = "#virtualDrone";
config_api.realtime_plotting_update_interval = 30;
config_api.realtime_plotting_totalPoints = 30;
@ -29,7 +29,7 @@ var config_api = function () {
config_api.drone_control = "http://" + domain + ":" + port + "/" + context_controller;
config_api.drone_controlType = "POST";
config_api.drone_controlDataType = "json";
config_api.web_socket_endpoint = "ws://localhost:9763/drone_analyzer/datastream/drone_status";
config_api.web_socket_endpoint = "wss://localhost:9443/drone_analyzer/datastream/drone_status";
config_api.modules_status = {
"realtimePlotting": false,
"sensorReadings": false,

@ -16,7 +16,7 @@
* under the License.
*/
object_maker.init(config_api.config_3dobject_holder, $("#objectHolder").width(), $("#objectHolder").width()/2);
object_maker.init(config_api.config_3dobject_holder, $("#objectHolder").width(), $("#objectHolder").width()/1.5);
object_maker.animate();
var flight_dynamics = new flight_dynamics();
$("#window_size").slider({

@ -15,32 +15,30 @@
* specific language governing permissions and limitations
* under the License.
*/
var flight_dynamics = function () {
var api = this;
api.processingMessage = function (sender_message) {
JSON.stringify(sender_message);
if(sender_message.battery_level!= undefined){
$("#battery_level_holder").width( parseInt(sender_message.battery_level)+"%" );
$("#battery_level").html(sender_message.battery_level+"%");
}
if (sender_message.quatanium_val != undefined) {
current_status = object_maker.get_heading_attitude_bank(sender_message.quatanium_val);
object_maker.set_heading_attitude_bank(current_status);
$("#imageTop").animate({rotate: '' + (180 / Math.PI) * 2.890456 + 'deg'}, 2);
}
$("#imageTop").delay(2).animate({rotate: '45deg'}, 2);
if (config_api.modules_status.angleOfRotation_2 || config_api.modules_status.angleOfRotation_1) {
console.log(JSON.stringify(current_status));
object_maker.set_bank("#imageTop", current_status.bank);
object_maker.set_heading("#imageBackSecond", current_status.heading);
}
if (config_api.modules_status.realtimePlotting) {
if (current_status[$('#plotting_attribute').val()] != undefined) {
plotting.pushData(current_status[$('#plotting_attribute').val()]);
}
}
if (sender_message.basicParam != undefined) {
if (sender_message.basicParam.velocity != undefined) {
var velocity = sender_message.basicParam.velocity;

@ -1,57 +1,5 @@
{{#zone "topCss"}}
{{css "css/main-app.css" }}
<style type="text/css">
.circle {
background: none repeat scroll 0 0 #191919;
border-radius: 50px;
height: 50px;
padding: 10px;
width: 50px;
color: #fff;
}
.padding-top-double {
padding-top: 20px;
}
.padding-double {
padding: 20px;
}
.grey {
color: #333;
}
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #7f7f7f;
margin: 1em 0;
padding: 0;
opacity: 0.2;
}
.light-grey {
color: #7c7c7c;
}
.uppercase {
text-transform: uppercase;
}
.grey-bg {
background-color: #f6f4f4;
}
path {
stroke: black;
stroke-width: 2;
fill: none;
}
.axis path, .axis line {
fill: none;
stroke: #ccc;
stroke-width: 2;
shape-rendering: crispEdges;
}
</style>
{{/zone}}
<div class=" row">
<div class="box col-md-12">
@ -69,8 +17,8 @@
<div class="col-md-4 col-sm-2 col-xs-2">
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0"
aria-valuemax="100" style="width: 0%;">
0%
aria-valuemax="100" style="width: 0%;" id="battery_level_holder">
<p id="battery_level">0%</p>
</div>
</div>
</div>
@ -84,12 +32,8 @@
<h2><i class="glyphicon glyphicon-info-sign"></i> Controller </h2>
<div class="box-icon">
<a href="#" class="btn btn-setting btn-round btn-default"><i
class="glyphicon glyphicon-cog"></i></a>
<a href="#" class="btn btn-minimize btn-round btn-default"><i
class="glyphicon glyphicon-chevron-up" ></i></a>
<a href="#" class="btn btn-close btn-round btn-default"><i
class="glyphicon glyphicon-remove"></i></a>
</div>
</div>
<div class="box-content row" id="module_control">
@ -150,12 +94,8 @@
<h2><i class="glyphicon glyphicon-list"></i> Angle of Rotation</h2>
<div class="box-icon" id="AngleOfRotation_1">
<a href="#" class="btn btn-setting btn-round btn-default"><i
class="glyphicon glyphicon-cog"></i></a>
<a href="#" class="btn btn-minimize btn-round btn-default"><i
class="glyphicon glyphicon-chevron-up"></i></a>
<a href="#" class="btn btn-close btn-round btn-default"><i
class="glyphicon glyphicon-remove"></i></a>
</div>
</div>
<div class="box-content" style="position: relative;" id="objectHolder">
@ -170,12 +110,8 @@
<div class="box-header well" data-original-title="" >
<div class="box-icon" id="AngleOfRotation_2">
<a href="#" class="btn btn-setting btn-round btn-default"><i
class="glyphicon glyphicon-cog"></i></a>
<a href="#" class="btn btn-minimize btn-round btn-default"><i
class="glyphicon glyphicon-chevron-up"></i></a>
<a href="#" class="btn btn-close btn-round btn-default"><i
class="glyphicon glyphicon-remove"></i></a>
</div>
</div>
<div class="box-content" >
@ -196,12 +132,8 @@
<div class="box-header well" data-original-title="" >
<div class="box-icon" id="AngleOfRotation_3">
<a href="#" class="btn btn-setting btn-round btn-default"><i
class="glyphicon glyphicon-cog"></i></a>
<a href="#" class="btn btn-minimize btn-round btn-default"><i
class="glyphicon glyphicon-chevron-up"></i></a>
<a href="#" class="btn btn-close btn-round btn-default"><i
class="glyphicon glyphicon-remove"></i></a>
</div>
</div>
<div class="box-content" >
@ -224,12 +156,8 @@
<h2><i class="glyphicon glyphicon-list"></i>Live Video Stream</h2>
<div class="box-icon" id="LiveVideoStream">
<a href="#" class="btn btn-setting btn-round btn-default"><i
class="glyphicon glyphicon-cog"></i></a>
<a href="#" class="btn btn-minimize btn-round btn-default"><i
class="glyphicon glyphicon-chevron-up"></i></a>
<a href="#" class="btn btn-close btn-round btn-default"><i
class="glyphicon glyphicon-remove"></i></a>
</div>
</div>
<div class="box-content">
@ -248,20 +176,16 @@
<div class="box-header well" data-original-title="" >
<h2><i class="glyphicon glyphicon-list"></i>Sensor Readings</h2>
<div class="box-icon" id="SensorReadings">
<a href="#" class="btn btn-setting btn-round btn-default"><i
class="glyphicon glyphicon-cog"></i></a>
<a href="#" class="btn btn-minimize btn-round btn-default"><i
class="glyphicon glyphicon-chevron-up"></i></a>
<a href="#" class="btn btn-close btn-round btn-default"><i
class="glyphicon glyphicon-remove"></i></a>
</div>
</div>
<div class="box-content" id="basicSensoReading">
<div>
<p>Location latitude: <label id="locationLat"></label></br>
<p>Location</br> latitude: <label id="locationLat"></label></br>
longitude: <label id="locationLog"></label></br>
altitudes: <label id="locationAlt"></label></p>
<p> Velocity: x :<label id="velocityx"></label></br>
<p> Velocity:</br> x :<label id="velocityx"></label></br>
y : <label id="velocityy"></label></br>
z : <label id="velocityz"></label></p>
<p> Battery Voltage:<label id="battery_voltage"></label></p>
@ -275,12 +199,8 @@
<h2><i class="glyphicon glyphicon-list-alt"></i>Realtime Plotting</h2>
<div class="box-icon" id="RealtimePlotting">
<a href="#" class="btn btn-setting btn-round btn-default"><i
class="glyphicon glyphicon-cog"></i></a>
<a href="#" class="btn btn-minimize btn-round btn-default"><i
class="glyphicon glyphicon-chevron-up"></i></a>
<a href="#" class="btn btn-close btn-round btn-default"><i
class="glyphicon glyphicon-remove"></i></a>
</div>
</div>
<div class="box-content">

Loading…
Cancel
Save