[Ovmsdev] GPS / NMEA integration
Mark Webb-Johnson
mark at openvehicles.com
Mon Dec 11 13:47:18 HKT 2017
Under the principle of ‘keep everything powered off unless explicitely asked to power it on’, I think we should default enable.gps and enable.gpstime to FALSE.
Thinking about the arrangement of a vehicle requiring GPS, perhaps this can be signalled somehow in vehicle.{h,cpp}? Have the vehicle module define there that it requires modem GPS and/or GPSTIME, and then have the nmea module enable appropriately? We can still retain modem/enable.gps(time) for explicitly enabling (I had a use case for this when a roadster owner on v2 had a broken car GPS, but the v2 tesla_roadster module doesn't enable the modem gps).
So the logic in nmea becomes: If ((vehicle module needs modem GPS)||(modem enable.gps)) Then enable gps.
Regards, Mark.
> On 10 Dec 2017, at 10:33 PM, Michael Balzer <dexter at expeedo.de> wrote:
>
> Works, pushed:
>
> OVMS > config list modem
> modem
> apn: hologram
> apn.password:
> apn.user:
> enable.gps: yes
> enable.gpstime: yes
> enable.net: yes
> enable.sms: yes
>
> OVMS > power simcom on
> Power mode of simcom is now on
> I (28084) events: Signal(power.simcom.on)
> I (28084) simcom: State: Enter PoweringOn state
> I (28084) simcom: Power Cycle
> I (34414) simcom: State: Enter PoweredOn state
> I (53514) simcom: State: Enter MuxMode state
> I (53514) gsm-mux: Start MUX
> I (53514) gsm-mux: StartChannel(0)
> I (53524) gsm-mux: Channel #0 is open
> I (53524) gsm-mux: StartChannel(1)
> I (53534) gsm-mux: Channel #1 is open
> I (53534) gsm-mux: StartChannel(2)
> I (53544) gsm-mux: Channel #2 is open
> I (53544) gsm-mux: StartChannel(3)
> I (53544) gsm-mux: Channel #3 is open
> I (53544) gsm-mux: StartChannel(4)
> I (53554) gsm-mux: Channel #4 is open
> I (54514) simcom: State: Enter NetStart state
> I (54514) gsm-nmea: Startup
> I (62414) events: Signal(system.modem.gotgps)
>
> OVMS > metrics list utc
> m.time.utc 1512915059Sec
>
> OVMS > metrics list .p.
> v.p.altitude 346m
> v.p.direction 341.2°
> v.p.gpshdop 1
> v.p.gpslock yes
> v.p.gpsmode AA
> v.p.gpsspeed 0Kph
> v.p.latitude 51.3023
> v.p.longitude 7.39013
> v.p.odometer
> v.p.satcount 11
> v.p.speed
> v.p.trip
>
> OVMS > power simcom sleep
> Power mode of simcom is now sleep
> I (103104) events: Signal(power.simcom.sleep)
> I (103514) simcom: State: Enter NetSleep state
> I (103514) gsm-ppp: Shutting down (soft)...
> I (103514) gsm-nmea: Shutdown (direct)
> I (103514) events: Signal(system.modem.lostgps)
>
> OVMS > power simcom on
> Power mode of simcom is now on
> I (154494) events: Signal(power.simcom.on)
> I (154514) simcom: State: Enter NetStart state
> I (154514) gsm-nmea: Startup
> I (159414) events: Signal(system.modem.gotgps)
> I (160544) simcom: PPP Connection is ready to start
> I (161514) simcom: State: Enter NetMode state
> I (161514) gsm-ppp: Startup
>
>
> I've changed direction & altitude to float, missed those on the previous rework.
>
> I've removed setting "m.time.utc" from the Twizy and Kia modules. On the Roadster, set "enable.gpstime" to "no".
>
> I'm getting around 10 satellites all the time with my GSM antenna and our currently very snowy weather, so it seems we don't need active GPS antennas with this module. But I haven't had it on the road yet.
>
> Regards,
> Michael
>
>
> Am 10.12.2017 um 09:23 schrieb Michael Balzer:
>> Toms comment made me test my GSM antenna, lo and behold, it works:
>>
>> D (298314) gsm-nmea: IncomingLine: $GPGSV,2,1,06,01,,,31,08,26,174,30,14,45,082,37,19,01,323,23*42
>> D (298314) gsm-nmea: IncomingLine: $GPGSV,2,2,06,22,68,234,25,32,,,35*44
>> D (298324) gsm-nmea: IncomingLine: $GLGSV,2,1,06,66,19,039,43,82,56,144,38,75,11,007,34,81,07,142,16*6A
>> D (298334) gsm-nmea: IncomingLine: $GLGSV,2,2,06,67,73,053,46,68,45,213,31*6F
>> D (298334) gsm-nmea: IncomingLine: $GPGGA,080552.0,5118.139329,N,00723.395918,E,1,02,2.1,316.7,M,47.0,M,,*50
>> D (298344) gsm-nmea: IncomingLine: $GNGNS,080552.0,5118.139329,N,00723.395918,E,AA,06,2.1,316.7,47.0,,*60
>> D (298344) gsm-nmea: IncomingLine: $GPVTG,,T,0.0,M,0.0,N,0.0,K,A*0D
>> D (298354) gsm-nmea: IncomingLine: $GPRMC,080552.0,A,5118.139329,N,00723.395918,E,0.0,,101217,,,A*49
>> D (298354) gsm-nmea: IncomingLine: $GPGSA,A,2,08,14,,,,,,,,,,,2.3,2.1,0.9*35
>> D (298364) gsm-nmea: IncomingLine: $GNGSA,A,2,08,14,,,,,,,,,,,2.3,2.1,0.9*2B
>> D (298364) gsm-nmea: IncomingLine: $GNGSA,A,2,66,67,75,82,,,,,,,,,2.3,2.1,0.9*2F
>>
>>
>> My GPS antenna is an active one for V2, it seems the current module does not support active antennas.
>>
>> Actice GPS antennas are the standard choice over here. If the SIM5360 can do without, that will eliminate another energy drain, so is good. Users will need to know they'll need another antenna.
>>
>> Regards,
>> Michael
>
> --
> Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
> Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20171211/b21409d9/attachment.htm>
More information about the OvmsDev
mailing list