A multifunctional and modular Firmware for Multitech's mDot based on ARM mBed provides a widerange of functionality for several Sensors such as MAX44009, BME280, MPU9250, SI1143 and uBlox. It allows you to quickly build a Sensornode that measures specific data with its sensors and sends it via LoRaWAN.

Dependencies:   mDot_LoRa_Sensornode_Flowmeter_impl mbed-rtos mbed

LoRa-Sensornode Firmware for Multitech mDot

A multifunctional and modular Firmware for Multitech's mDot which provides a widerange of functionality for several Sensors. It allows you to quickly build a Sensornode that measures specific data with its sensors and sends it via LoRaWAN.

/media/uploads/mitea1/logo-lora-600x370.png /media/uploads/mitea1/mt_mdot_family_642px.png

Supported Sensors

Idea

The Firmware has some predefined Application Modes running different Tasks(Measurements). Each mode can be used in a different Scenario. Application_Modes define which sensors are used, how often they aquire data and how often the data has to be sent via LoRa. Lets say you just want to measure the Light then you choose an Application_Mode (or define one) that only runs TaskLight for light measurement. As a standard all measurements are taken every second and sent via LoRa but you can change that interval depending on your usage Scenario

app/uBlox.h

Committer:
mitea1
Date:
2018-11-02
Revision:
10:4051c38bf73f
Parent:
0:f2815503561f

File content as of revision 10:4051c38bf73f:

/**
 * @file uBlox.h
 *
 * @author Adrian
 * @date 16.05.2016
 *
 */

#include <RawSerial.h>
#include <rtos.h>
#include "Decoder.h"
#include "uBloxConfig.h"

#ifndef APP_UBLOX_H_
#define APP_UBLOX_H_

/**
 * @class uBlox
 * @brief Provides Functionality to control the uBlox
 */
class uBlox {
public:
	uBlox(mbed::RawSerial*);
	virtual ~uBlox();

	/**
	 * @brief Initializes the uBlox according to the desired uBLOX_MODE
	 * @param desiredMode the desired Mode depending on which the uBlox has to be
	 * configured
	 */
	void init(uBLOX_MODE);

	/**
	 * @brief Gets the GPS Time of Week in ms
	 */
	unsigned long getTimeOfWeekMs();

	/**
	 * @brief Gets the decoded Latitude of the GPS Coordinate
	 * @return
	 */
	float getLatitude();

	/**
	 * @brief Gets the decoded Longitude of the GPS Coordinate
	 * @return
	 */
	float getLongitude();

	/**
	 * @brief Gets the decoded height above ellipsoid of the GPS Coordinate
	 * @return
	 */
	signed long getHeightAboveEllipsoid();

	/**
	 * @brief Gets the decoded height above mean sea level of the GPS Coordinate
	 * @return
	 */
	signed long getHeightAboveMeanSeaLevel();

	/**
	 * @brief Gets the decoded horizontal accuracy of the GPS Coordinate measurement
	 * @return
	 */
	unsigned long getHorizontalAccuracyEstimate();

	/**
	 * @brief Gets the decoded vertical accuracy of the GPS Coordinate measurment
	 * @return
	 */
	unsigned long getVerticalAccuracyEstimate();

private:
	Decoder* decoder;
	mbed::RawSerial* serial;

	uBloxConfig* config;

	/**
	 * @brief Sends a Configuration String via the uart interface of the uBlox
	 * @param configurationString
	 */
	void sendConfigurationString(std::vector<uint8_t> configurationString);

};

#endif /* APP_UBLOX_H_ */